# Open closed index automatically

**URL:** https://discuss.elastic.co/t/open-closed-index-automatically/21837
**Category:** Elasticsearch
**Created:** [January 26, 2015, 8:41pm UTC](https://discuss.elastic.co/t/open-closed-index-automatically/21837 "2015-01-26T20:41:07Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Drew\_Kutcharian](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drew_kutcharian/32/742_2.png) [@Drew\_Kutcharian](https://discuss.elastic.co/u/Drew_Kutcharian)
#### Post date: [January 26, 2015, 8:41pm UTC](https://discuss.elastic.co/t/open-closed-index-automatically/21837/1 "2015-01-26T20:41:07Z")

</div>

Hi,

Is there a way to tell ES to open closed indices automatically on first access (search or indexing)? I can do it on the application side by looking for IndexClosedException, but this seems like a natural thing that ES should be able to do, after all ES creates new indices automatically.

- Drew

--  
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/EBBDD69F-4D57-4312-B068-B142CF92CBF1%40venarc.com](https://groups.google.com/d/msgid/elasticsearch/EBBDD69F-4D57-4312-B068-B142CF92CBF1%40venarc.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [January 26, 2015, 8:42pm UTC](https://discuss.elastic.co/t/open-closed-index-automatically/21837/2 "2015-01-26T20:42:27Z")

</div>

Opening an index is a costly operation.  
Creating a new index is not.

My 2 cents

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)

> Le 26 janv. 2015 à 21:41, Drew Kutcharian [drew@venarc.com](mailto:drew@venarc.com) a écrit :
> 
> Hi,
> 
> Is there a way to tell ES to open closed indices automatically on first access (search or indexing)? I can do it on the application side by looking for IndexClosedException, but this seems like a natural thing that ES should be able to do, after all ES creates new indices automatically.
> 
> - Drew
> 
> --  
> 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/EBBDD69F-4D57-4312-B068-B142CF92CBF1%40venarc.com](https://groups.google.com/d/msgid/elasticsearch/EBBDD69F-4D57-4312-B068-B142CF92CBF1%40venarc.com).  
> 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/222794C5-0686-4BCF-8C1A-C37FCC9636D7%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/222794C5-0686-4BCF-8C1A-C37FCC9636D7%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Drew\_Kutcharian](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drew_kutcharian/32/742_2.png) [@Drew\_Kutcharian](https://discuss.elastic.co/u/Drew_Kutcharian)
#### Post date: [January 26, 2015, 9:23pm UTC](https://discuss.elastic.co/t/open-closed-index-automatically/21837/3 "2015-01-26T21:23:29Z")

</div>

I agree. But they both go thru shard allocation, no? I’m assuming opening/closing small 1 shard indexes (max 100MB total size) shouldn’t be that bad.

> On Jan 26, 2015, at 12:42 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> 
> Opening an index is a costly operation.  
> Creating a new index is not.
> 
> My 2 cents
> 
> --  
> David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com) [http://elasticsearch.com/](http://elasticsearch.com/)  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)
> 
> > Le 26 janv. 2015 à 21:41, Drew Kutcharian \<[drew@venarc.com](mailto:drew@venarc.com) [mailto:drew@venarc.com](mailto:drew@venarc.com)\> a écrit :
> > 
> > Hi,
> > 
> > Is there a way to tell ES to open closed indices automatically on first access (search or indexing)? I can do it on the application side by looking for IndexClosedException, but this seems like a natural thing that ES should be able to do, after all ES creates new indices automatically.
> > 
> > - Drew
> > 
> > --  
> > 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) [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/EBBDD69F-4D57-4312-B068-B142CF92CBF1%40venarc.com](https://groups.google.com/d/msgid/elasticsearch/EBBDD69F-4D57-4312-B068-B142CF92CBF1%40venarc.com) [https://groups.google.com/d/msgid/elasticsearch/EBBDD69F-4D57-4312-B068-B142CF92CBF1%40venarc.com](https://groups.google.com/d/msgid/elasticsearch/EBBDD69F-4D57-4312-B068-B142CF92CBF1%40venarc.com).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [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) [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/222794C5-0686-4BCF-8C1A-C37FCC9636D7%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/222794C5-0686-4BCF-8C1A-C37FCC9636D7%40pilato.fr) [https://groups.google.com/d/msgid/elasticsearch/222794C5-0686-4BCF-8C1A-C37FCC9636D7%40pilato.fr?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/222794C5-0686-4BCF-8C1A-C37FCC9636D7%40pilato.fr?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [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/89BDF355-E6BF-4A34-B160-52F34589D146%40venarc.com](https://groups.google.com/d/msgid/elasticsearch/89BDF355-E6BF-4A34-B160-52F34589D146%40venarc.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [January 26, 2015, 10:38pm UTC](https://discuss.elastic.co/t/open-closed-index-automatically/21837/4 "2015-01-26T22:38:54Z")

</div>

That's still massively different to creating and allocating a completely  
empty index.

On 27 January 2015 at 08:23, Drew Kutcharian [drew@venarc.com](mailto:drew@venarc.com) wrote:

> I agree. But they both go thru shard allocation, no? I’m assuming  
> opening/closing small 1 shard indexes (max 100MB total size) shouldn’t be  
> that bad.
> 
> On Jan 26, 2015, at 12:42 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> 
> Opening an index is a costly operation.  
> Creating a new index is not.
> 
> My 2 cents
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)  
> [http://elasticsearch.com/](http://elasticsearch.com/)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr  
> [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs  
> [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)
> 
> Le 26 janv. 2015 à 21:41, Drew Kutcharian [drew@venarc.com](mailto:drew@venarc.com) a écrit :
> 
> Hi,
> 
> Is there a way to tell ES to open closed indices automatically on first  
> access (search or indexing)? I can do it on the application side by looking  
> for IndexClosedException, but this seems like a natural thing that ES  
> should be able to do, after all ES creates new indices automatically.
> 
> - Drew
> 
> --  
> 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/EBBDD69F-4D57-4312-B068-B142CF92CBF1%40venarc.com](https://groups.google.com/d/msgid/elasticsearch/EBBDD69F-4D57-4312-B068-B142CF92CBF1%40venarc.com)  
> .  
> 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/222794C5-0686-4BCF-8C1A-C37FCC9636D7%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/222794C5-0686-4BCF-8C1A-C37FCC9636D7%40pilato.fr)  
> [https://groups.google.com/d/msgid/elasticsearch/222794C5-0686-4BCF-8C1A-C37FCC9636D7%40pilato.fr?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/222794C5-0686-4BCF-8C1A-C37FCC9636D7%40pilato.fr?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/89BDF355-E6BF-4A34-B160-52F34589D146%40venarc.com](https://groups.google.com/d/msgid/elasticsearch/89BDF355-E6BF-4A34-B160-52F34589D146%40venarc.com)  
> [https://groups.google.com/d/msgid/elasticsearch/89BDF355-E6BF-4A34-B160-52F34589D146%40venarc.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/89BDF355-E6BF-4A34-B160-52F34589D146%40venarc.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/CAEYi1X84a0dx0-21THcPFbd-aZpSO0Bzy1NsO6B1kOhOdnGjyQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X84a0dx0-21THcPFbd-aZpSO0Bzy1NsO6B1kOhOdnGjyQ%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:36am UTC](https://discuss.elastic.co/t/open-closed-index-automatically/21837/5 "2017-07-06T00:36:34Z")

</div>


