From 7c8943fddce5f21b101b3ea2654a578097c94ff1 Mon Sep 17 00:00:00 2001 From: Sergio Vera Date: Thu, 25 Jun 2020 09:59:45 +0200 Subject: [PATCH] MC-25043: Layered Navigation does not return "No" option for boolean attributes when using elasticsearch - Take into account also type when comparing against empty string --- .../Model/Indexer/Fulltext/Action/DataProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/DataProvider.php b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/DataProvider.php index 360df8f4edc66..ffa7dfd80df0c 100644 --- a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/DataProvider.php +++ b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/DataProvider.php @@ -572,7 +572,7 @@ public function prepareProductIndex($indexData, $productData, $storeId) foreach ($indexData as $entityId => $attributeData) { foreach ($attributeData as $attributeId => $attributeValues) { $value = $this->getAttributeValue($attributeId, $attributeValues, $storeId); - if ($value !== null && $value !== false && $value != '') { + if ($value !== null && $value !== false && $value !== '') { if (!isset($index[$attributeId])) { $index[$attributeId] = []; }