# A cautionary tale about index autocreation

**URL:** <https://discuss.elastic.co/t/a-cautionary-tale-about-index-autocreation/14104>\
**Category:** Elasticsearch\
**Created:** [October 25, 2013, 1:31am UTC](https://discuss.elastic.co/t/a-cautionary-tale-about-index-autocreation/14104 "2013-10-25T01:31:46Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [October 25, 2013, 1:31am UTC](https://discuss.elastic.co/t/a-cautionary-tale-about-index-autocreation/14104/1 "2013-10-25T01:31:46Z")

</div>

I'm going to write this now before I forget about it.

We're going to turn off automatic index creation. We find it hides  
deployment mistakes. Everything will look like it is working but you're  
Italian text is suddenly missing English stop words. Correcting the  
problem basically requires blowing away and recreating the index any way.

If you can use the feature either because the defaults are fine or you can  
use templates or whatever, then more power to you. It really is super  
convenient. I think, at least for us, turning it off makes more sense.  
Maybe you too should think about it.

Nik

--  
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:** ![Dan\_Everton](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dan_everton/32/1865_2.png) [@Dan\_Everton](https://discuss.elastic.co/u/Dan_Everton)\
**Post date:** [October 25, 2013, 1:48am UTC](https://discuss.elastic.co/t/a-cautionary-tale-about-index-autocreation/14104/2 "2013-10-25T01:48:01Z")

</div>

Index autocreation is definitely one of the features you want to turn off  
in production. It's super convenient, but can lead to all sorts of problems  
if you're not careful. We also disable a few other potentially dangerous  
actions in production. This is snippet from our configuration:

## 

# Require explicit index creation

## 

action.auto\_create\_index: false

## 

# Protect against accidental close/delete operations

# on all indices. You can still close/delete individual

# indices

## 

action.disable\_close\_all\_indices: true  
action.disable\_delete\_all\_indices: true

## 

# Disable ability to shutdown nodes via REST API

## 

action.disable\_shutdown: true

Cheers,  
Dan

--  
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:** ![Nick\_Zadrozny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nick_zadrozny/32/1150_2.png) [@Nick\_Zadrozny](https://discuss.elastic.co/u/Nick_Zadrozny)\
**Post date:** [December 2, 2013, 3:48pm UTC](https://discuss.elastic.co/t/a-cautionary-tale-about-index-autocreation/14104/3 "2013-12-02T15:48:30Z")

</div>

On Thursday, October 24, 2013 6:48:01 PM UTC-7, Dan Everton wrote:

> Index autocreation is definitely one of the features you want to turn off  
> in production. It's super convenient, but can lead to all sorts of problems  
> if you're not careful.

Hear, hear.

We've been running these stricter configurations in production for  
[Bonsai.io](http://Bonsai.io) for ages for exactly those reasons. The difference is a periodic  
source of confusion for some of our customers, and probably our largest  
single source of Elasticsearch-related support questions at [bonsai.io](http://bonsai.io).

While dynamic index creation is a pretty "cool" feature, I'd love to see it  
changed to an opt-in setting, and have proposed as much in the "Breaking  
changes for 1.0" issue on  
github: [Breaking compatibility changes for 1.0 · Issue #4007 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/4007)

--  
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/86d8f9e6-d7ac-4345-be01-88df3f3878bf%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/86d8f9e6-d7ac-4345-be01-88df3f3878bf%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [December 2, 2013, 4:12pm UTC](https://discuss.elastic.co/t/a-cautionary-tale-about-index-autocreation/14104/4 "2013-12-02T16:12:10Z")

</div>

> Index autocreation is definitely one of the features you want to turn off  
> in production.

This all depends who "you" are. For instance, for logging users, index  
auto-creation is exactly what you want. So the "correct" setting depends  
entirely on how you use Elasticsearch.

A strong theme in Elasticsearch is "just get out of the way and make it  
easy to get going" and I think auto index-creation fits nicely with that  
approach. Should you later want to turn it off, then fine, it's easy to do.

Something similar going for the \_all field or dynamic mapping etc. They  
all make it easy to get started, but can be configured to be stricter  
should you desire it.

Possibly what we need instead is a page in the docs explaining these  
settings so that users don't need to discover them only after being bitten

clint

On 2 December 2013 16:48, Nick Zadrozny [nick@onemorecloud.com](mailto:nick@onemorecloud.com) wrote:

> On Thursday, October 24, 2013 6:48:01 PM UTC-7, Dan Everton wrote:
> 
> > Index autocreation is definitely one of the features you want to turn off  
> > in production. It's super convenient, but can lead to all sorts of problems  
> > if you're not careful.
> 
> Hear, hear.
> 
> We've been running these stricter configurations in production for  
> [Bonsai.io](http://Bonsai.io) for ages for exactly those reasons. The difference is a periodic  
> source of confusion for some of our customers, and probably our largest  
> single source of Elasticsearch-related support questions at [bonsai.io](http://bonsai.io).
> 
> While dynamic index creation is a pretty "cool" feature, I'd love to see  
> it changed to an opt-in setting, and have proposed as much in the "Breaking  
> changes for 1.0" issue on github:  
> [Breaking compatibility changes for 1.0 · Issue #4007 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/4007)
> 
> --  
> 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/86d8f9e6-d7ac-4345-be01-88df3f3878bf%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/86d8f9e6-d7ac-4345-be01-88df3f3878bf%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/CAPt3XKS-P0\_%3DhOJJHt8DoKLt2SBdwXYh6tW%3DN4q8N2hh-ZFz7w%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAPt3XKS-P0_%3DhOJJHt8DoKLt2SBdwXYh6tW%3DN4q8N2hh-ZFz7w%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [December 2, 2013, 4:19pm UTC](https://discuss.elastic.co/t/a-cautionary-tale-about-index-autocreation/14104/5 "2013-12-02T16:19:35Z")

</div>

On Mon, Dec 2, 2013 at 11:12 AM, Clinton Gormley [clint@traveljury.com](mailto:clint@traveljury.com)wrote:

> > Index autocreation is definitely one of the features you want to turn  
> > off in production.
> 
> This all depends who "you" are. For instance, for logging users, index  
> auto-creation is exactly what you want. So the "correct" setting depends  
> entirely on how you use Elasticsearch.
> 
> A strong theme in Elasticsearch is "just get out of the way and make it  
> easy to get going" and I think auto index-creation fits nicely with that  
> approach. Should you later want to turn it off, then fine, it's easy to do.

I like this argument even though I'm the one that originally complained  
about it. I can see wanting to use it.

Something similar going for the \_all field or dynamic mapping etc. They

> all make it easy to get started, but can be configured to be stricter  
> should you desire it.

Maybe ironically my use case calls for turning all those off as well.

> Possibly what we need instead is a page in the docs explaining these  
> settings so that users don't need to discover them only after being bitten

+1. A page with links to all the gotcha settings and a discussion on why  
you might want to change the defaults would be perfect. As of now there  
are blogs to read but none of them are really comprehensive because they  
typically about _that_ user's user case.

I think it is nice to keep in mind that it is normal for a service's  
defaults not to be correct for production/high load use. Elasticsearch  
kind of spoils us because the defaults actually are right in so many cases.

Nik

--  
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/CAPmjWd1RxvFWDePKWh9f5ChGiV1upjn3XOgdu9xktN1GCKj6Dw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAPmjWd1RxvFWDePKWh9f5ChGiV1upjn3XOgdu9xktN1GCKj6Dw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [December 2, 2013, 4:51pm UTC](https://discuss.elastic.co/t/a-cautionary-tale-about-index-autocreation/14104/6 "2013-12-02T16:51:05Z")

</div>

+1 for Clint

I like the principle "convenience over configuration".

Auto index creation may hurt in a few cases, but it is easy to turn it off.

In my production setup, auto doc ID creation sucks. So I can turn it off if  
I want to. But I'd never blame ES for having auto doc ID creation turned on  
by default.

An overview of Elasticsearch's convenience philosophy and why it is better  
instead of hiding features would help though.

Jörg

--  
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/CAKdsXoGnqYCuGarrze2OVKmiYxDtfP6e140k3O8Ch6scf57JpQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGnqYCuGarrze2OVKmiYxDtfP6e140k3O8Ch6scf57JpQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![radu\_gheorghe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe/32/556_2.png) [@radu\_gheorghe](https://discuss.elastic.co/u/radu_gheorghe)\
**Post date:** [December 2, 2013, 7:34pm UTC](https://discuss.elastic.co/t/a-cautionary-tale-about-index-autocreation/14104/7 "2013-12-02T19:34:33Z")

</div>

+1 from me, too 🙂

Maybe an option is to say somewhere (docs? blog? comments in config file?  
all of the above?) that ES is developer-friendly and some settings should  
be checked before going to production.

If you need any help, I'd be glad to contribute.

Speaking of contribuitions, here's a crazy idea: how about a GitHub repo?  
It would be easier for the community to add their experience and even have  
branches for use-cases like logging.  
On Dec 2, 2013 6:51 PM, "[joergprante@gmail.com](mailto:joergprante@gmail.com)" [joergprante@gmail.com](mailto:joergprante@gmail.com)  
wrote:

> +1 for Clint
> 
> I like the principle "convenience over configuration".
> 
> Auto index creation may hurt in a few cases, but it is easy to turn it off.
> 
> In my production setup, auto doc ID creation sucks. So I can turn it off  
> if I want to. But I'd never blame ES for having auto doc ID creation turned  
> on by default.
> 
> An overview of Elasticsearch's convenience philosophy and why it is better  
> instead of hiding features would help though.
> 
> Jörg
> 
> --  
> 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/CAKdsXoGnqYCuGarrze2OVKmiYxDtfP6e140k3O8Ch6scf57JpQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGnqYCuGarrze2OVKmiYxDtfP6e140k3O8Ch6scf57JpQ%40mail.gmail.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/CAHXA0\_2dYjZrMVngC\_3b%2BYfez2UoekRhJD4Jx\_tYn4KNfrM%2B3A%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHXA0_2dYjZrMVngC_3b%2BYfez2UoekRhJD4Jx_tYn4KNfrM%2B3A%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Caleb\_Phillips](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/caleb_phillips/32/1540_2.png) [@Caleb\_Phillips](https://discuss.elastic.co/u/Caleb_Phillips)\
**Post date:** [May 23, 2014, 4:20pm UTC](https://discuss.elastic.co/t/a-cautionary-tale-about-index-autocreation/14104/8 "2014-05-23T16:20:10Z")

</div>

Doesn't look like this exists in the official docs yet, but this blog has a  
good list of settings to check:

> **[Elastic Search: Preparing for Prod Deployment](https://yadu.blogspot.com/2014/03/elastic-search-preparing-for-prod.html)**
>
> Elastic search comes with pretty good defaults. But they may not be suitable for your prod environment. I am giving here a list of most imp...

On Monday, December 2, 2013 1:34:33 PM UTC-6, Radu Gheorghe wrote:

> +1 from me, too 🙂
> 
> Maybe an option is to say somewhere (docs? blog? comments in config file?  
> all of the above?) that ES is developer-friendly and some settings should  
> be checked before going to production.
> 
> If you need any help, I'd be glad to contribute.
> 
> Speaking of contribuitions, here's a crazy idea: how about a GitHub repo?  
> It would be easier for the community to add their experience and even have  
> branches for use-cases like logging.  
> On Dec 2, 2013 6:51 PM, "[joerg...@gmail.com](mailto:joerg...@gmail.com) \<javascript:\>" \<  
> [joerg...@gmail.com](mailto:joerg...@gmail.com) \<javascript:\>\> wrote:
> 
> > +1 for Clint
> > 
> > I like the principle "convenience over configuration".
> > 
> > Auto index creation may hurt in a few cases, but it is easy to turn it  
> > off.
> > 
> > In my production setup, auto doc ID creation sucks. So I can turn it off  
> > if I want to. But I'd never blame ES for having auto doc ID creation turned  
> > on by default.
> > 
> > An overview of Elasticsearch's convenience philosophy and why it is  
> > better instead of hiding features would help though.
> > 
> > Jörg
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGnqYCuGarrze2OVKmiYxDtfP6e140k3O8Ch6scf57JpQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGnqYCuGarrze2OVKmiYxDtfP6e140k3O8Ch6scf57JpQ%40mail.gmail.com)  
> > .  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/a8ce5fd5-77f9-4d21-a82d-4830f7a8a7f9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a8ce5fd5-77f9-4d21-a82d-4830f7a8a7f9%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![lisak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lisak/32/618_2.png) [@lisak](https://discuss.elastic.co/u/lisak)\
**Post date:** [March 31, 2015, 8:18am UTC](https://discuss.elastic.co/t/a-cautionary-tale-about-index-autocreation/14104/9 "2015-03-31T08:18:52Z")

</div>

The problem with "action.auto\_create\_index: false" is that it disables  
index templates... So it is basically useless if you are using one

--  
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/d0a69a36-6497-4a51-a144-48f31a6b2312%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d0a69a36-6497-4a51-a144-48f31a6b2312%40googlegroups.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:22am UTC](https://discuss.elastic.co/t/a-cautionary-tale-about-index-autocreation/14104/10 "2017-07-06T00:22:53Z")

</div>


