diff options
Diffstat (limited to 'mediagoblin/db/indexes.py')
-rw-r--r-- | mediagoblin/db/indexes.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mediagoblin/db/indexes.py b/mediagoblin/db/indexes.py index d379a52b..57bd33cd 100644 --- a/mediagoblin/db/indexes.py +++ b/mediagoblin/db/indexes.py @@ -88,6 +88,13 @@ MEDIAENTRY_INDEXES = { # Indexing on uploaders and when media entries are created. # Used for showing a user gallery, etc. 'index': [('uploader', ASCENDING), + ('created', DESCENDING)]}, + + 'uploader_tags_created': { + # Indexing on the media uploader, the associated tags, and timestamp + # Used for showing media items matching a tag search, most recent first. + 'index': [('uploader', ASCENDING), + ('tags', DESCENDING), ('created', DESCENDING)]}} |