# Limit the age of documents in a rollup job

**URL:** <https://discuss.elastic.co/t/limit-the-age-of-documents-in-a-rollup-job/254865>\
**Category:** Elasticsearch\
**Tags:** rollups\
**Created:** [November 10, 2020, 8:18am UTC](https://discuss.elastic.co/t/limit-the-age-of-documents-in-a-rollup-job/254865 "2020-11-10T08:18:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Culme](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/culme/32/78061_2.png) [@Culme](https://discuss.elastic.co/u/Culme)\
**Post date:** [November 10, 2020, 8:18am UTC](https://discuss.elastic.co/t/limit-the-age-of-documents-in-a-rollup-job/254865/1 "2020-11-10T08:18:15Z")

</div>

Hi Forum.  
Is it possible to limit the age of documents being included in a rollup?

I have been experimenting a bit with rollups, and there's one thing I'm missing.  
When you create a new rollup job and schedule it to run e.g. once a day, it will roll up documents from the previous 24h on each run. EXCEPT for the first time it runs - because the first time it will roll up all documents currently available in the index being rolled up.  
For me, this had Elastic stumbling for 48 hours while doing rollups for six weeks or so worth of documents. When you then realize you did something wrong in the settings, you need to change and start again, there will be 48 more hours...

I would like to be able to specify a max age, e.g. 48 hours, and each time the rollup job runs it should ignore documents older than that. Is this possible in any way?

Thanks in advance & best regards  
Culme

---

<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:** [December 8, 2020, 8:18am UTC](https://discuss.elastic.co/t/limit-the-age-of-documents-in-a-rollup-job/254865/2 "2020-12-08T08:18:16Z")

</div>

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