diff --git a/bin/mongodb/indexes.js b/bin/mongodb/indexes.js index 9c0fe308eba6..3d8fb749c41d 100644 --- a/bin/mongodb/indexes.js +++ b/bin/mongodb/indexes.js @@ -313,3 +313,9 @@ db.study_chapter_flat.createIndex( ); db.title_request.createIndex({ userId: 1 }); db.title_request.createIndex({ 'history.0.status.n': 1, 'history.0.at': 1 }); + +// you may want to run these on the insight database +// if it's a different one +db.insight.createIndex({ mr: 1, p: 1, c: 1 }); +db.insight.createIndex({ mr: 1, a: 1 }, { partialFilterExpression: { mr: { $exists: true } } }); +db.insight.createIndex({ u: 1, d: -1 });