Commit 4959f3b8 by Don Mitchell

Fix wiki search query

and formatting error in a doc file.
parent 236f36b3
......@@ -1018,7 +1018,7 @@ class MongoModuleStore(ModuleStoreWriteBase):
:param wiki_slug: the course wiki root slug
:return: list of course locations
"""
courses = self.collection.find({'definition.data.wiki_slug': wiki_slug})
courses = self.collection.find({'_id.category': 'course', 'definition.data.wiki_slug': wiki_slug})
# the course's run == its name. It's the only xblock for which that's necessarily true.
return [Location._from_deprecated_son(course['_id'], course['_id']['name']) for course in courses]
......
......@@ -25,7 +25,7 @@ fs.files:
Index needed thru 'category' by `_get_all_content_for_course` and others. That query also takes a sort
which can be `uploadDate`, `display_name`,
# again, uploadDate may also be a freq sort.
```
ensureIndex({'_id.tag': 1, '_id.org': 1, '_id.course': 1, '_id.category': 1})
```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment