Skip to content

Commit

Permalink
Ignore categories having a level lower than or equal to 1 when reinde…
Browse files Browse the repository at this point in the history
…xing.
  • Loading branch information
romainruaud committed Jun 3, 2016
1 parent f675b86 commit 89d22f2
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ public function aroundReindex(
) {
$proceed();

$categoryIndexer = $this->indexerRegistry->get(\Smile\ElasticSuiteCatalog\Model\Category\Indexer\Fulltext::INDEXER_ID);

$categoryIndexer->reindexRow($subject->getId());
if ($subject->getLevel() > 1) {
$categoryIndexer = $this->indexerRegistry->get(\Smile\ElasticSuiteCatalog\Model\Category\Indexer\Fulltext::INDEXER_ID);
$categoryIndexer->reindexRow($subject->getId());
}

return;
}
Expand Down

0 comments on commit 89d22f2

Please sign in to comment.