Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: panguixin <[email protected]>
  • Loading branch information
bugmakerrrrrr committed Dec 19, 2024
1 parent 219f48d commit c011176
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -623,11 +623,12 @@ private static Sort createSort(TopFieldDocs[] topFieldDocs) {
SortField.Type sortType = getSortType(sortField);
if (SortedWiderNumericSortField.isTypeSupported(sortType) == false) {
// throw exception if sortType is not CUSTOM?
// skip this shard or do not widen?
requireWiden = false;
break;

Check warning on line 628 in server/src/main/java/org/opensearch/action/search/SearchPhaseController.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/org/opensearch/action/search/SearchPhaseController.java#L627-L628

Added lines #L627 - L628 were not covered by tests
}
requireWiden = sortType != firstType;
isFloat = sortType == SortField.Type.FLOAT || sortType == SortField.Type.DOUBLE;
requireWiden = requireWiden || sortType != firstType;
isFloat = isFloat || sortType == SortField.Type.FLOAT || sortType == SortField.Type.DOUBLE;
}

if (requireWiden) {
Expand Down

0 comments on commit c011176

Please sign in to comment.