Skip to content

Commit c011176

Browse files
committed
fix
Signed-off-by: panguixin <[email protected]>
1 parent 219f48d commit c011176

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/src/main/java/org/opensearch/action/search/SearchPhaseController.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,11 +623,12 @@ private static Sort createSort(TopFieldDocs[] topFieldDocs) {
623623
SortField.Type sortType = getSortType(sortField);
624624
if (SortedWiderNumericSortField.isTypeSupported(sortType) == false) {
625625
// throw exception if sortType is not CUSTOM?
626+
// skip this shard or do not widen?
626627
requireWiden = false;
627628
break;
628629
}
629-
requireWiden = sortType != firstType;
630-
isFloat = sortType == SortField.Type.FLOAT || sortType == SortField.Type.DOUBLE;
630+
requireWiden = requireWiden || sortType != firstType;
631+
isFloat = isFloat || sortType == SortField.Type.FLOAT || sortType == SortField.Type.DOUBLE;
631632
}
632633

633634
if (requireWiden) {

0 commit comments

Comments
 (0)