Fix type of returned sort values.

Original Pull Request #2786
Closes #2777

(cherry picked from commit 3833975a1ad76ef9c90b1260b090ff1eb9af523c)
(cherry picked from commit 0fb98eda39532ba1091a27a6acffe732c27d846f)
This commit is contained in:
Peter-Josef Meisch 2023-11-30 20:29:34 +01:00
parent c9fe8a29b9
commit b775357524
No known key found for this signature in database
GPG Key ID: DE108246970C7708

View File

@ -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());
}