# Maximum age in hot phase vs. Move data into phase in warm phase

**URL:** <https://discuss.elastic.co/t/maximum-age-in-hot-phase-vs-move-data-into-phase-in-warm-phase/314934>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [September 22, 2022, 10:52am UTC](https://discuss.elastic.co/t/maximum-age-in-hot-phase-vs-move-data-into-phase-in-warm-phase/314934 "2022-09-22T10:52:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rosaLux161](https://avatars.discourse-cdn.com/v4/letter/r/71e660/32.png) [@rosaLux161](https://discuss.elastic.co/u/rosaLux161)\
**Post date:** [September 22, 2022, 10:52am UTC](https://discuss.elastic.co/t/maximum-age-in-hot-phase-vs-move-data-into-phase-in-warm-phase/314934/1 "2022-09-22T10:52:20Z")

</div>

Hey there,

I don't understand the difference between the two options. First, in the hot phase I can enter a maximum age after a rollover happens, but then in the warm phase I can also enter a maximum duration when the rollover happens.

Or am I just mixing two things with rollover and switch between phases?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 22, 2022, 4:21pm UTC](https://discuss.elastic.co/t/maximum-age-in-hot-phase-vs-move-data-into-phase-in-warm-phase/314934/2 "2022-09-22T16:21:17Z")

</div>

Hi @rosaLux161

Yeah a bit confusing...

`max_age` in the hot phase refers to maximum age before rollover... so you are forcing a rollover to happen at that ages (comes in useful sometimes)

`min_age` in the warm phase is how many days after rollover to move into warm...

I always suggest as you are getting used to ILM... is create the Policy in the UI then look at it in the API 🙂

Example

 ![Screen Shot 2022-09-22 at 9.18.41 AM](https://us1.discourse-cdn.com/elastic/original/3X/7/3/73c36216ceee60779006258a99d49c5f60287ce9.png)

 ![Screen Shot 2022-09-22 at 9.18.53 AM](https://us1.discourse-cdn.com/elastic/original/3X/2/3/239491aa9a3eaf1a82efc653e69fd9a52901f749.png)

```auto
GET _ilm/policy/discuss-test

{
  "discuss-test": {
    "version": 2,
    "modified_date": "2022-09-22T16:15:04.665Z",
    "policy": {
      "phases": {
        "hot": {
          "min_age": "0ms",
          "actions": {
            "rollover": {
              "max_primary_shard_size": "50gb",
              "max_age": "3d"
            },
            "set_priority": {
              "priority": 100
            }
          }
        },
        "warm": {
          "min_age": "7d",
          "actions": {
            "set_priority": {
              "priority": 50
            }
          }
        },
        "delete": {
          "min_age": "30d",
          "actions": {
            "delete": {
              "delete_searchable_snapshot": true
            }
          }
        }
      }
    },
    "in_use_by": {
      "indices": [],
      "data_streams": [],
      "composable_templates": []
    }
  }
}

```

---

<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:** [October 20, 2022, 4:22pm UTC](https://discuss.elastic.co/t/maximum-age-in-hot-phase-vs-move-data-into-phase-in-warm-phase/314934/3 "2022-10-20T16:22:16Z")

</div>

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