# How can i apply index template and ilm to existing index?

**URL:** <https://discuss.elastic.co/t/how-can-i-apply-index-template-and-ilm-to-existing-index/318529>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [November 9, 2022, 10:26am UTC](https://discuss.elastic.co/t/how-can-i-apply-index-template-and-ilm-to-existing-index/318529 "2022-11-09T10:26:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hyungsun\_lim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hyungsun_lim/32/50790_2.png) [@hyungsun\_lim](https://discuss.elastic.co/u/hyungsun_lim)\
**Post date:** [November 9, 2022, 10:26am UTC](https://discuss.elastic.co/t/how-can-i-apply-index-template-and-ilm-to-existing-index/318529/1 "2022-11-09T10:26:15Z")

</div>

Now, i have 'test' index in elasticsearch.

Documents are written in 'test' index every day, and every seconds.

In this case, i want to apply index template to 'test' index.  
For example, 'test-0000001', 'test-0000002'. and i will apply ilm policy.

How can i apply index template to existing same name index?

What is best method to apply index template?

---

<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 9, 2022, 11:03pm UTC](https://discuss.elastic.co/t/how-can-i-apply-index-template-and-ilm-to-existing-index/318529/2 "2022-11-09T23:03:48Z")

</div>

[Manage existing indices | Elasticsearch Guide [8.5] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.5/ilm-with-existing-indices.html) is the best place to start there, let us know if you have any questions 🙂

---

<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:** [December 7, 2022, 11:04pm UTC](https://discuss.elastic.co/t/how-can-i-apply-index-template-and-ilm-to-existing-index/318529/3 "2022-12-07T23:04:09Z")

</div>

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