# IndicesOptions ignoreUnavailable not working

**URL:** <https://discuss.elastic.co/t/indicesoptions-ignoreunavailable-not-working/18548>\
**Category:** Elasticsearch\
**Created:** [July 9, 2014, 7:54am UTC](https://discuss.elastic.co/t/indicesoptions-ignoreunavailable-not-working/18548 "2014-07-09T07:54:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![T\_Vinod\_Gupta](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@T\_Vinod\_Gupta](https://discuss.elastic.co/u/T_Vinod_Gupta)\
**Post date:** [July 9, 2014, 7:54am UTC](https://discuss.elastic.co/t/indicesoptions-ignoreunavailable-not-working/18548/1 "2014-07-09T07:54:22Z")

</div>

Hi,  
Im on ES 1.2.1 and the below usage is not working for me. even if i pass  
the option of ignoring unavailable or closed indices, i get an error  
response (ClusterBlockException[blocked by: [FORBIDDEN/4/index closed];]).  
Is my usage wrong?

IndicesOptions indicesOptions = IndicesOptions.fromOptions(true, true,  
false, false);  
MultiSearchRequestBuilder multiSearchRequestBuilder =

client.prepareMultiSearch().setIndicesOptions(indicesOptions);  
SearchRequestBuilder searchRequestBuilder =  
client.prepareSearch(...).setIndicesOptions(indicesOptions);  
multiSearchRequestBuilder =

multiSearchRequestBuilder.add(searchRequestBuilder);  
MultiSearchResponse multiSearchResponse =  
multiSearchRequestBuilder.execute().actionGet();

this is the multi search response in the debugger -  
multiSearchResponse = (org.elasticsearch.action.search.MultiSearchResponse)  
{  
"responses" : [ {  
"error" : "ClusterBlockException[blocked by: [FORBIDDEN/4/index  
closed];]"  
} ]  
}

thanks

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAHau4yuPUn2TUw7n2FGozzzzomczrUNjxb8%3DH5tqOEc1Yedt4A%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHau4yuPUn2TUw7n2FGozzzzomczrUNjxb8%3DH5tqOEc1Yedt4A%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Girish\_Sastry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/girish_sastry/32/1114_2.png) [@Girish\_Sastry](https://discuss.elastic.co/u/Girish_Sastry)\
**Post date:** [November 12, 2014, 12:23am UTC](https://discuss.elastic.co/t/indicesoptions-ignoreunavailable-not-working/18548/2 "2014-11-12T00:23:03Z")

</div>

I'm also running into this issue. Is this expected behavior for  
`ignoreUnavailable`?

On Wednesday, July 9, 2014 12:54:32 AM UTC-7, T Vinod Gupta wrote:

> Hi,  
> Im on ES 1.2.1 and the below usage is not working for me. even if i pass  
> the option of ignoring unavailable or closed indices, i get an error  
> response (ClusterBlockException[blocked by: [FORBIDDEN/4/index closed];]).  
> Is my usage wrong?
> 
> IndicesOptions indicesOptions = IndicesOptions.fromOptions(true, true,  
> false, false);  
> MultiSearchRequestBuilder multiSearchRequestBuilder =
> 
> client.prepareMultiSearch().setIndicesOptions(indicesOptions);  
> SearchRequestBuilder searchRequestBuilder =
> 
> client.prepareSearch(...).setIndicesOptions(indicesOptions);  
> multiSearchRequestBuilder =
> 
> multiSearchRequestBuilder.add(searchRequestBuilder);  
> MultiSearchResponse multiSearchResponse =  
> multiSearchRequestBuilder.execute().actionGet();
> 
> this is the multi search response in the debugger -  
> multiSearchResponse =  
> (org.elasticsearch.action.search.MultiSearchResponse) {  
> "responses" : [ {  
> "error" : "ClusterBlockException[blocked by: [FORBIDDEN/4/index  
> closed];]"  
> } ]  
> }
> 
> thanks

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/be091030-13a6-4d65-a360-7e37b13c1b34%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/be091030-13a6-4d65-a360-7e37b13c1b34%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![T\_Vinod\_Gupta](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@T\_Vinod\_Gupta](https://discuss.elastic.co/u/T_Vinod_Gupta)\
**Post date:** [November 12, 2014, 12:45am UTC](https://discuss.elastic.co/t/indicesoptions-ignoreunavailable-not-working/18548/3 "2014-11-12T00:45:29Z")

</div>

i got no success and no responses from anybody.. im still clueless on this  
one.. is this a bug?

thanks

On Tue, Nov 11, 2014 at 4:23 PM, Girish Sastry [g.sastry@gmail.com](mailto:g.sastry@gmail.com) wrote:

> I'm also running into this issue. Is this expected behavior for  
> `ignoreUnavailable`?
> 
> On Wednesday, July 9, 2014 12:54:32 AM UTC-7, T Vinod Gupta wrote:
> 
> > Hi,  
> > Im on ES 1.2.1 and the below usage is not working for me. even if i pass  
> > the option of ignoring unavailable or closed indices, i get an error  
> > response (ClusterBlockException[blocked by: [FORBIDDEN/4/index closed];]).  
> > Is my usage wrong?
> > 
> > IndicesOptions indicesOptions = IndicesOptions.fromOptions(true, true,  
> > false, false);  
> > MultiSearchRequestBuilder multiSearchRequestBuilder =  
> > client.prepareMultiSearch().setIndicesOptions(  
> > indicesOptions);  
> > SearchRequestBuilder searchRequestBuilder =  
> > client.prepareSearch(...).setIndicesOptions(  
> > indicesOptions);  
> > multiSearchRequestBuilder =  
> > multiSearchRequestBuilder.add(  
> > searchRequestBuilder);  
> > MultiSearchResponse multiSearchResponse =  
> > multiSearchRequestBuilder.execute().actionGet();
> > 
> > this is the multi search response in the debugger -  
> > multiSearchResponse = (org.elasticsearch.action.search.MultiSearchResponse)  
> > {  
> > "responses" : [ {  
> > "error" : "ClusterBlockException[blocked by: [FORBIDDEN/4/index  
> > closed];]"  
> > } ]  
> > }
> > 
> > thanks
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/be091030-13a6-4d65-a360-7e37b13c1b34%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/be091030-13a6-4d65-a360-7e37b13c1b34%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/be091030-13a6-4d65-a360-7e37b13c1b34%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/be091030-13a6-4d65-a360-7e37b13c1b34%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAHau4ysB75RG6ML%3DEt0KsVZfqmdTs6T%3DFrKW4hDEa5HgtLkp%2Bg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHau4ysB75RG6ML%3DEt0KsVZfqmdTs6T%3DFrKW4hDEa5HgtLkp%2Bg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 12:50am UTC](https://discuss.elastic.co/t/indicesoptions-ignoreunavailable-not-working/18548/4 "2017-07-06T00:50:39Z")

</div>


