The below code is not retuning the indices in keyset and coming as null.Can any one know how to correct it.I am trying to get all the indices from elastic search.
ClusterHealthRequest request = new ClusterHealthRequest();
ClusterHealthResponse response = client.cluster().health(request, RequestOptions.DEFAULT);
Set<String> indices = response.getIndices().keySet();