mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-09-16 18:14:32 +08:00
Fixed IMAP search for text indexes
This commit is contained in:
parent
11c4f583f8
commit
2c4e43b2e8
1 changed files with 5 additions and 3 deletions
|
@ -62,8 +62,10 @@ module.exports = server => (path, options, session, callback) => {
|
||||||
// fulltext can only be in the root of the query, not in $not, $or expressions
|
// fulltext can only be in the root of the query, not in $not, $or expressions
|
||||||
// https://docs.mongodb.com/v3.4/tutorial/text-search-in-aggregation/#restrictions
|
// https://docs.mongodb.com/v3.4/tutorial/text-search-in-aggregation/#restrictions
|
||||||
query.user = session.user.id;
|
query.user = session.user.id;
|
||||||
|
query.searchable = true;
|
||||||
query.$text = {
|
query.$text = {
|
||||||
$search: term.value
|
$search: term.value,
|
||||||
|
$language: 'none'
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
// can not search by text
|
// can not search by text
|
||||||
|
@ -367,10 +369,10 @@ module.exports = server => (path, options, session, callback) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
uidList.push(message.uid);
|
uidList.push(message.uid);
|
||||||
processNext();
|
setImmediate(processNext);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
processNext();
|
setImmediate(processNext);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue