For policies that include the rollover action, you must also bootstrap the index with a write alias after creating the index template

I was reading this great article ...

https://www.elastic.co/blog/implementing-hot-warm-cold-in-elasticsearch-with-index-lifecycle-management

But in this article there is a line as following

For policies that include the rollover action, you must also bootstrap the index with a write alias after creating the index template

PUT test-000001 
{
  "aliases": {
    "test-alias":{
      "is_write_index": true 
    }
  }
} 

what i am wondering or confuse about is that i am understanding that we have to make the Index Life cycle management policy only once to automate this process of rollover.
but as you can see in the above snipped that we are using a specific index/index_name as in this case test-000001 so we have to manually do this every time an index is going to be role over or we should use a index template name instead which we use while associating ILM (index lifecycle management) policy with index template such as **test- ***. I'm just confuse and new to elastic.

PUT _template/my_template
{
  "index_patterns": ["test-*"], 
  "settings": {
    "index.lifecycle.name": "my_policy", 
    "index.lifecycle.rollover_alias": "test-alias" 
  }
}

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