Skip to content

Commit 4e30a53

Browse files
Fix search issue - issue #425
1 parent 4fe35ce commit 4e30a53

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/services/ChallengeService.js

+7
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,13 @@ async function searchChallenges (currentUser, criteria) {
265265
boost: 1
266266
}
267267
})
268+
boolQuery.push({ bool: {
269+
should: [
270+
{ wildcard: { name: `*${criteria.search}*` } },
271+
{ wildcard: { name: `${criteria.search}*` } },
272+
{ wildcard: { name: `*${criteria.search}` } }
273+
]
274+
} })
268275
} else {
269276
if (criteria.name) {
270277
boolQuery.push({ bool: {

0 commit comments

Comments
 (0)