attributes property is an object like this
{ title : '', 'description' }
I want to sort in the title . But it show the error that I need to enable fielddata of titile.
I have changed the config mapping many time but it's not working.
I used basemkhirat/elasticsearch package to connect to elasticsearch serve.
Does anyone have any idea to solve this case?
Please help me. Sorry for my English
Thank you .
Thank you for your reply. Actually my attributes item is object contain some properties like that 'attributes' : { 'tittle' : '', 'des': '' }
I thought i need to change the mapping config , push the attribute properties inside the attribute like this:
If i remove the fileddata => true I can't sort for title or des it always show error that I need to enable fielddata
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [title] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"item_index","node":"a3gMQwzKRZutgHZI7qC4bA","reason":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [title] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory."}}],"caused_by":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [title] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory."}},"status":400}
In other point please note that in earlier versions, the artisan command php artisan es:indices:create & php artisan es:indices:update were linked with properties key directly so such as _all key and other keys out of properties key scope caused errors and not worked
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.