Last query date for an index

Hi There!

I'm trying to create a rule either ILM or programmatically to remove unused indices
I'm interested on deleting an index that hasn't been queried in more than 30 days, the index contains static data (html pages) so I ingest all documents just once when the index is created. Once created and populated the index just gets _search operations, no updates, no deletes, no new documents.

Is there any way to create ILM policy or have last Search timestamp for an index, so I can create a cleaning process that deletes indices that hasn't been queried in more than 30 days??

Welcome to our community! :smiley:

That's not something that ILM tracks. AFAIK there's nothing in Elasticsearch that tracks it either.

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