MDVA-30284 Patch: Elasticsearch 7 - Limit of total fields [XXXXX] in index has been exceeded
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 Quality Patches Tool (QPT) v.1.0.5 is installed. The patch ID is MDVA-30284.
Affected products and versions
- The patch was designed for Adobe Commerce on cloud infrastructure 2.3.5-p2
- Elasticsearch 7 is compatible with Adobe Commerce 2.3.5 and 2.4.x
magento/quality-patches
package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.Issue
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:
Prerequisites
- 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.
Expected result:
All products are available in the Elasticsearch index.
Actual result:
-
Elasticsearch error:
code language-none {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Limit of total fields [3000] in index [magento2_product_2_v11] has been exceeded"}],"type":"illegal_argument_exception","reason":"Limit of total fields [3000] 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 deployment method:
- Adobe Commerce or Magento Open Source on-premises: Software Update Guide > Apply Patches in our developer documentation.
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in our developer documentation.
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool released: a new tool to self-serve quality patches in our support knowledge base.
- Check if patch is available for your Adobe Commerce issue using Quality Patches Tool in our support knowledge base.
For info about other patches available in QPT, refer to Patches available in QPT in our developer documentation.