Delete Documents Index

Hi all!!

I have read the documentation about the lifecicle but I have a simple question about it. Is possible delete the documents after X days?

I don't want to keep the docs because they are only to debug.

Thanks for all!

Hi @Kirtash. Thanks for your question!

There is no way to automatically remove documents from an index within elasticsearch. The closest thing would be a lifetime policy that:

  1. Performs a rollover of the index every day.
  2. Removes indices that are older that X days.

Another option would be to trigger a delete query using an external scheduler, like a cronjob.

1 Like

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