Skip to content

Commit

Permalink
Merge pull request #1671 from alliance-genome/Match_query_change
Browse files Browse the repository at this point in the history
Change in BaseSQLDAO
  • Loading branch information
VarunReddy1111 committed Sep 17, 2024
2 parents 76bd070 + 15f2ec5 commit 139254b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -480,15 +480,17 @@ public SearchResponse<E> searchByParams(Pagination pagination, Map<String, Objec
BooleanPredicateClausesStep<?> clause = p.bool();
if (useKeywordFields != null && useKeywordFields) {
clause.should(p.match().field(field + "_keyword").matching(searchFilters.get(filterName).get(field).get("queryString").toString()).boost(boost + 500));
} else {
clause.should(p.match().field(field).matching(searchFilters.get(filterName).get(field).get("queryString").toString()).boost(boost));
}
clause.should(p.match().field(field).matching(searchFilters.get(filterName).get(field).get("queryString").toString()).boost(boost));
q.should(clause);
} else { // assume simple query
BooleanPredicateClausesStep<?> clause = p.bool();
if (useKeywordFields != null && useKeywordFields) {
clause.should(p.simpleQueryString().fields(field + "_keyword").matching(searchFilters.get(filterName).get(field).get("queryString").toString()).defaultOperator(booleanOperator).boost(boost + 500));
} else {
clause.should(p.simpleQueryString().fields(field).matching(searchFilters.get(filterName).get(field).get("queryString").toString()).defaultOperator(booleanOperator).boost(boost));
}
clause.should(p.simpleQueryString().fields(field).matching(searchFilters.get(filterName).get(field).get("queryString").toString()).defaultOperator(booleanOperator).boost(boost));
q.should(clause);
}
innerBoost--;
Expand Down

0 comments on commit 139254b

Please sign in to comment.