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