final public function updateIndex(Client $client, string $name): void
    {
        $index = new Index($client, $name);

        foreach ($this->createMappings() as $typeName => $mapping) {
            try {
                $mapping->setType(new Type($index, $typeName));
                $mapping->send();
            } catch (\Throwable $e) {
                if (false !== strpos($e->getMessage(), 'no such index')) {
                    $this->logger->info(
                        sprintf('No index exists yet [%s/%s] in ElasticSearch.  Ignoring.', $name, $typeName)
                    );
                    return;
                }

                throw new EventSearchOperationFailed(
                    sprintf('Failed to put mapping for type [%s/%s] into ElasticSearch.', $name, $typeName),
                    Code::INTERNAL,
                    $e
                );
            }

            $this->logger->info(sprintf('Successfully put mapping for type [%s/%s]', $name, $typeName));
        }

        $this->updateAnalyzers($index, $name);
        $this->updateNormalizers($index, $name);
    }