Skip to content

Fix up the sortBy parameter - (Top 2364) #727

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

Merged
merged 7 commits into from
Jul 30, 2024
Merged
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
Remove logging of ES query
  • Loading branch information
jmgasper committed Jul 30, 2024
commit a7f5de49d57ed597536cedf081bff8b023263ade
12 changes: 5 additions & 7 deletions src/services/ChallengeService.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,11 +460,11 @@ async function searchChallenges(currentUser, criteria) {

// Add '.keyword' to the end of the sort by prop for certain fields
// (TOP-2364)
if(sortByProp === "updatedBy" ||
sortByProp === "createdBy" ||
sortByProp === "name" ||
sortByProp === "type" ||
sortByProp === "status") {
if(sortByProp == "updatedBy" ||
sortByProp == "createdBy" ||
sortByProp == "name" ||
sortByProp == "type" ||
sortByProp == "status") {

sortByProp = sortByProp + ".keyword";
}
Expand Down Expand Up @@ -717,8 +717,6 @@ async function searchChallenges(currentUser, criteria) {
},
};

logger.info(`ES QUERY:${JSON.stringify(esQuery)}`);

// Search with constructed query
let docs;
try {
Expand Down