Purge data within a date range from an Elasticsearch database

How could I purge everything older than a date say (x/x/xxxx) from an Elasticsearch database?


There is an efficient way and an inefficient way. The efficient way is to name your index with a date or week in it and delete the entire index when you don't need it any more. The inefficient way is to use the delete-by-query plugin with a date range. The first option will immediately free up space. The second one will free up space eventually, but how and when it does it is quite complex.

I was trying to use curator to do this automatically.

Is that not working?

(Also, ES is not a database)