1
0
mirror of synced 2026-07-07 02:30:01 +00:00

Fix type of returned sort values.

Original Pull Request #2786
Closes #2777

(cherry picked from commit 3833975a1a)
(cherry picked from commit 0fb98eda39)
This commit is contained in:
Peter-Josef Meisch
2023-11-30 20:29:34 +01:00
parent c9fe8a29b9
commit b775357524
@@ -138,7 +138,7 @@ final class DocumentAdapters {
document.setPrimaryTerm(hit.primaryTerm() != null && hit.primaryTerm() > 0 ? hit.primaryTerm() : 0);
float score = hit.score() != null ? hit.score().floatValue() : Float.NaN;
return new SearchDocumentAdapter(document, score, hit.sort().stream().map(TypeUtils::toString).toArray(),
return new SearchDocumentAdapter(document, score, hit.sort().stream().map(TypeUtils::toObject).toArray(),
documentFields, highlightFields, innerHits, nestedMetaData, explanation, matchedQueries, hit.routing());
}