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

**URL:** <https://discuss.elastic.co/t/for-policies-that-include-the-rollover-action-you-must-also-bootstrap-the-index-with-a-write-alias-after-creating-the-index-template/226495>\
**Category:** Elasticsearch\
**Created:** [April 4, 2020, 4:01am UTC](https://discuss.elastic.co/t/for-policies-that-include-the-rollover-action-you-must-also-bootstrap-the-index-with-a-write-alias-after-creating-the-index-template/226495 "2020-04-04T04:01:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daud\_Ahmed](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daud_ahmed/32/65655_2.png) [@Daud\_Ahmed](https://discuss.elastic.co/u/Daud_Ahmed)\
**Post date:** [April 4, 2020, 4:01am UTC](https://discuss.elastic.co/t/for-policies-that-include-the-rollover-action-you-must-also-bootstrap-the-index-with-a-write-alias-after-creating-the-index-template/226495/1 "2020-04-04T04:01:06Z")

</div>

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**

```auto
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.

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

```

---

<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:** [May 2, 2020, 4:12am UTC](https://discuss.elastic.co/t/for-policies-that-include-the-rollover-action-you-must-also-bootstrap-the-index-with-a-write-alias-after-creating-the-index-template/226495/2 "2020-05-02T04:12:16Z")

</div>

Closed on May 2, 2020, 4:12am UTC

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