How to delete aliases from template

Hi All,

Is there any way to delete alias from template instead of updating template.

Below is the current template

{
"logstash-batch-test" : {
"order" : 0,
"index_patterns" : [
"logstash-batch-test*"
],
"settings" : {
"index" : {
"number_of_shards" : "1",
"number_of_replicas" : "1"
}
},
"mappings" : { },
"aliases" : {
"logstash-batch-test" : { }
}
}
}

Now i need to delete aliases from this template as i have lot of templates for those the settings are different so i can not update each and every template instead of that i am looking to remove only aliases from each template. Please suggest any work around for this.

New template should be like

{
"logstash-batch-test" : {
"order" : 0,
"index_patterns" : [
"logstash-batch-test*"
],
"settings" : {
"index" : {
"number_of_shards" : "1",
"number_of_replicas" : "1"
}
},
"mappings" : { }
}
}

Thanks

I'm afraid all you can do is update each template. Can you write a script that loops through all your templates and adjusts them as you want?

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