Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c63ec4b

Browse files
committedOct 15, 2020
revert search by name/description to use match instead of fuzzy
1 parent 7e1f3f1 commit c63ec4b

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed
 

‎src/services/ChallengeService.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -196,22 +196,10 @@ async function searchChallenges (currentUser, criteria) {
196196
}
197197

198198
if (criteria.name) {
199-
boolQuery.push({
200-
multi_match: {
201-
query: _.toLower(criteria.name),
202-
fields: ['name'],
203-
fuzziness: 'AUTO'
204-
}
205-
})
199+
boolQuery.push({ match: { 'name': criteria.name } })
206200
}
207201
if (criteria.description) {
208-
boolQuery.push({
209-
multi_match: {
210-
query: _.toLower(criteria.description),
211-
fields: ['description'],
212-
fuzziness: 'AUTO'
213-
}
214-
})
202+
boolQuery.push({ match: { 'description': criteria.description } })
215203
}
216204

217205
if (criteria.forumId) {

0 commit comments

Comments
 (0)
Please sign in to comment.