/** * Process full-text reindex for product ids * * @param mixed $ids 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); } } }
/** * Load a bulk of product data. * * @param int $storeId Store id. * @param string $productIds Product ids filter. * * @return array */ private function getSearchableProducts($storeId, $productIds = null) { return $this->resourceModel->getSearchableProducts($storeId, $productIds); }
/** * Load a bulk of product data. * * @param int $storeId Store id. * @param string $categoryIds Category ids filter. * @param integer $fromId Load product with id greater than. * @param integer $limit Number of product to get loaded. * * @return array */ private function getSearchableCategories($storeId, $categoryIds = null, $fromId = 0, $limit = 100) { return $this->resourceModel->getSearchableCategories($storeId, $categoryIds, $fromId, $limit); }