Adding Multiple Indexes to a Template


(Scott) #1

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" } } } }
}


(Mark Walkom) #2

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 :slight_smile:


(system) #3

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