The MDVA-30284 patch solves the issue where you receive an error message that "Limit of total fields [XXXXX] in index has been exceeded" when using Elasticsearch 7. This patch is available when the Magento Quality Patch (MQP) tool v.1.0.5 is installed.
Affected products and versions
- The patch was designed for Magento Commerce Cloud 2.3.5-p2.
- The patch is also compatible with Magento Commerce and Magento Commerce Cloud 2.3.0 - 2.4.1.
Note: the patch can be applicable to other versions. To check if the patch is compatible with your Magento version, run
- Elasticsearch 7 is only compatible with Magento 2.3.5 and 2.4.x.
The Elasticsearch fields limit is wrong resulting in the following error when executing [catalogsearch_fulltext ] indexer:
Limit of total fields [xxx] in index [xxxxxx] has been exceeded
This issue occurs when you have a large number of product attributes. The issue is triggered by the way Elasticsearch calculates the field count. Sometimes when there are attributes that have fields assigned to them these fields will index as separate indexers. This results in the limit having been exceeded warning.
Steps to reproduce:
- Installed module-elasticsearch 100.3.5.
- Elasticsearch 7 installed.
- Set up Elasticsearch as a search backend.
- Create more than 1000 attributes for products.
- Create products for each family.
- Run indexer.
All products are available in the Elasticsearch index.
- Elasticsearch error:
of total fields  in index [magento2_product_2_v11] has been exceeded"}],"type":"illegal_argument_exception","reason":"Limit
of total fields  in index [magento2_product_2_v11] has been exceeded"},"status":400}
- New product was not indexed.
Apply the patch
To apply individual patches use the following links depending on your Magento product:
- Magento Commerce: DevDocs Apply patches using Magento Quality Patches Tool.
- Magento Commerce Cloud: DevDocs Upgrades and Patches > Apply patches.
To learn more about Magento Quality Patches, refer to:
- Magento Quality Patches released: a new tool to self-serve quality patches.
- Check if patch is available for your Magento issue using Magento Quality Patches.
For info about other patches available in MQP tool, refer to the Patches available in MQP tool section.