ClusterHealthResponse is not returning all indices in Elastic Search 6.8

205 views Asked by At

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();
0

There are 0 answers