added index on _key

This commit is contained in:
Baris Soner Usakli
2013-12-04 21:35:38 -05:00
parent 72a3ab1d6c
commit 7c4347736c
2 changed files with 7 additions and 3 deletions

View File

@@ -26,8 +26,12 @@
});
db.createCollection('objects', function(err, _collection) {
db.createCollection('objects', function(err, collection) {
collection.ensureIndex({_key :1}, {background:true}, function(err, name){
if(err) {
winston.error("Error creating index " + err.message);
}
});
});
callback(err);