I have mapped my product/category titles to search_as_you_type fields. When I try to sort by those fields I get this error:
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Fielddata is not supported on field [name] of type [search_as_you_type]"
}
],
I tried creating a keyword subfield of search_as_you_type field but it would not stick, then I found a Github issue which proposes creating a text field with two subfields(search_as_you_type and keyword) and that seems to go with ES.
So this is my workaround for now, thanks.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.