protected processFullTextIndex ( mixed $ids ) | ||
$ids | mixed | The product ids to reindex |
protected function processFullTextIndex($ids)
{
$fullTextIndexer = $this->indexerRegistry->get(\Magento\CatalogSearch\Model\Indexer\Fulltext::INDEXER_ID);
if (!is_array($ids)) {
$ids = [$ids];
}
$parentIds = $this->fullIndexer->getRelationsByChild($ids);
$processIds = $parentIds ? array_merge($parentIds, $ids) : $ids;
if (!$fullTextIndexer->isScheduled()) {
if (!empty($processIds)) {
$fullTextIndexer->reindexList($processIds);
}
}
}