feat: use covered query

This commit is contained in:
Barış Soner Uşaklı
2020-07-03 23:23:42 -04:00
parent 412ca4ae71
commit 057b783df7
2 changed files with 15 additions and 7 deletions

View File

@@ -428,7 +428,7 @@ module.exports = function (module) {
count = count !== undefined ? count : 0;
buildLexQuery(query, min, max);
const data = await module.client.collection('objects').find(query, { projection: { _id: 0, _key: 0, score: 0 } })
const data = await module.client.collection('objects').find(query, { projection: { _id: 0, value: 1 } })
.sort({ value: sort })
.skip(start)
.limit(count === -1 ? 0 : count)