# Time to live alternative in complex scenario

**URL:** <https://discuss.elastic.co/t/time-to-live-alternative-in-complex-scenario/53280>\
**Category:** Elasticsearch\
**Created:** [June 20, 2016, 7:59am UTC](https://discuss.elastic.co/t/time-to-live-alternative-in-complex-scenario/53280 "2016-06-20T07:59:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anders\_Reimer](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@Anders\_Reimer](https://discuss.elastic.co/u/Anders_Reimer)\
**Post date:** [June 20, 2016, 7:59am UTC](https://discuss.elastic.co/t/time-to-live-alternative-in-complex-scenario/53280/1 "2016-06-20T07:59:30Z")

</div>

In an application with around 10 million documents I have a problem around TTL - which is deprecated. The indexing application receives updates every day - which should replace any old version of the same document. Some document are updated daily, some weekly and some monthly.  
The problem is that if updates to a document is not received in a period of time, the document should be removed, so it is no longer available for search - a perfect scenario for TTL - but since it is deprecated I have to find another solution.

2-3 million document are received daily within a short period of time, so batch indexing is needed - currently solved by using custom document id, making inserts of the same document overwrite the old version of the document.

Does anyone have a good idea on how to solve this..?

---

<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:** [July 5, 2017, 10:42pm UTC](https://discuss.elastic.co/t/time-to-live-alternative-in-complex-scenario/53280/2 "2017-07-05T22:42:25Z")

</div>


