# Single mapping for any document type in an index

**URL:** <https://discuss.elastic.co/t/single-mapping-for-any-document-type-in-an-index/2602>\
**Category:** Elasticsearch\
**Created:** [June 12, 2015, 8:05pm UTC](https://discuss.elastic.co/t/single-mapping-for-any-document-type-in-an-index/2602 "2015-06-12T20:05:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cching](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cching/32/44800_2.png) [@cching](https://discuss.elastic.co/u/cching)\
**Post date:** [June 12, 2015, 8:05pm UTC](https://discuss.elastic.co/t/single-mapping-for-any-document-type-in-an-index/2602/1 "2015-06-12T20:05:44Z")

</div>

Is there a way to create a mapping such that any new doc type created in the index automatically has that mapping associated with it? All of my document types have the same schema and I'd like to not have to create mappings every time we index a document of a new doc type.

---

<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 14, 2015, 2:49am UTC](https://discuss.elastic.co/t/single-mapping-for-any-document-type-in-an-index/2602/2 "2015-06-14T02:49:38Z")

</div>

Sounds like you want [https://www.elastic.co/guide/en/elasticsearch/guide/current/index-templates.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/index-templates.html)

---

<div class="post-metadata">

**Author:** ![cching](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cching/32/44800_2.png) [@cching](https://discuss.elastic.co/u/cching)\
**Post date:** [June 15, 2015, 1:43pm UTC](https://discuss.elastic.co/t/single-mapping-for-any-document-type-in-an-index/2602/3 "2015-06-15T13:43:06Z")

</div>

Yes, thank you! I knew the feature existed I just couldn't remember what it was! Don't see a way to mark this post as answered, if there is a way, please let me know.

---

<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:07am UTC](https://discuss.elastic.co/t/single-mapping-for-any-document-type-in-an-index/2602/4 "2017-07-06T00:07:26Z")

</div>


