# Index template index-pattern

**URL:** <https://discuss.elastic.co/t/index-template-index-pattern/236864>\
**Category:** Elasticsearch\
**Created:** [June 12, 2020, 9:59am UTC](https://discuss.elastic.co/t/index-template-index-pattern/236864 "2020-06-12T09:59:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Callonski](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@Callonski](https://discuss.elastic.co/u/Callonski)\
**Post date:** [June 12, 2020, 9:59am UTC](https://discuss.elastic.co/t/index-template-index-pattern/236864/1 "2020-06-12T09:59:03Z")

</div>

First time creating an index template and not sure about the syntax.  
I would like it to apply to every index with suffix -2  
How should I write that in index-pattern? \*-2  
And another rookie question. Can I apply mapping to template from json in Kibana? Or should I use API for that?

---

<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 15, 2020, 11:22pm UTC](https://discuss.elastic.co/t/index-template-index-pattern/236864/2 "2020-06-15T23:22:10Z")

</div>

That should work, yes.

You can use Dev Tools \> Console in Kibana if you want 🙂

---

<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 13, 2020, 11:22pm UTC](https://discuss.elastic.co/t/index-template-index-pattern/236864/3 "2020-07-13T23:22:17Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
