mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-18 10:30:49 +01:00
Partial set index (#14087)
* partial index test * cleanup * remove line * background true * whitespace * test: fix invite/pending removal
This commit is contained in:
@@ -86,6 +86,9 @@ mongoModule.createIndices = async function () {
|
||||
const collection = mongoModule.client.collection('objects');
|
||||
await collection.createIndex({ _key: 1, score: -1 }, { background: true });
|
||||
await collection.createIndex({ _key: 1, value: -1 }, { background: true, unique: true, sparse: true });
|
||||
await collection.createIndex(
|
||||
{ members: 1, _key: 1}, { background: true, partialFilterExpression: { members: { $exists: true } } }
|
||||
);
|
||||
await collection.createIndex({ expireAt: 1 }, { expireAfterSeconds: 0, background: true });
|
||||
winston.info('[database] Checking database indices done!');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user