# Open and closed indices

**URL:** https://discuss.elastic.co/t/open-and-closed-indices/12374
**Category:** Elasticsearch
**Created:** [June 12, 2013, 9:07am UTC](https://discuss.elastic.co/t/open-and-closed-indices/12374 "2013-06-12T09:07:25Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Andrej](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Andrej](https://discuss.elastic.co/u/Andrej)
#### Post date: [June 12, 2013, 9:07am UTC](https://discuss.elastic.co/t/open-and-closed-indices/12374/1 "2013-06-12T09:07:25Z")

</div>

Hi,

as I have to do several things using http at the moment (I prefer the Java  
API, honestly ;-)) I stumbled over some (probably pretty simple) questions.  
One question would be: how can I figure out if an existing index is open or  
closed? If closed it doesnt show up in the status response, but I dont  
think thats the proper way to handle it. Did I oversee something obvious?  
Can someone point me to where to look in the docs?  
Another question is about return codes. When I open a closed index I get  
return code 200 (OK), what is the expected result. But when I open an  
already open index I also get a 200. As I think that attempting to open an  
open index means I got something wrong (at least my assumptions) wouldnt it  
be helpful to return something different instead (like maybe 409 (conflict)  
or 412 (precondition failed))? Same goes for close. It should not stop or  
throw exceptions, I think, but some kind of hint would be nice, wouldnt it?  
😉

Thanks in advance!  
Andrej

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:31am UTC](https://discuss.elastic.co/t/open-and-closed-indices/12374/2 "2017-07-06T02:31:41Z")

</div>


