Automatically deleting older documents

No cluster has an infinite capacity to retain data forever. With the volume growing over a period of time, you may decide to only store necessary data in Elasticsearch. Typically, you may want to retain data for the past few weeks, months, or years in Elasticsearch, depending on your use case.

Prior to Elasticsearch 2.x, this was achieved using TTL (Time to Live) set on individual documents. Each document could be configured to remain in the index for a configurable amount of time. But, the TTL feature was deprecated with the 2.x version because of its overheads in maintaining time-to-live on a per-document basis.

We have seen some problems that we might face while dealing with time series data. Now, let's look at how the use of time-based indexes addresses these issues. Time-based indexes are also called index-per-timeframe:

  • How index-per-timeframe solves these issues
  • How to set up index-per-timeframe
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset