I use RestHighLevelClient to execute a query.I generate my client with multiple nodes like this.
RestHighLevelClient client = new RestHighLevelClient(
RestClient.builder(
new HttpHost("host1", 9200, "http"),
new HttpHost("host2", 9200, "http"),
new HttpHost("host2", 9200, "http")
)
);
And do some query from several indices,But some of my index only exists in one nodes.It will cause index not found exception if i use client.search(xxx). How can i deal with this problem.
using IndicesOptions.LENIENT_EXPAND_OPEN won't throw index not found, but it seems that it just query from host1