Skip to content

Commit f2c3270

Browse files
committed
6775 Refactor to use seperate command "reindex_slice" for reindexing slices
1 parent 8acb919 commit f2c3270

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Solr/Indexer/ProductIndexer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ public function reindex($productIds = null, $emptyIndex = false, $restrictToStor
146146
$productIterator = $this->productRepository->getProductsInChunks($storeId, $chunks);
147147
$this->_indexProductCollection($emptyIndex, $productIterator, $storeId, $productIdsToIndex, $associations);
148148

149-
$this->deactivateSwapCore();
149+
if (is_null($productIds) && is_null($sliceId) && $storeConfig->getIndexingConfig()->isSwapCores()) {
150+
$this->deactivateSwapCore();
151+
}
150152
} catch (\Exception $e) {
151153
$this->storeEmulation->stop();
152154
throw $e;

0 commit comments

Comments
 (0)