Skip to content

Commit d8b4c18

Browse files
fix metadata query format
1 parent d716e8b commit d8b4c18

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/services/ChallengeService.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,12 @@ async function searchChallenges (currentUser, criteria) {
175175
if (!_.isUndefined(criteria[key])) {
176176
const metaKey = key.split('meta.')[1]
177177
boolQuery.push({
178-
must: [
179-
{ match_phrase: { 'metadata.name': metaKey } },
180-
{ match_phrase: { 'metadata.value': criteria[key] } }
181-
]
178+
bool: {
179+
must: [
180+
{ match_phrase: { 'metadata.name': metaKey } },
181+
{ match_phrase: { 'metadata.value': criteria[key] } }
182+
]
183+
}
182184
})
183185
}
184186
}

0 commit comments

Comments
 (0)