0

I've a lot of elasticsearch clusters which hold the historical indices(more than 10 years old), some of these indices are created newly with latest settings and fields, but old ones are not deleted.

Now I need to delete the old indices which are not receiving any search and index requests.

I've already gone to elasticsearch curator but it would not work with older version of ES.

Is there is any API which can just gives the last time of index and search request in ES, that would serve my purpose very well.

EDIT:- I've also check https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html but this also doesn't give the last time when indexing or search request came. all it gave is the number of these requests from last restart.

  • If you have a data timestamp then you can sort on it to find the last document that came in. You could also look at the physical directory of the segment files and get some clue. – aswath86 Feb 25 '20 at 14:18
  • @WinnieDaPooh tq for your suggestions, we have timestamp of each doc but unfortunately that is only for index operation and mine is read heavy system and we are not updating the timestamp on read operation, also looking at segment files isn't option as I need to delete 1000s of old indices –  Feb 25 '20 at 15:36

0 Answers0