From c930b512f6ba2745b85555104557b147c05322c5 Mon Sep 17 00:00:00 2001 From: Jan Petr Date: Tue, 27 Dec 2016 12:48:03 +0100 Subject: [PATCH] Don't create replica indices when InstantSearch is disabled --- Helper/Entity/ProductHelper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Helper/Entity/ProductHelper.php b/Helper/Entity/ProductHelper.php index d554d1ad1..02207eb13 100755 --- a/Helper/Entity/ProductHelper.php +++ b/Helper/Entity/ProductHelper.php @@ -233,9 +233,10 @@ public function setSettings($storeId, $saveToTmpIndicesToo = false) /* * Handle Slaves */ + $isInstantSearchEnabled = (bool) $this->config->isInstantEnabled($storeId); $sorting_indices = $this->config->getSortingIndices($storeId); - if (count($sorting_indices) > 0) { + if ($isInstantSearchEnabled === true && count($sorting_indices) > 0) { $slaves = []; foreach ($sorting_indices as $values) {