# How to rollover data stream during reindex

**URL:** https://discuss.elastic.co/t/how-to-rollover-data-stream-during-reindex/359765
**Category:** Elasticsearch
**Tags:** ilm-index-lifecycle-management, reindex, datastreams
**Created:** [May 19, 2024, 3:20pm UTC](https://discuss.elastic.co/t/how-to-rollover-data-stream-during-reindex/359765 "2024-05-19T15:20:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jacob.k](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@jacob.k](https://discuss.elastic.co/u/jacob.k)
#### Post date: [May 19, 2024, 3:20pm UTC](https://discuss.elastic.co/t/how-to-rollover-data-stream-during-reindex/359765/1 "2024-05-19T15:20:40Z")

</div>

I have an index with size 5gb.  
I would like to reindex it to a data stream with rollover policy of max size 1gb and 7 days.

This is my policy

```auto
PUT _ilm/policy/jacob_policy
{
  "policy": {
    "phases": {
      "hot": {
        "actions": {
          "rollover": {
            "max_age": "1d",
            "max_size": "1gb"
          }
        }
      }
    }
  }
}

```

When I perform the reindex, all the data is saved in a single backing index, while I expected it to be ~5 indices.

Why isn't the rollover triggered?  
Is there a way to force the rollover during reindex?

I also tried to read from the source index and bulk insert to the data stream.  
This did create a new backing index, but not after the index size reached 1gb.  
The new backing index was created after the 1st index reached 2.4gb.  
Why is that?  
How can I make sure a rollover occurs as expected?

Thanks!

---

<div class="post-metadata">

### Author: ![dakrone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dakrone/32/23351_2.png) [@dakrone](https://discuss.elastic.co/u/dakrone)
#### Post date: [May 19, 2024, 3:42pm UTC](https://discuss.elastic.co/t/how-to-rollover-data-stream-during-reindex/359765/2 "2024-05-19T15:42:15Z")

</div>

Hi there, the ILM rollover is only checked every 10 minutes by default, you can change the `indices.lifecycle.poll_interval` setting to a lower setting during your reindexing to make sure that it checks more frequently.
