mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
added indices on search key and id for mongo
This commit is contained in:
@@ -105,6 +105,12 @@
|
||||
}
|
||||
});
|
||||
|
||||
db.collection('search').ensureIndex({key: 1, id: 1}, {background: true}, function(err) {
|
||||
if(err) {
|
||||
winston.error('Error creating index ' + err.message);
|
||||
}
|
||||
});
|
||||
|
||||
if(typeof callback === 'function') {
|
||||
callback();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user