# How to apply ILM to ML indices? If not possible what,s the workaround?

**URL:** <https://discuss.elastic.co/t/how-to-apply-ilm-to-ml-indices-if-not-possible-what-s-the-workaround/385310>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-machine-learning\
**Created:** [March 3, 2026, 6:47am UTC](https://discuss.elastic.co/t/how-to-apply-ilm-to-ml-indices-if-not-possible-what-s-the-workaround/385310 "2026-03-03T06:47:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Whoami1980](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/whoami1980/32/147545_2.png) [@Whoami1980](https://discuss.elastic.co/u/Whoami1980)\
**Post date:** [March 3, 2026, 6:47am UTC](https://discuss.elastic.co/t/how-to-apply-ilm-to-ml-indices-if-not-possible-what-s-the-workaround/385310/1 "2026-03-03T06:47:15Z")

</div>

Understand that ILM cannot be used on ML results indices. ILM is used on the ML state index out-of-the-box.

Seems like this is a long open enhancement.  
[ML] Add an ML results index rollover endpoint · Issue #29946 · elastic/elasticsearch · GitHub

The size of each ML results index can be kept down by using a custom index per job instead of the shared results index.

Could anyone guide us with example on how we can do that?

---

<div class="post-metadata">

**Author:** ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)\
**Post date:** [March 3, 2026, 7:31pm UTC](https://discuss.elastic.co/t/how-to-apply-ilm-to-ml-indices-if-not-possible-what-s-the-workaround/385310/2 "2026-03-03T19:31:37Z")

</div>

See the API documentation: [Create an anomaly detection job | Elasticsearch API documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-job)

See:

- results\_index\_name
- results\_retention\_days
