public function createIndex($indexIdentifier, $store)
{
$index = $this->initIndex($indexIdentifier, $store, false);
$indexSettings = ['settings' => $this->indexSettings->getCreateIndexSettings()];
$indexSettings['settings']['analysis'] = $this->indexSettings->getAnalysisSettings($store);
foreach ($index->getTypes() as $currentType) {
$indexSettings['mappings'][$currentType->getName()] = $currentType->getMapping()->asArray();
}
$this->client->indices()->create(['index' => $index->getName(), 'body' => $indexSettings]);
return $index;
}