Skip to content

Commit 91e52f5

Browse files
lowercase the name/description criteria when searching
1 parent b1ee351 commit 91e52f5

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({ wildcard: { name: `*${criteria.name}*` } })
199+
boolQuery.push({ wildcard: { name: `*${_.toLower(criteria.name)}*` } })
200200
}
201201
if (criteria.description) {
202-
boolQuery.push({ wildcard: { description: `*${criteria.description}*` } })
202+
boolQuery.push({ wildcard: { description: `*${_.toLower(criteria.description)}*` } })
203203
}
204204
if (criteria.forumId) {
205205
boolQuery.push({ match_phrase: { 'legacy.forumId': criteria.forumId } })

0 commit comments

Comments
 (0)