added index and fixed vote button in infinite scroll

This commit is contained in:
barisusakli
2014-09-04 01:48:57 -04:00
parent e5795687bb
commit c62f251afc
2 changed files with 9 additions and 0 deletions

View File

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