# Avoid Default Index Creation without mapping

**URL:** <https://discuss.elastic.co/t/avoid-default-index-creation-without-mapping/23956>\
**Category:** Elasticsearch\
**Created:** [June 19, 2015, 1:31am UTC](https://discuss.elastic.co/t/avoid-default-index-creation-without-mapping/23956 "2015-06-19T01:31:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sagarshah1983](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sagarshah1983/32/3403_2.png) [@sagarshah1983](https://discuss.elastic.co/u/sagarshah1983)\
**Post date:** [June 19, 2015, 1:31am UTC](https://discuss.elastic.co/t/avoid-default-index-creation-without-mapping/23956/1 "2015-06-19T01:31:00Z")

</div>

Hello everyone,  
I am using elastic search 1.4.2 for storing application logs.  
We have defined an index mapping, which is generally applied during deployment and upgrade process.  
However, if there's anything failing at that point or there's a request to push a log/document into elastic search by that time, then elastic search creates an index with default mapping. This is what I want to avoid.  
Is there a way to error all push document calls to elastic search unless index was explicitly created with mappings.  
If not, I might have to apply this check explicitly all the time before pushing any log entry into elastic search.

Please advise.  
Appreciate your inputs!

Regards,  
Sagar

---

<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:** [June 19, 2015, 1:52am UTC](https://discuss.elastic.co/t/avoid-default-index-creation-without-mapping/23956/2 "2015-06-19T01:52:14Z")

</div>

Is it a dynamic mapping or completely static?

---

<div class="post-metadata">

**Author:** ![colings86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colings86/32/44960_2.png) [@colings86](https://discuss.elastic.co/u/colings86)\
**Post date:** [June 19, 2015, 8:23am UTC](https://discuss.elastic.co/t/avoid-default-index-creation-without-mapping/23956/3 "2015-06-19T08:23:00Z")

</div>

You might be interested in the last two paragraphs in this section of the documentation, I think this might be the settings you are after: [https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index\_.html#index-creation](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#index-creation)

HTH

---

<div class="post-metadata">

**Author:** ![sagarshah1983](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sagarshah1983/32/3403_2.png) [@sagarshah1983](https://discuss.elastic.co/u/sagarshah1983)\
**Post date:** [June 19, 2015, 1:24pm UTC](https://discuss.elastic.co/t/avoid-default-index-creation-without-mapping/23956/4 "2015-06-19T13:24:33Z")

</div>

Mappings are static and are meant for defining the types of the fields that I want to support and applying analyzers for search.  
And log entries could be coming from different applications, which might actually push data and elastic search creates a default index without analyzer.  
Now on deployment side updating mapping call actually fails because index once created without mapping can not be updated with new analyzer mappings.

Please suggest.

Appreciate!

---

<div class="post-metadata">

**Author:** ![sagarshah1983](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sagarshah1983/32/3403_2.png) [@sagarshah1983](https://discuss.elastic.co/u/sagarshah1983)\
**Post date:** [June 19, 2015, 1:30pm UTC](https://discuss.elastic.co/t/avoid-default-index-creation-without-mapping/23956/5 "2015-06-19T13:30:54Z")

</div>

Yep. That's exactly what I was looking for.

Thanks a ton ! 🙂

---

<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:06am UTC](https://discuss.elastic.co/t/avoid-default-index-creation-without-mapping/23956/6 "2017-07-06T00:06:27Z")

</div>


