$body =
array_merge( $this->config,
['mappings' =>
$mapping] );
$this->client->
indices()->
create([ 'index' =>
$index,
'body' =>
$body,
]);
$this->
createAliasIfNotExisting($index,
$alias);
} /**
* @param array<string, array<array<string, mixed>>> $result
*
* @return array<array{reason: string}|string>
*/
private function parseErrors(array
$result): array
{ $errors =
[];
foreach ($result['items'
] as $item) {