Skip to content

Commit 3a33acd

Browse files
committed
ACP2E-2885: Products graphql returned disabled categories in the category aggregations
1 parent dc9a629 commit 3a33acd

File tree

1 file changed

+3
-1
lines changed
  • app/code/Magento/Elasticsearch/Model/Indexer/Fulltext/Plugin/Category/Product/Action

1 file changed

+3
-1
lines changed

app/code/Magento/Elasticsearch/Model/Indexer/Fulltext/Plugin/Category/Product/Action/Rows.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,13 @@ public function afterExecute(
8585
$productIds[] = $this->getProductIdsFromIndex($indexTable, $entityIds);
8686
}
8787

88-
$productIds = array_merge([], ...$productIds);
88+
$productIds = array_unique(array_merge([], ...$productIds));
8989
if (!empty($productIds)) {
9090
$indexer = $this->indexerRegistry->get(FulltextIndexer::INDEXER_ID);
9191
if ($indexer->isScheduled()) {
9292
$indexer->getView()->getChangelog()->addList($productIds);
93+
} else {
94+
$indexer->reindexList($productIds);
9395
}
9496
}
9597
}

0 commit comments

Comments
 (0)