# TTL gone in 5.0 -OMG

**URL:** <https://discuss.elastic.co/t/ttl-gone-in-5-0-omg/93028>\
**Category:** Elasticsearch\
**Created:** [July 13, 2017, 2:20pm UTC](https://discuss.elastic.co/t/ttl-gone-in-5-0-omg/93028 "2017-07-13T14:20:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [July 13, 2017, 2:54pm UTC](https://discuss.elastic.co/t/ttl-gone-in-5-0-omg/93028/2 "2017-07-13T14:54:03Z")

</div>

TTL is not coming back in the foreseeable future. Probably not ever.

While your user experience may have been acceptable, it was not so for every user. The effect on the underlying Lucene structures is not ideal, as it drastically affects tiered merging of segments (under the hood — you never see it as a user unless you know how to look for it), to say nothing of the increased I/O load required to perform it. Additionally, some users were using it in lieu of better practices (like using time-series indices) which _their_ use cases _should_ have been using.

Another reason TTL was removed is that its default behavior was to scan _all_ of the documents in the specified index every 60 seconds to see if the TTL expired. For larger indices, the overhead of this became astronomical. It really was a suboptimal solution for the desired outcome, even if you feel it worked well for your use case.

There are still other reasons, which you can read about in GitHub and perhaps in some of the release notes/blogs.

As you mentioned, the workaround to not having TTL (but wanting it) is to use the delete\_by\_query plugin instead. Yes, it requires scheduling on your part.

You'd probably do just as well—if not better—by using aliases to associate a series of time-series indices (making them behave as one index for querying purposes), and drop indices after they exceed your desired retention period. As far as keeping things tied down to single indices per 'job', have you investigated using [the rollover API](https://www.elastic.co/guide/en/elasticsearch/reference/5.5/indices-rollover-index.html)? It could feature in to a scheme like this very nicely.

---

_[View the full topic](https://discuss.elastic.co/t/ttl-gone-in-5-0-omg/93028)._
