1

Following Error logs in exception.log file:

main.CRITICAL: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [gift_price] in order to load field data by uninverting the inverted index. Note that this can use significant memory."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"toplinem2_product_5_v19","node":"_emcfzugRbWjAjzCgv265Q"

2

on Investigation came to know this issue is due to upgrade process. Some product attributes which are text/varchar set to be filerable in search. like for me gift_price mentioned in above error. So you need to search those in your DB and change their statuses. I use the following queries to fix those issues:

First you can find those attributes to look them:

select * from xb_catalog_eav_attribute WHERE is_filterable_in_search = 1 and attribute_id IN (SELECT attribute_id FROM xb_eav_attribute WHERE entity_type_id = 4 AND backend_type = 'varchar')

Then you can run the following query:

UPDATE xb_catalog_eav_attribute 
SET is_filterable_in_search = 0 
WHERE attribute_id IN (SELECT attribute_id FROM xb_eav_attribute WHERE entity_type_id = 4 AND backend_type = 'varchar')

In my case gift_price this attribute is just appearing into error logs so I search this as well by following query:

SELECT * FROM evonomix_toplinem2_local.xb_eav_attribute where attribute_code = "gift_price";

and get its id then run following to mark it non filterable:

UPDATE xb_catalog_eav_attribute SET is_filterable_in_search = 0 WHERE attribute_id IN (695)

Purpose of all this explanation is to give brief on this issue and starting point to debuging for your similar issues.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.