Skip to content

Search by skill IDs #706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make sure the query is singular
  • Loading branch information
jmgasper committed Dec 22, 2023
commit c2283f0918f84155a8b32553aae506eed71b70d1
13 changes: 6 additions & 7 deletions src/services/ChallengeService.js
Original file line number Diff line number Diff line change
Expand Up @@ -599,14 +599,13 @@ async function searchChallenges(currentUser, criteria) {
const matchPhrase = {};
matchPhrase[`skills.id`] = `${skillId}`;
skillQuery.push({"match_phrase":matchPhrase})

boolQuery.push({
bool:{
should:skillQuery,
minimum_should_match: 1
}
})
}
boolQuery.push({
bool:{
should:skillQuery,
minimum_should_match: 1
}
})
logger.debug(`Skill ID Query: ${JSON.stringify(boolQuery)}`)
} else {
logger.debug("No skill IDs sent for searching")
Expand Down