File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
app/code/Magento/Elasticsearch/Model/Indexer/Fulltext/Plugin/Category/Product/Action Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -77,12 +77,16 @@ public function afterExecute(
7777 ): ActionRows {
7878 $ indexer = $ this ->indexerRegistry ->get (FulltextIndexer::INDEXER_ID );
7979 if (!empty ($ entityIds ) && $ indexer ->isScheduled ()) {
80+ $ productIds = [];
81+
8082 foreach ($ this ->storeManager ->getStores () as $ store ) {
8183 $ indexTable = $ this ->getIndexTable ((int ) $ store ->getId (), $ useTempTable );
82- $ productIds = $ this ->getProductIdsFromIndex ($ indexTable , $ entityIds );
83- if (!empty ($ productIds )) {
84- $ indexer ->reindexList ($ productIds );
85- }
84+ $ productIds [] = $ this ->getProductIdsFromIndex ($ indexTable , $ entityIds );
85+ }
86+
87+ $ productIds = array_merge ([], ...$ productIds );
88+ if (!empty ($ productIds )) {
89+ $ indexer ->reindexList (array_unique ($ productIds ));
8690 }
8791 }
8892
You can’t perform that action at this time.
0 commit comments