Skip to content

Commit b1ee351

Browse files
wildcard search on name and description
1 parent 3a35685 commit b1ee351

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/ChallengeService.js

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

198198
if (criteria.name) {
199-
boolQuery.push({ match: { name: `.*${criteria.name}.*` } })
199+
boolQuery.push({ wildcard: { name: `*${criteria.name}*` } })
200200
}
201201
if (criteria.description) {
202-
boolQuery.push({ match: { description: `.*${criteria.name}.*` } })
202+
boolQuery.push({ wildcard: { description: `*${criteria.description}*` } })
203203
}
204204
if (criteria.forumId) {
205205
boolQuery.push({ match_phrase: { 'legacy.forumId': criteria.forumId } })

0 commit comments

Comments
 (0)