# Managing indices post Rollover

**URL:** <https://discuss.elastic.co/t/managing-indices-post-rollover/154757>\
**Category:** Elasticsearch\
**Created:** [October 31, 2018, 7:04am UTC](https://discuss.elastic.co/t/managing-indices-post-rollover/154757 "2018-10-31T07:04:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![NerdSec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nerdsec/32/22056_2.png) [@NerdSec](https://discuss.elastic.co/u/NerdSec)\
**Post date:** [October 31, 2018, 7:04am UTC](https://discuss.elastic.co/t/managing-indices-post-rollover/154757/1 "2018-10-31T07:04:17Z")

</div>

I know this question has been asked previously, but the answers provided earlier are outdated and do not apply to the current scenario.

We have recently moved to using the Rollover API to create new indices in order to get even shard size. However, this does not provide any mechanism to delete the older indices in an automated manner.

Earlier, we created daily indices with a timestamp (%Y.%m.%d) which would then be used by Curator to [delete indices](https://discuss.elastic.co/t/managing-old-indices/73850). But without a timestamp how do i tell curator to perform any action?

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [October 31, 2018, 2:57pm UTC](https://discuss.elastic.co/t/managing-indices-post-rollover/154757/2 "2018-10-31T14:57:11Z")

</div>

The [`age`](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.5/filtertype_age.html) filter in Curator is not limited to using `source: name`. There is also `source: creation_date` and `source: field_stats`—which determines the oldest or youngest timestamp in the index, and can use either to determine whether an index is ready for further action.

---

<div class="post-metadata">

**Author:** ![NerdSec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nerdsec/32/22056_2.png) [@NerdSec](https://discuss.elastic.co/u/NerdSec)\
**Post date:** [November 1, 2018, 5:12am UTC](https://discuss.elastic.co/t/managing-indices-post-rollover/154757/3 "2018-11-01T05:12:34Z")

</div>

Hi Aaron,

Thanks a lot! Yes, that is exactly what I wanted and it works.  
[https://www.elastic.co/guide/en/elasticsearch/client/curator/current/fe\_source.html#\_literal\_field\_stats\_literal\_based\_ages\_2](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/fe_source.html#_literal_field_stats_literal_based_ages_2)

I didn't try this because i read that the `field_stats` API was deprecated.

Is Curator using range queries in the background to do this?

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [November 1, 2018, 5:33am UTC](https://discuss.elastic.co/t/managing-indices-post-rollover/154757/4 "2018-11-01T05:33:51Z")

</div>

Yes. I preserved the name because it made sense to do so.

---

<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:** [November 29, 2018, 5:33am UTC](https://discuss.elastic.co/t/managing-indices-post-rollover/154757/5 "2018-11-29T05:33:56Z")

</div>

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