}
if (!toDelete.isEmpty()) {
logger.info("Deleting indices: {}", toDelete);
String[] indices = toDelete.toArray(new String[toDelete.size()]);
DeleteIndexRequest req = indicesAdminClient.prepareDelete(indices).request();
indicesAdminClient.delete(req).actionGet();
}
}