/**
* {@inheritDoc}
*/
public function installIndex(IndexInterface $index, $store)
{
if ($index->needInstall()) {
$indexIdentifier = $index->getIdentifier();
$indexName = $index->getName();
$indexAlias = $this->indexSettings->getIndexAliasFromIdentifier($indexIdentifier, $store);
$this->client->indices()->optimize(['index' => $indexName]);
$this->client->indices()->putSettings(['index' => $indexName, 'body' => $this->indexSettings->getInstallIndexSettings()]);
$this->proceedIndexInstall($indexName, $indexAlias);
}
return $index;
}