public static void deleteIndices(RestHighLevelClient client) throws IOException {
        final Iterator<String> iterator = createdIndices.iterator();
        while (iterator.hasNext()) {
            String fullIndexName = iterator.next();
            GetIndexRequest indexExistsRequest = new GetIndexRequest(fullIndexName);
            boolean indexExists = client.indices().exists(indexExistsRequest, RequestOptions.DEFAULT);
            if (indexExists) {
                boolean success = deleteIndex(client, fullIndexName);
                if (success) {
                    iterator.remove();
                }
            }
        }
    }
Delete all indices used by manager ui
@param client the elasticsearch client
@throws IOException if problem connecting to or interacting with ES
common/es/src/main/java/io/apiman/common/es/util/AbstractClientFactory.java