diff --git a/app/code/Magento/Elasticsearch/Model/Adapter/BatchDataMapper/ProductDataMapper.php b/app/code/Magento/Elasticsearch/Model/Adapter/BatchDataMapper/ProductDataMapper.php index c1772086d7ba3..719250a44fd04 100644 --- a/app/code/Magento/Elasticsearch/Model/Adapter/BatchDataMapper/ProductDataMapper.php +++ b/app/code/Magento/Elasticsearch/Model/Adapter/BatchDataMapper/ProductDataMapper.php @@ -6,14 +6,14 @@ namespace Magento\Elasticsearch\Model\Adapter\BatchDataMapper; +use Magento\AdvancedSearch\Model\Adapter\DataMapper\AdditionalFieldsProviderInterface; use Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider; +use Magento\Eav\Api\Data\AttributeOptionInterface; use Magento\Eav\Model\Entity\Attribute; +use Magento\Elasticsearch\Model\Adapter\BatchDataMapperInterface; use Magento\Elasticsearch\Model\Adapter\Document\Builder; use Magento\Elasticsearch\Model\Adapter\FieldMapperInterface; -use Magento\Elasticsearch\Model\Adapter\BatchDataMapperInterface; use Magento\Elasticsearch\Model\Adapter\FieldType\Date as DateFieldType; -use Magento\AdvancedSearch\Model\Adapter\DataMapper\AdditionalFieldsProviderInterface; -use Magento\Eav\Api\Data\AttributeOptionInterface; /** * Map product index data to search engine metadata @@ -297,7 +297,7 @@ private function prepareAttributeValues( if (in_array($attribute->getFrontendInput(), $this->filterableAttributeTypes)) { $attributeValues = array_map( function (string $valueId) { - return (int)$valueId; + return is_numeric($valueId) ? (int)$valueId : $valueId; }, $attributeValues );