public function createIndexNameFromIdentifier($indexIdentifier, $store)
{
/*
* Generate the suffix of the index name from the current date.
* e.g : Default pattern "{{YYYYMMdd}}_{{HHmmss}}" is converted to "20160221-123421".
*/
$indiceNameSuffix = $this->getIndicesSettingsConfigParam('indices_pattern');
$currentDate = new \Zend_Date();
// Parse pattern to extract datetime tokens.
$matches = [];
preg_match_all('/{{([\\w]*)}}/', $indiceNameSuffix, $matches);
foreach (array_combine($matches[0], $matches[1]) as $k => $v) {
// Replace tokens (UTC date used).
$indiceNameSuffix = str_replace($k, $currentDate->toString($v), $indiceNameSuffix);
}
return sprintf('%s_%s', $this->getIndexAliasFromIdentifier($indexIdentifier, $store), $indiceNameSuffix);
}