Skip to content

Commit b775357

Browse files
committed
Fix type of returned sort values.
Original Pull Request #2786 Closes #2777 (cherry picked from commit 3833975) (cherry picked from commit 0fb98ed)
1 parent c9fe8a2 commit b775357

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/springframework/data/elasticsearch/client/elc/DocumentAdapters.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public static SearchDocument from(Hit<?> hit, JsonpMapper jsonpMapper) {
138138
document.setPrimaryTerm(hit.primaryTerm() != null && hit.primaryTerm() > 0 ? hit.primaryTerm() : 0);
139139

140140
float score = hit.score() != null ? hit.score().floatValue() : Float.NaN;
141-
return new SearchDocumentAdapter(document, score, hit.sort().stream().map(TypeUtils::toString).toArray(),
141+
return new SearchDocumentAdapter(document, score, hit.sort().stream().map(TypeUtils::toObject).toArray(),
142142
documentFields, highlightFields, innerHits, nestedMetaData, explanation, matchedQueries, hit.routing());
143143
}
144144

0 commit comments

Comments
 (0)