Java High Level REST Client how to solve index_not_found_exception to elasticsearch

I refer to this url to start my code:
https://www.elastic.co/guide/en/elasticsearch/client/java-rest/master/java-rest-high.html
But I got a exception:
ElasticsearchStatusException[Elasticsearch exception [type=index_not_found_exception, reason=no such index]]
I want to set ignore_unavailable=true to elasticsearch , so I try to get any help from the url,but I can not found any useful message, What can't I do?

//ignore_unavailable allow_no_indices=true expand_wildcards_open expand_wildcards_closed
searchRequest.indicesOptions(searchRequest.indicesOptions().fromOptions(true, true, true, false));

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.