src/Index/AliasProcessor.php
private function deleteIndex(Client $client, $indexName)
    {
        try {
            $path = sprintf('%s', $indexName);
            $client->request($path, Request::DELETE);
        } catch (ExceptionInterface $deleteOldIndexException) {
            throw new \RuntimeException(sprintf(
                'Failed to delete index %s with message: %s',
                $indexName,
                $deleteOldIndexException->getMessage()
            ), 0, $deleteOldIndexException);
        }
    }
private function deleteIndex(Client $client, $indexName)
    {
        try {
            $path = sprintf('%s', $indexName);
            $client->request($path, Request::DELETE);
        } catch (ExceptionInterface $deleteOldIndexException) {
            throw new \RuntimeException(sprintf(
                'Failed to delete index %s with message: %s',
                $indexName,
                $deleteOldIndexException->getMessage()
            ), 0, $deleteOldIndexException);
        }
    }
Delete an index.

@param Client $client
@param string $indexName Index name to delete