Skip to content

Commit 3aa69d8

Browse files
author
James Cori
committed
Merge branch 'develop'
2 parents 079c35d + 1491be0 commit 3aa69d8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/services/ChallengeService.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,13 @@ async function searchChallenges (currentUser, criteria) {
215215
})
216216
} else {
217217
if (criteria.name) {
218-
// boolQuery.push({ wildcard: { 'name': `*${criteria.name}*` } })
219-
boolQuery.push({ match_phrase_prefix: { 'name': criteria.name } })
218+
boolQuery.push({ bool: {
219+
should: [
220+
{ wildcard: { name: `*${criteria.name}*` } },
221+
{ wildcard: { name: `${criteria.name}*` } },
222+
{ wildcard: { name: `*${criteria.name}` } }
223+
]
224+
} })
220225
}
221226

222227
if (criteria.description) {

0 commit comments

Comments
 (0)