Skip to content

Commit

Permalink
Merge branch 'alpha' into add-drop-schema
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgibs committed Sep 17, 2024
2 parents 9dc070f + 139254b commit 799a282
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 799a282

Please sign in to comment.