From 272469daf5eb53f2302ae3948dde4e40eaf12497 Mon Sep 17 00:00:00 2001 From: Caleb Forbes Davis V Date: Sun, 10 Jul 2011 23:36:21 -0500 Subject: [PATCH] adds index for tag searches by an uploader --- mediagoblin/db/indexes.py | 7 +++++++ 1 file changed, 7 insertions(+) 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)]}}