for (int i = 0; i < hostNames.length; i++) {
HttpHost host = new HttpHost(hostNames[i] , 9200, "index_name");
hosts[i] = host;
}
RestHighLevelClient client = new RestHighLevelClient(RestClient.builder(hosts ));
i'm obtaining client using the above code snippet, it works fine when all nodes are available.
it is failing if any one of the node is down.
any solution to handle this situation ?