Enforce an index over the location key in mongo

This commit is contained in:
Calen Pennington
2012-06-29 13:40:06 -04:00
parent a7d0e2e122
commit 520fac1aa2

View File

@@ -15,6 +15,7 @@ class MongoModuleStore(ModuleStore):
host=host,
port=port
)[db][collection]
self.collection.ensure_index('location')
# Force mongo to report errors, at the expense of performance
self.collection.safe = True