Reputation: 172
I am using elastic search. I want to store data in a date range. I want to remove old data.
I use api for deleting data in date range which i want to remove.
I see time to live api in ES but it is deprecated.
Thank you.
Upvotes: 1
Views: 137
Reputation: 3316
You can use time-based idex name patterns such as myindex-YYYY-MM-DD
and drop old indexes on demand
See https://www.elastic.co/guide/en/elasticsearch/guide/current/time-based.html
To delete old indices you should use Curator and its index deletion feature.
Upvotes: 3