diff -Nuar a/vendor/magento/module-elasticsearch/Model/Adapter/Elasticsearch.php b/vendor/magento/module-elasticsearch/Model/Adapter/Elasticsearch.php index fa193d86c03..3c347ff9f4d 100644 --- a/vendor/magento/module-elasticsearch/Model/Adapter/Elasticsearch.php +++ b/vendor/magento/module-elasticsearch/Model/Adapter/Elasticsearch.php @@ -380,6 +380,12 @@ class Elasticsearch */ private function getMappingTotalFieldsLimit(array $allAttributeTypes): int { - return count($allAttributeTypes) + self::MAPPING_TOTAL_FIELDS_BUFFER_LIMIT; + $count = count($allAttributeTypes); + foreach ($allAttributeTypes as $attributeType) { + if (isset($attributeType['fields'])) { + $count += count($attributeType['fields']); + } + } + return $count + self::MAPPING_TOTAL_FIELDS_BUFFER_LIMIT; } }