0

We face the following issue on our Magento 2.4 store with Elasticsearch 7 and more than 7000 attributes:

Catalog Search indexer process unknown error:
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Limit of total fields [9165] in index [product_1_v2] has been exceeded"}],"type":"illegal_argument_exception","reason":"Limit of total fields [9165] in index [product_1_v2] has been exceeded"},"status":400}

How can we solve this or limit the total fields of index product_1_v2? Or does anyone know what create these fields in index [product_1_v2], so that we can check if we can reduce them.

I guess it is caused by a specific product or attribute. Is there a way to create some sort of logging, to log the specific product or attribute that is creating this error?

See also: https://github.com/magento/magento2/issues/28454

Is there a way to create a script or log, that shows all products that exceed these total files of 9169?

EDIT:

Seems that Magento has created a patch for the Cloud and Commerce version; https://support.magento.com/hc/en-us/articles/360050423891-MDVA-30284-Magento-Patch-Elasticsearch-7-Limit-of-total-fields-XXXXX-in-index-has-been-exceeded

That solved the issue.

2
  • do you use native magento elasticsearch module? or any smilesuite elasticsearch or any other third party module? share products custom option screenshot in the question. – MageSoftech Aug 3 '20 at 10:50
  • @MageSoftech We use the native Magento Elasticsearch module. The custom product option did not solve it completely, to problem seems to be back again... – JGeer Aug 3 '20 at 12:39
4

Elasticsearch variable - index.mapping.total_fields.limit

The maximum number of fields in an index. Field and object mappings, as well as field aliases count towards this limit. The default value is 1000.

Here the link of another discussion for setting the limit and test on your own: https://stackoverflow.com/questions/55372330/what-does-limit-of-total-fields-1000-in-index-has-been-exceeded-means-in Please check the elastic configuration because this kind of problems are always given by the configuration that was made with little awareness.

Cheers

9
  • Thanks Riccardo! So this is due to a Elastic configuration, nothing inside M2 that we need/can change to solve this? – JGeer Jul 30 '20 at 15:12
  • These types of errors hardly depend on Magento2. Often there are conflicts between the versions of elasticsearch and the modules that use it inside Magento2 (example: elasticsuite). Check the version of elasticsearch and the compatibility with your Magento2 version and with the installed modules that request it. Then change the value to the variable I linked to above – Riccardo Ugolini Jul 31 '20 at 7:03
  • Seems to be related to maybe a specific product. Is there a way to write a logging, to find the specific problem? – JGeer Jul 31 '20 at 10:33
  • Have you tryed to search here '/var/log/elasticsearch'? Maybe using a grep like: grep -nri 'string' '/var/log/elasticsearch' @JGeer – Riccardo Ugolini Jul 31 '20 at 12:21
  • Thanks! But I can not find any log there? Is there a log from Elastichsearch where we can find this issue? Or will it be logged into the magento log? @RiccardoUgolini – JGeer Aug 1 '20 at 9:04
0

Seems that Magento has created a patch for the Cloud and Commerce version; https://support.magento.com/hc/en-us/articles/360050423891-MDVA-30284-Magento-Patch-Elasticsearch-7-Limit-of-total-fields-XXXXX-in-index-has-been-exceeded

That solved the issue.

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.