Skip to content

Commit b7f1465

Browse files
committed
use filter instead of must in bool query
1 parent 5a76e3c commit b7f1465

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/routes/projects/list.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ const parseElasticSearchCriteria = (criteria, fields, order) => {
220220
const body = { query: { } };
221221
if (boolQuery.length > 0) {
222222
body.query.bool = {
223-
must: boolQuery,
223+
filter: boolQuery,
224224
};
225225
}
226226
if (fullTextQuery) {
@@ -252,6 +252,7 @@ const retrieveProjects = (req, criteria, sort, ffields) => {
252252
}
253253

254254
const searchCriteria = parseElasticSearchCriteria(criteria, fields, order);
255+
req.log.info(searchCriteria);
255256

256257
return new Promise((accept, reject) => {
257258
const es = util.getElasticSearchClient();

0 commit comments

Comments
 (0)