# Index.lifecycle.rollover\_alias template settings

**URL:** <https://discuss.elastic.co/t/index-lifecycle-rollover-alias-template-settings/317868>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [November 1, 2022, 5:33am UTC](https://discuss.elastic.co/t/index-lifecycle-rollover-alias-template-settings/317868 "2022-11-01T05:33:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mangesh\_Mathe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mangesh_mathe/32/103371_2.png) [@Mangesh\_Mathe](https://discuss.elastic.co/u/Mangesh_Mathe)\
**Post date:** [November 1, 2022, 5:33am UTC](https://discuss.elastic.co/t/index-lifecycle-rollover-alias-template-settings/317868/1 "2022-11-01T05:33:05Z")

</div>

Hello Team,

We've scenario where we have multiple index with different names (Example: **ordercode-domino , ordercode-ecofee , ordercode-chassis** ), Earlier we have one template for all these index with pattern as ( **ordercode-** \*).

Now we want to implement ILM policies to rollover these index.  
Single template with pattern ( **ordercode-** \*) for all these index will worked ? If yes, then how can it possible in the template settings **index.lifecycle.rollover\_alias** will have the same alias name? It will be rollover using ordercode alias ( **ordercode-domino-000001, ordercode-domino-000002** ), But I don't think this will manage the proper data insertion for all the mentioned index.

```auto
PUT _template/ordercode-template
{
  "index_patterns": [
    "ordercode-*"
  ],
  "mappings": {
    "dynamic": "true",
    "date_detection": true,
    "dynamic_templates": [
      {
        "strings": {
          "match_mapping_type": "string",
          "mapping": {
            "fields": {
              "keyword": {
                "ignore_above": 256,
                "type": "keyword"
              }
            },
            "type": "text"
          }
        }
      }
    ]
  },
  "settings": {
    "index.lifecycle.name": "7-day-rollover-policy",
    "index.lifecycle.rollover_alias": "ordercode"
  }
}

===============================================
PUT ordercode-domino-000001
{
  "aliases": {
    "ordercode": {
      "is_write_index": true
    }
  }
}

```

What will happen for ordercode-ecofee , ordercode-chassis index ?

My assumptions is that we have to create separate index\_template with dedicated index.lifecycle.rollover\_alias for each index individually.  
Please let me know, if there is any alternatives for this situation.

Thank you!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 1, 2022, 7:20am UTC](https://discuss.elastic.co/t/index-lifecycle-rollover-alias-template-settings/317868/2 "2022-11-01T07:20:48Z")

</div>

> [@Mangesh\_Mathe](#):
>
> Single template with pattern ( **ordercode-** \*) for all these index will worked

You will need one for each of `ordercode-domino`, `ordercode-ecofee` etc etc.

---

<div class="post-metadata">

**Author:** ![Mangesh\_Mathe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mangesh_mathe/32/103371_2.png) [@Mangesh\_Mathe](https://discuss.elastic.co/u/Mangesh_Mathe)\
**Post date:** [November 1, 2022, 7:23am UTC](https://discuss.elastic.co/t/index-lifecycle-rollover-alias-template-settings/317868/3 "2022-11-01T07:23:13Z")

</div>

Ok , so there is no way to have single template for all these index.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 1, 2022, 7:24am UTC](https://discuss.elastic.co/t/index-lifecycle-rollover-alias-template-settings/317868/4 "2022-11-01T07:24:09Z")

</div>

No, because the write alias will all be different for each of them.

---

<div class="post-metadata">

**Author:** ![Mangesh\_Mathe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mangesh_mathe/32/103371_2.png) [@Mangesh\_Mathe](https://discuss.elastic.co/u/Mangesh_Mathe)\
**Post date:** [November 1, 2022, 7:34am UTC](https://discuss.elastic.co/t/index-lifecycle-rollover-alias-template-settings/317868/5 "2022-11-01T07:34:58Z")

</div>

Thank you so much for the confirmation

---

<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:** [November 29, 2022, 7:35am UTC](https://discuss.elastic.co/t/index-lifecycle-rollover-alias-template-settings/317868/6 "2022-11-29T07:35:08Z")

</div>

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