Esempio n. 1
0
 /**
  * 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));
     }
 }
Esempio n. 2
0
 /**
  * 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]);
 }
Esempio n. 3
0
 /**
  * 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));
 }