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:
parent
0712a06dc6
commit
37be7b6da6
@ -95,14 +95,14 @@ MEDIAENTRY_INDEXES = {
|
|||||||
# Used for showing media items matching a tag search, most recent first.
|
# Used for showing media items matching a tag search, most recent first.
|
||||||
'index': [('state', ASCENDING),
|
'index': [('state', ASCENDING),
|
||||||
('uploader', ASCENDING),
|
('uploader', ASCENDING),
|
||||||
('tags', DESCENDING),
|
('tags.slug', DESCENDING),
|
||||||
('created', DESCENDING)]},
|
('created', DESCENDING)]},
|
||||||
|
|
||||||
'state_tags_created': {
|
'state_tags_created': {
|
||||||
# Indexing on processed?, media tags, and timestamp (across all users)
|
# Indexing on processed?, media tags, and timestamp (across all users)
|
||||||
# This is used for a front page tag search.
|
# This is used for a front page tag search.
|
||||||
'index': [('state', ASCENDING),
|
'index': [('state', ASCENDING),
|
||||||
('tags', DESCENDING),
|
('tags.slug', DESCENDING),
|
||||||
('created', DESCENDING)]}}
|
('created', DESCENDING)]}}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user