Solved: Magento 2.4.x Elastic Search Error: Text Fields are Not Optimised for Operations

Hello Magento pals πŸ˜ƒ

Ever faced an error in Magento that says: “Text Fields are Not Optimised for Operations”?

Magento continuously releases regular updates that add amazing features and enhance the store’s performance. However, sometimes these upgrades also come with some technical bugs that can hamper the store’s performance. One such elastic search bug in the Magento 2.4 release line is causing issues on the product category page. Many of the store owners reported that the products aren’t loaded on the category page and the following error in the exception.log file is generated:

“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.”

In this blog post, I will provide a complete solution to solve this issue in Magento 2.4.x.

Method to Solve Magento 2.4.x Elastic Search Error: Text Fields are Not Optimised for Operations

In Magento 2.4.x, the product listing issue on the category page or the ‘Text fields are not optimised for operations’ error is caused when a varchar or text field is set to filterable in elastic search. This can be solved by finding the error-causing attribute and disabling the filterable in search for that attribute.

You can run the following query to find those attributes:

Running the above query will list down all the varchar attributes that are set to ‘filterable in search’.

Once you find the attributes that are causing the ‘Text Fields are Not Optimized for Operations’ issue, you can disable them using the following query:

That’s it.

If you have any doubts or queries, please feel free to comment. I’d be happy to help you. πŸ˜‡

Also, I’d be grateful if you could share the solution with the Magento community via social media. 😊

Thank you. πŸ€

4.7
(based on 12 Reviews)
Solved: Magento 2.4.x Elastic Search Error: Text Fields are Not Optimised for Operations

Kishor Chhugani

He is a Magento developer at Meetanshi with a jolly, extrovert, & friendly personality. He loves playing cricket and is a passionate foodie!

Leave a Reply

Your email address will not be published.