proceedIndexInstall() публичный Метод

1) First switch the alias to the new index 2) Remove old indices
public proceedIndexInstall ( string $indexName, string $indexAlias ) : void
$indexName string Real index name.
$indexAlias string Index alias (must include store identifier).
Результат void
Пример #1
0
 /**
  * Create the synonyms index for a store id.
  *
  * @param integer  $storeId    Store id.
  * @param string[] $synonyms   Raw synonyms list.
  * @param string[] $expansions Raw expansions list.
  *
  * @return void
  */
 public function reindex($storeId, $synonyms, $expansions)
 {
     $indexIdentifier = ThesaurusIndex::INDEX_IDENTIER;
     $indexName = $this->indexSettingsHelper->createIndexNameFromIdentifier($indexIdentifier, $storeId);
     $indexAlias = $this->indexSettingsHelper->getIndexAliasFromIdentifier($indexIdentifier, $storeId);
     $indexSettings = ['settings' => $this->getIndexSettings($synonyms, $expansions)];
     $this->client->indices()->create(['index' => $indexName, 'body' => $indexSettings]);
     $this->indexManager->proceedIndexInstall($indexName, $indexAlias);
     $this->cacheHelper->cleanIndexCache(ThesaurusIndex::INDEX_IDENTIER, $storeId);
 }