From 484ad33549ce78d2907b1a1b9bde373b2737491a Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 11 May 2015 18:07:45 -0400 Subject: [PATCH] convert key, value index to sparse/unique --- src/database/mongo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/database/mongo.js b/src/database/mongo.js index 63fdc8b9c2..cc9bacec1c 100644 --- a/src/database/mongo.js +++ b/src/database/mongo.js @@ -133,7 +133,7 @@ function createIndices() { async.parallel([ async.apply(createIndex, 'objects', {_key: 1, score: -1}, {background: true}), - async.apply(createIndex, 'objects', {_key: 1, value: -1}, {background: true}), + async.apply(createIndex, 'objects', {_key: 1, value: -1}, {background: true, unique: true, sparse: true}), async.apply(createIndex, 'objects', {expireAt: 1}, {expireAfterSeconds: 0, background: true}),