# Adding Multiple Indexes to a Template

**URL:** <https://discuss.elastic.co/t/adding-multiple-indexes-to-a-template/100383>\
**Category:** Elasticsearch\
**Created:** [September 13, 2017, 4:07pm UTC](https://discuss.elastic.co/t/adding-multiple-indexes-to-a-template/100383 "2017-09-13T16:07:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bt\_scotth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bt_scotth/32/19313_2.png) [@bt\_scotth](https://discuss.elastic.co/u/bt_scotth)\
**Post date:** [September 13, 2017, 4:07pm UTC](https://discuss.elastic.co/t/adding-multiple-indexes-to-a-template/100383/1 "2017-09-13T16:07:05Z")

</div>

I am looking to define a template for 3 indexes:

clients-MM-DD-YYYY  
servers-MM-DD-YYYY  
ps-MM-DD-YYYY

But I can't apply the template to all three indexes without using the "\*" wildcard, which I don't want to do since I have other indexes that I don't want the template to apply to (e.g. eventlogs, beats, etc.).

Is there any way to define multiple indexes in a template definition ... something like:

> PUT \_template/common\_template  
> {  
> "order": 5,  
> "template": "clients-_,servers-,ps-_",  
> "settings": { "index": { "mapping": { "total\_fields": { "limit": "1000" }, "ignore\_malformed": "true" }, } },  
> "mappings": { "_default_": { "properties": { "@timestamp": { "type": "date" } } } }  
> }

---

<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:** [September 13, 2017, 8:49pm UTC](https://discuss.elastic.co/t/adding-multiple-indexes-to-a-template/100383/2 "2017-09-13T20:49:29Z")

</div>

No there's not, it is a single patter so you would need 3 templates.

Please do feel free to raise a feature request in github though, as this sounds useful 🙂

---

<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:** [October 11, 2017, 8:49pm UTC](https://discuss.elastic.co/t/adding-multiple-indexes-to-a-template/100383/3 "2017-10-11T20:49:31Z")

</div>

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