Open mad-pf opened 1 year ago
Pinging @elastic/es-search (Team:Search)
This also affects the sort
when the field is multi-valued (array), as by default the sort mode is by max
, so then this exception will be triggered when setting the field type to icu_collation_keyword
.
Pinging @elastic/es-search-foundations (Team:Search Foundations)
Elasticsearch Version
8.9.2
Installed Plugins
analysis-icu
Java Version
bundled
OS Version
as shipped in docker.elastic.co/elasticsearch/elasticsearch:8.9.2; Linux kernel 6.4
Problem Description
Getting the sort value of some simple text values (such as "Q" or "W") in a painless script results in an
array_index_out_of_bounds_exception
while the same request has no issues with other values such as "A" or "QQ".Seems to work fine on ES 7.17, but is also broken on ES 8.5.
analysis-icu
plugin is required to reproduce the problem.Steps to Reproduce
The following script creates a simple index, adds two objects and searches for these objects with
script_fields
. For the first object, it works fine, for the second object, an error is returned:Result for the first object, no problem:
Result for the second object, the error:
Logs (if relevant)
No response