private function closeIndex(Client $client, $indexName)
    {
        try {
            $path = sprintf('%s/_close', $indexName);
            $client->request($path, Request::POST);
        } catch (ExceptionInterface $e) {
            throw new \RuntimeException(
                sprintf(
                    'Failed to close index %s with message: %s',
                    $indexName,
                    $e->getMessage()
                ),
                0,
                $e
            );
        }
    }
private function closeIndex(Client $client, $indexName)
    {
        try {
            $path = sprintf('%s/_close', $indexName);
            $client->request($path, Request::POST);
        } catch (ExceptionInterface $e) {
            throw new \RuntimeException(
                sprintf(
                    'Failed to close index %s with message: %s',
                    $indexName,
                    $e->getMessage()
                ),
                0,
                $e
            );
        }
    }
private function closeIndex ( Client $ client , $ indexName ) { try { $ path = sprintf ( '%s/_close' , $ indexName ) ; $ client -> request ( $ path , Request :: POST ) ; } catch ( ExceptionInterface $ e ) { throw new \ RuntimeException ( sprintf ( 'Failed to close index %s with message: %s' , $ indexName , $ e -> getMessage ( ) ) , 0 , $ e ) ; } }
Close an index.

@param Client $client
@param string $indexName
Close an index .