return $errors;
} private function createAliasIfNotExisting(string
$index, string
$alias): void
{ if ($this->client->
indices()->
existsAlias(['name' =>
$alias])) { return;
} $this->
putAlias($index,
$alias);
} /**
* @param array<string, string> $indices
*/
private function swapAlias(array
$indices): void
{ foreach ($indices as $alias =>
$index) { if (!
$this->client->
indices()->
existsAlias(['name' =>
$alias])) { $this->
putAlias($index,
$alias);