index byq queueid

This commit is contained in:
Andris Reinman 2018-09-28 11:56:28 +03:00
parent abf5084573
commit ca39ba4791
2 changed files with 8 additions and 1 deletions

View file

@ -37,7 +37,7 @@ let argv = yargs
let rows = await db.database
.collection('messagelog')
.find({ id })
.find({ $or: [{id}, {queueId: id}] })
.toArray();
while (rows.length) {

View file

@ -525,6 +525,13 @@ indexes:
parentId: 1
sparse: true # only messages inserted by mail store have parentId set
- collection: messagelog
index:
name: messagelog_queue
key:
queueId: 1
sparse: true # only messages inserted by mail store have queueId set
- collection: messagelog
index:
name: messagelog_autoexpire