updates indices to index on the slug component of the tag list

- uses dot notation to reach into the JSON-style MediaEntry tags
  field object to index on the slug property of each tag
This commit is contained in:
Caleb Forbes Davis V 2011-07-27 16:04:41 -05:00
parent 0712a06dc6
commit 37be7b6da6

View File

@ -95,14 +95,14 @@ MEDIAENTRY_INDEXES = {
# Used for showing media items matching a tag search, most recent first.
'index': [('state', ASCENDING),
('uploader', ASCENDING),
('tags', DESCENDING),
('tags.slug', DESCENDING),
('created', DESCENDING)]},
'state_tags_created': {
# Indexing on processed?, media tags, and timestamp (across all users)
# This is used for a front page tag search.
'index': [('state', ASCENDING),
('tags', DESCENDING),
('tags.slug', DESCENDING),
('created', DESCENDING)]}}