I have an index in elasticsearch with is occupied by some json files with respected to timestamp. I want to delete data from that index.
curl -XDELETE http://localhost:9200/index_name
Above code deletes the whole index. My requirement is to delete certain data after a time period(for example after 1 week). Could I automate the deletion process?
I tried to delete by using curator.
But I think it deletes the indexes created by timestamp
, not data with in an index. Can we use curator for delete data within an index?
It will be pleasure if I get to know that either of following would work:
- Can Curl Automate to delete data from an index after a period?
- Can curator Automate to delete data from an index after a period?
- Is there any other way like python scripting to do the job?
References are taken from the official site of elasticsearch.
Thanks a lot in advance.