diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Engine.php b/app/code/Magento/CatalogSearch/Model/Resource/Engine.php index 8fb3a099d233d..e5409d9f5e9e9 100644 --- a/app/code/Magento/CatalogSearch/Model/Resource/Engine.php +++ b/app/code/Magento/CatalogSearch/Model/Resource/Engine.php @@ -193,6 +193,11 @@ public function cleanIndex($storeId = null, $entityId = null, $entity = 'product { $where = []; + if ($storeId !== null) { + $where[] = $this->_getWriteAdapter() + ->quoteInto('store_id=?', $storeId); + } + if ($entityId !== null) { $where[] = $this->_getWriteAdapter() ->quoteInto('product_id IN (?)', $entityId);