# Index lifecyle management

**URL:** <https://discuss.elastic.co/t/index-lifecyle-management/355131>\
**Category:** Elasticsearch\
**Created:** [March 11, 2024, 8:05am UTC](https://discuss.elastic.co/t/index-lifecyle-management/355131 "2024-03-11T08:05:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Satheesh\_Nehru](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/satheesh_nehru/32/132507_2.png) [@Satheesh\_Nehru](https://discuss.elastic.co/u/Satheesh_Nehru)\
**Post date:** [March 11, 2024, 8:05am UTC](https://discuss.elastic.co/t/index-lifecyle-management/355131/1 "2024-03-11T08:05:43Z")

</div>

Consider i have index rollver enable with Ilm policy for every 1gb of data .  
index will have timestamp. current write index will have post\_write alias .

now i want to query current index and previous index .How can this be handled.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 24, 2024, 8:42am UTC](https://discuss.elastic.co/t/index-lifecyle-management/355131/2 "2024-03-24T08:42:16Z")

</div>

If you just want to query specific indices you need to explicitly spacify them. If you are using a range clause for the timestamp that means only data in the last 2 indices will get matched I would recommend querying all indices in the pattern. Executing a query against an index that does not have any data fitting the specified time range is very quick and adds limited overhead.

---

<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:** [April 21, 2024, 8:43am UTC](https://discuss.elastic.co/t/index-lifecyle-management/355131/3 "2024-04-21T08:43:02Z")

</div>

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