From a72cbfe68a680e4d071dae644c8d58936219bf93 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Wed, 10 Sep 2014 13:33:40 -0400 Subject: [PATCH] Add an index on _id.revision to allow separating draft and published during export --- common/lib/xmodule/xmodule/modulestore/mongo/base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/lib/xmodule/xmodule/modulestore/mongo/base.py b/common/lib/xmodule/xmodule/modulestore/mongo/base.py index aa136c4bd2..5568054bb6 100644 --- a/common/lib/xmodule/xmodule/modulestore/mongo/base.py +++ b/common/lib/xmodule/xmodule/modulestore/mongo/base.py @@ -1463,3 +1463,6 @@ class MongoModuleStore(ModuleStoreDraftAndPublished, ModuleStoreWriteBase, Mongo # Because lms calls get_parent_locations frequently (for path generation): self.collection.create_index('definition.children', sparse=True) + + # To allow prioritizing draft vs published material + self.collection.create_index('_id.revision')