diff options
author | Caleb Forbes Davis V <caldavis@gmail.com> | 2011-07-13 00:22:16 -0500 |
---|---|---|
committer | Caleb Forbes Davis V <caldavis@gmail.com> | 2011-07-13 00:22:16 -0500 |
commit | 1580c7c5ceb309134a7c4e0c8ecf89f95cb76273 (patch) | |
tree | 1f878922c5b1680cccce56670fa97908fb9475ea /mediagoblin/db/indexes.py | |
parent | cc7ff3c50513ae169abab196f32de97af30e6744 (diff) | |
download | mediagoblin-1580c7c5ceb309134a7c4e0c8ecf89f95cb76273.tar.lz mediagoblin-1580c7c5ceb309134a7c4e0c8ecf89f95cb76273.tar.xz mediagoblin-1580c7c5ceb309134a7c4e0c8ecf89f95cb76273.zip |
adds index for searching across all users' tagged images
Diffstat (limited to 'mediagoblin/db/indexes.py')
-rw-r--r-- | mediagoblin/db/indexes.py | 6 |
1 files changed, 6 insertions, 0 deletions
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)]}} |