Skip to content

Commit

Permalink
Merge pull request #110 from romainruaud/fix_categories-scheduled-ind…
Browse files Browse the repository at this point in the history
…exing

Fix categories scheduled indexing
  • Loading branch information
romainruaud authored Sep 14, 2016
2 parents 76d36dc + 959710c commit 2f19598
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ public function aroundReindex(

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

return;
Expand Down
9 changes: 8 additions & 1 deletion src/module-elasticsuite-catalog/etc/mview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
</subscriptions>
</view>
<view id="elasticsuite_categories_fulltext" class="Smile\ElasticsuiteCatalog\Model\Category\Indexer\Fulltext" group="indexer">

<subscriptions>
<table name="catalog_category_entity" entity_column="entity_id" />
<table name="catalog_category_entity_datetime" entity_column="entity_id" />
<table name="catalog_category_entity_decimal" entity_column="entity_id" />
<table name="catalog_category_entity_int" entity_column="entity_id" />
<table name="catalog_category_entity_text" entity_column="entity_id" />
<table name="catalog_category_entity_varchar" entity_column="entity_id" />
</subscriptions>
</view>
</config>

0 comments on commit 2f19598

Please sign in to comment.