You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"reason": "Field price is indexed with 2 bytes per dimension, but org.opensearch.index.fielddata.fieldcomparator.FloatValuesComparatorSource$1@37f62528 expected 4"
To Reproduce
Create a Index with the following mapping -
Describe the bug
As a part of this PR #8168, we introduced sort optimization (BKD point based) for all custom comparators.
But this seems didnt work well for
half_float
.half_float
indexes with2
bytes https://github.com/apache/lucene/blob/main/lucene/sandbox/src/java/org/apache/lucene/sandbox/document/HalfFloatPoint.java#L61. But during sort, we use FloatValuesSourceComparator https://github.com/gashutos/OpenSearch/blob/main/server/src/main/java/org/opensearch/index/fielddata/fieldcomparator/FloatValuesComparatorSource.java which uses FloatComparator.FloatComparator
tries to go with4
bytesize and hence, sort query onhalf_float
fails with below error.To Reproduce
Create a Index with the following mapping -
Ingest a sample document which is in the valid range as per the documentation -
Now try to search and perform the below query -
The following error would be visible for the domain with the latest patch -
The text was updated successfully, but these errors were encountered: