Best practice for expiring data in v6

Perviously we had the _ttl option (i've not used it) but now thats gone what is the recommended way to delete old data?

My data will have a timestamp, so I could regularly call the api and delete records past a certain date, but wasnt sure if there was a better way of doing this?

Thanks

You can use Delete By Query API and run that every x minutes/day/xxx depending on your needs.

But removing a lot of data is not ideal. Better to use timebased indices and simply drop an index entirely when its data is too old.

HTH

I will be inserting and therefore deleting around 150'000 documents per day, so time based indicies will probably be a better option.

I assume having a new index per day would be adequate.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.