# How to avoid IndexNotExits exception

**URL:** <https://discuss.elastic.co/t/how-to-avoid-indexnotexits-exception/19507>\
**Category:** Elasticsearch\
**Created:** [August 28, 2014, 9:08am UTC](https://discuss.elastic.co/t/how-to-avoid-indexnotexits-exception/19507 "2014-08-28T09:08:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![11149](https://avatars.discourse-cdn.com/v4/letter/1/da6949/32.png) [@11149](https://discuss.elastic.co/u/11149)\
**Post date:** [August 28, 2014, 9:08am UTC](https://discuss.elastic.co/t/how-to-avoid-indexnotexits-exception/19507/1 "2014-08-28T09:08:54Z")

</div>

curl -XPOST 'localhost:9200/index1,index2,index3/\_search -d '  
{...}  
'

if any index of the specified indexes does not exist, elasticsearch will  
raise an error. is there any settings parameter to make it just omit the  
missing indexes ?

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/CA%2BJstLCRJftRDsjms6STCR%2BSJWKUjjmMieYY2XqhoFTpp%2Bz6NA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CA%2BJstLCRJftRDsjms6STCR%2BSJWKUjjmMieYY2XqhoFTpp%2Bz6NA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![vineeth\_mohan\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vineeth_mohan_2/32/747_2.png) [@vineeth\_mohan\_2](https://discuss.elastic.co/u/vineeth_mohan_2)\
**Post date:** [August 28, 2014, 11:43am UTC](https://discuss.elastic.co/t/how-to-avoid-indexnotexits-exception/19507/2 "2014-08-28T11:43:00Z")

</div>

Hello Panfei ,

Can you try this ignore\_unavailable -

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Thanks  
Vineeth

On Thu, Aug 28, 2014 at 2:38 PM, panfei [cnweike@gmail.com](mailto:cnweike@gmail.com) wrote:

> curl -XPOST 'localhost:9200/index1,index2,index3/\_search -d '  
> {...}  
> '
> 
> if any index of the specified indexes does not exist, elasticsearch will  
> raise an error. is there any settings parameter to make it just omit the  
> missing indexes ?
> 
> 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/CA%2BJstLCRJftRDsjms6STCR%2BSJWKUjjmMieYY2XqhoFTpp%2Bz6NA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CA%2BJstLCRJftRDsjms6STCR%2BSJWKUjjmMieYY2XqhoFTpp%2Bz6NA%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CA%2BJstLCRJftRDsjms6STCR%2BSJWKUjjmMieYY2XqhoFTpp%2Bz6NA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CA%2BJstLCRJftRDsjms6STCR%2BSJWKUjjmMieYY2XqhoFTpp%2Bz6NA%40mail.gmail.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/CAGdPd5msAZ77kV4pQrkLb6rgGCqNBrGnPhb6%3DRonZ0q%2Bujtgag%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGdPd5msAZ77kV4pQrkLb6rgGCqNBrGnPhb6%3DRonZ0q%2Bujtgag%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![11149](https://avatars.discourse-cdn.com/v4/letter/1/da6949/32.png) [@11149](https://discuss.elastic.co/u/11149)\
**Post date:** [August 31, 2014, 7:39am UTC](https://discuss.elastic.co/t/how-to-avoid-indexnotexits-exception/19507/3 "2014-08-31T07:39:49Z")

</div>

Hi vineeth, this helps us a lot , thanks very much !

2014-08-28 19:43 GMT+08:00 vineeth mohan [vm.vineethmohan@gmail.com](mailto:vm.vineethmohan@gmail.com):

> Hello Panfei ,
> 
> Can you try this ignore\_unavailable -  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/multi-index.html#multi-index)
> 
> Thanks  
> Vineeth
> 
> On Thu, Aug 28, 2014 at 2:38 PM, panfei [cnweike@gmail.com](mailto:cnweike@gmail.com) wrote:
> 
> > curl -XPOST 'localhost:9200/index1,index2,index3/\_search -d '  
> > {...}  
> > '
> > 
> > if any index of the specified indexes does not exist, elasticsearch will  
> > raise an error. is there any settings parameter to make it just omit the  
> > missing indexes ?
> > 
> > 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/CA%2BJstLCRJftRDsjms6STCR%2BSJWKUjjmMieYY2XqhoFTpp%2Bz6NA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CA%2BJstLCRJftRDsjms6STCR%2BSJWKUjjmMieYY2XqhoFTpp%2Bz6NA%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/CA%2BJstLCRJftRDsjms6STCR%2BSJWKUjjmMieYY2XqhoFTpp%2Bz6NA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CA%2BJstLCRJftRDsjms6STCR%2BSJWKUjjmMieYY2XqhoFTpp%2Bz6NA%40mail.gmail.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/CAGdPd5msAZ77kV4pQrkLb6rgGCqNBrGnPhb6%3DRonZ0q%2Bujtgag%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGdPd5msAZ77kV4pQrkLb6rgGCqNBrGnPhb6%3DRonZ0q%2Bujtgag%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAGdPd5msAZ77kV4pQrkLb6rgGCqNBrGnPhb6%3DRonZ0q%2Bujtgag%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAGdPd5msAZ77kV4pQrkLb6rgGCqNBrGnPhb6%3DRonZ0q%2Bujtgag%40mail.gmail.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/CA%2BJstLAqK3WoDAFLKKZysOM\_AWrUtwKNNY9J8qo20kMcz5ZzNg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CA%2BJstLAqK3WoDAFLKKZysOM_AWrUtwKNNY9J8qo20kMcz5ZzNg%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, 1:05am UTC](https://discuss.elastic.co/t/how-to-avoid-indexnotexits-exception/19507/4 "2017-07-06T01:05:19Z")

</div>


