# Java High Level REST Client how to solve index\_not\_found\_exception to elasticsearch

**URL:** <https://discuss.elastic.co/t/java-high-level-rest-client-how-to-solve-index-not-found-exception-to-elasticsearch/133143>\
**Category:** Elasticsearch\
**Created:** [May 24, 2018, 12:37pm UTC](https://discuss.elastic.co/t/java-high-level-rest-client-how-to-solve-index-not-found-exception-to-elasticsearch/133143 "2018-05-24T12:37:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiaojiang](https://avatars.discourse-cdn.com/v4/letter/x/f475e1/32.png) [@xiaojiang](https://discuss.elastic.co/u/xiaojiang)\
**Post date:** [May 24, 2018, 12:37pm UTC](https://discuss.elastic.co/t/java-high-level-rest-client-how-to-solve-index-not-found-exception-to-elasticsearch/133143/1 "2018-05-24T12:37:16Z")

</div>

I refer to this url to start my code:  
[https://www.elastic.co/guide/en/elasticsearch/client/java-rest/master/java-rest-high.html](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?

---

<div class="post-metadata">

**Author:** ![xiaojiang](https://avatars.discourse-cdn.com/v4/letter/x/f475e1/32.png) [@xiaojiang](https://discuss.elastic.co/u/xiaojiang)\
**Post date:** [May 25, 2018, 6:37am UTC](https://discuss.elastic.co/t/java-high-level-rest-client-how-to-solve-index-not-found-exception-to-elasticsearch/133143/2 "2018-05-25T06:37:54Z")

</div>

//ignore\_unavailable allow\_no\_indices=true expand\_wildcards\_open expand\_wildcards\_closed  
searchRequest.indicesOptions(searchRequest.indicesOptions().fromOptions(true, true, true, false));

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 22, 2018, 6:38am UTC](https://discuss.elastic.co/t/java-high-level-rest-client-how-to-solve-index-not-found-exception-to-elasticsearch/133143/3 "2018-06-22T06:38:02Z")

</div>

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