aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Forbes Davis V <caldavis@gmail.com>2011-07-13 12:14:18 -0500
committerCaleb Forbes Davis V <caldavis@gmail.com>2011-07-13 12:18:50 -0500
commitcea8f2b632de13ca9b423ea97ee8f6abf3cd6ecb (patch)
treea588f99c7418b812d806754b92f0e507a71d4c84
parent1580c7c5ceb309134a7c4e0c8ecf89f95cb76273 (diff)
downloadmediagoblin-cea8f2b632de13ca9b423ea97ee8f6abf3cd6ecb.tar.lz
mediagoblin-cea8f2b632de13ca9b423ea97ee8f6abf3cd6ecb.tar.xz
mediagoblin-cea8f2b632de13ca9b423ea97ee8f6abf3cd6ecb.zip
adds "state" to tags indices
-rw-r--r--mediagoblin/db/indexes.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/mediagoblin/db/indexes.py b/mediagoblin/db/indexes.py
index 1a2de55f..3440ac2a 100644
--- a/mediagoblin/db/indexes.py
+++ b/mediagoblin/db/indexes.py
@@ -90,17 +90,19 @@ MEDIAENTRY_INDEXES = {
'index': [('uploader', ASCENDING),
('created', DESCENDING)]},
- 'uploader_tags_created': {
- # Indexing on the media uploader, the associated tags, and timestamp
+ 'state_uploader_tags_created': {
+ # Indexing on processed?, media uploader, associated tags, and timestamp
# Used for showing media items matching a tag search, most recent first.
- 'index': [('uploader', ASCENDING),
+ 'index': [('state', ASCENDING),
+ ('uploader', ASCENDING),
('tags', DESCENDING),
('created', DESCENDING)]},
- 'tags_created': {
- # Indexing media tags, and timestamp (across all users)
+ 'state_tags_created': {
+ # Indexing on processed?, media tags, and timestamp (across all users)
# This is used for a front page tag search.
- 'index': [('tags', DESCENDING),
+ 'index': [('state', ASCENDING),
+ ('tags', DESCENDING),
('created', DESCENDING)]}}