Skip to content

Commit

Permalink
Merge pull request #137 from algolia/dont_create_replicas_when_is_is_…
Browse files Browse the repository at this point in the history
…disabled

Don't create replica indices when InstantSearch is disabled
  • Loading branch information
Jan Petr authored Jan 5, 2017
2 parents 3decc6c + c3d3a19 commit 67639af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Helper/Entity/ProductHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,10 @@ public function setSettings($storeId, $saveToTmpIndicesToo = false)
/*
* Handle replicas
*/
$isInstantSearchEnabled = (bool) $this->config->isInstantEnabled($storeId);
$sortingIndices = $this->config->getSortingIndices($storeId);

if (count($sortingIndices) > 0) {
if ($isInstantSearchEnabled === true && count($sortingIndices) > 0) {
$replicas = [];

foreach ($sortingIndices as $values) {
Expand Down

0 comments on commit 67639af

Please sign in to comment.