private static boolean deleteIndex(RestHighLevelClient client, String indexName) throws IOException {
        DeleteIndexRequest request = new DeleteIndexRequest(indexName);
        AcknowledgedResponse response = client.indices().delete(request, RequestOptions.DEFAULT);
        if (!response.isAcknowledged()) {
            logger.error("Failed to delete index " + indexName + ": " + "response was not acknowledged", new Exception()); //$NON-NLS-1$ //$NON-NLS-2$
            return false;
        } else {
            logger.info("Index deleted: " + indexName); //$NON-NLS-1$
            return true;
        }
    }
Delete index with given name
@param client the elasticsearch client
@param indexName the index name
@throws IOException if problem connecting to or interacting with ES
common/es/src/main/java/io/apiman/common/es/util/AbstractClientFactory.java