# How to define a dynamic template which will apply to all '\_type' in one index

**URL:** <https://discuss.elastic.co/t/how-to-define-a-dynamic-template-which-will-apply-to-all--type-in-one-index/48388>\
**Category:** Elasticsearch\
**Created:** [April 26, 2016, 6:45am UTC](https://discuss.elastic.co/t/how-to-define-a-dynamic-template-which-will-apply-to-all--type-in-one-index/48388 "2016-04-26T06:45:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hacksign](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hacksign/32/5918_2.png) [@Hacksign](https://discuss.elastic.co/u/Hacksign)\
**Post date:** [April 26, 2016, 6:45am UTC](https://discuss.elastic.co/t/how-to-define-a-dynamic-template-which-will-apply-to-all--type-in-one-index/48388/1 "2016-04-26T06:45:45Z")

</div>

I have an index within many '\_type' .  
All \_type have same structure, I want define one dynamic template and this dynamic template will apply to all \_type(s) in this index.  
It is possible ?

---

<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:** [April 26, 2016, 6:53am UTC](https://discuss.elastic.co/t/how-to-define-a-dynamic-template-which-will-apply-to-all--type-in-one-index/48388/2 "2016-04-26T06:53:54Z")

</div>

Yes, use `_default_` as the type in the template.

---

<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, 10:56pm UTC](https://discuss.elastic.co/t/how-to-define-a-dynamic-template-which-will-apply-to-all--type-in-one-index/48388/3 "2017-07-05T22:56:21Z")

</div>


