From: Caleb Forbes Davis V Date: Wed, 13 Jul 2011 05:22:16 +0000 (-0500) Subject: adds index for searching across all users' tagged images X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1580c7c5ceb309134a7c4e0c8ecf89f95cb76273;p=mediagoblin.git adds index for searching across all users' tagged images --- diff --git a/mediagoblin/db/indexes.py b/mediagoblin/db/indexes.py index 57bd33cd..1a2de55f 100644 --- a/mediagoblin/db/indexes.py +++ b/mediagoblin/db/indexes.py @@ -95,6 +95,12 @@ MEDIAENTRY_INDEXES = { # Used for showing media items matching a tag search, most recent first. 'index': [('uploader', ASCENDING), ('tags', DESCENDING), + ('created', DESCENDING)]}, + + 'tags_created': { + # Indexing media tags, and timestamp (across all users) + # This is used for a front page tag search. + 'index': [('tags', DESCENDING), ('created', DESCENDING)]}}