# About Index Templates

**URL:** <https://discuss.elastic.co/t/about-index-templates/36993>\
**Category:** Elasticsearch\
**Created:** [December 11, 2015, 3:22pm UTC](https://discuss.elastic.co/t/about-index-templates/36993 "2015-12-11T15:22:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dawiro](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@dawiro](https://discuss.elastic.co/u/dawiro)\
**Post date:** [December 11, 2015, 3:22pm UTC](https://discuss.elastic.co/t/about-index-templates/36993/1 "2015-12-11T15:22:22Z")

</div>

Hi,  
I have a query regarding index templates. When a template is added does it mandate that all data being written to that index must contain the fields defined in the template? Or does it define how to handle the fields defined in the template if they're present?

Regards,  
David

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [December 11, 2015, 3:29pm UTC](https://discuss.elastic.co/t/about-index-templates/36993/2 "2015-12-11T15:29:25Z")

</div>

The mappings put in place e.g. by an index template mandate how fields are mapped _if present_. The fields themselves don't become mandatory, and unless you disable dynamic mapping documents may specify fields not present in the predefined mappings.

---

<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 5, 2017, 11:31pm UTC](https://discuss.elastic.co/t/about-index-templates/36993/3 "2017-07-05T23:31:44Z")

</div>


