Create an alias from index template


I have a cluster that receives data from multiple applications

  • Data contains fields like "", for example service.app1 and service.app2

  • Data for application app1 must go in index named data-app1-yyyy-mm-dd and data for application app2 must go in index named data-app2-yyyy-mm-dd

I want to create an alias with a dynamic name based on a the field "", so that indices data-app1-yyyy-mm-dd get an alias named app1 and so ...

Is it possible to do that in index template with some placeholders ... ?

I know we can do it for a known application name by adding this to index-template

  "aliases" : {
        "app1" : {
            "filter" : {
                "term" : { "" : "app1" }

but I do not know all the applications in advance

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