create index on score field

This commit is contained in:
barisusakli
2014-09-01 19:44:43 -04:00
parent 13bdd939e3
commit 487793e692

View File

@@ -81,7 +81,7 @@
}
function createIndices() {
db.collection('objects').ensureIndex({_key :1}, {background:true}, function(err) {
db.collection('objects').ensureIndex({_key :1, score: -1}, {background:true}, function(err) {
if(err) {
winston.error('Error creating index ' + err.message);
}