From 1580c7c5ceb309134a7c4e0c8ecf89f95cb76273 Mon Sep 17 00:00:00 2001 From: Caleb Forbes Davis V Date: Wed, 13 Jul 2011 00:22:16 -0500 Subject: [PATCH] adds index for searching across all users' tagged images --- mediagoblin/db/indexes.py | 6 ++++++ 1 file changed, 6 insertions(+) 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)]}}