/** * Execute full indexation * * @return void */ public function executeFull() { $storeIds = array_keys($this->storeManager->getStores()); foreach ($storeIds as $storeId) { $dimension = $this->dimensionFactory->create(['name' => 'scope', 'value' => $storeId]); $this->indexerHandler->cleanIndex([$dimension]); $this->indexerHandler->saveIndex([$dimension], $this->fullAction->rebuildStoreIndex($storeId)); } }
/** * Clean search index data for store * * @param int $storeId * @return void */ protected function cleanIndex($storeId) { $dimension = $this->dimensionFactory->create(['name' => self::SCOPE_FIELD_NAME, 'value' => $storeId]); $this->indexHandler->cleanIndex([$dimension]); }
/** * Delete search index data for store * * @param int $storeId Store View Id * @param array $productIds Product Entity Id * @return void */ protected function deleteIndex($storeId = null, $productIds = null) { $dimension = $this->dimensionFactory->create(['name' => self::SCOPE_FIELD_NAME, 'value' => $storeId]); $this->indexHandler->deleteIndex([$dimension], $this->getIterator($productIds)); }