Vi Ngo Van
Vi Ngo Van

Reputation: 172

Delete automation records in elasticsearch

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

Answers (1)

v.karbovnichy
v.karbovnichy

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

Related Questions