diff options
author | Caleb Forbes Davis V <caldavis@gmail.com> | 2011-07-27 16:04:41 -0500 |
---|---|---|
committer | Caleb Forbes Davis V <caldavis@gmail.com> | 2011-07-27 16:04:41 -0500 |
commit | 37be7b6da6aa765991fac55c5c2d0cdb37fd24fc (patch) | |
tree | b00545af1f1ff86f276eecc0ef10565a897b938d /mediagoblin/db/indexes.py | |
parent | 0712a06dc6d6b05cb78d4b10af12c051e8f765e3 (diff) | |
download | mediagoblin-37be7b6da6aa765991fac55c5c2d0cdb37fd24fc.tar.lz mediagoblin-37be7b6da6aa765991fac55c5c2d0cdb37fd24fc.tar.xz mediagoblin-37be7b6da6aa765991fac55c5c2d0cdb37fd24fc.zip |
updates indices to index on the slug component of the tag list
- uses dot notation to reach into the JSON-style MediaEntry tags
field object to index on the slug property of each tag
Diffstat (limited to 'mediagoblin/db/indexes.py')
-rw-r--r-- | mediagoblin/db/indexes.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mediagoblin/db/indexes.py b/mediagoblin/db/indexes.py index 3440ac2a..d0e11311 100644 --- a/mediagoblin/db/indexes.py +++ b/mediagoblin/db/indexes.py @@ -95,14 +95,14 @@ MEDIAENTRY_INDEXES = { # Used for showing media items matching a tag search, most recent first. 'index': [('state', ASCENDING), ('uploader', ASCENDING), - ('tags', DESCENDING), + ('tags.slug', DESCENDING), ('created', DESCENDING)]}, 'state_tags_created': { # Indexing on processed?, media tags, and timestamp (across all users) # This is used for a front page tag search. 'index': [('state', ASCENDING), - ('tags', DESCENDING), + ('tags.slug', DESCENDING), ('created', DESCENDING)]}} |