Index not getting deleted as per ILM

Hi,
We are using Elastic cloud version 7.17.
We have created one index template and one ILM policy to delete indexes after 90 days.
In th ILM we are not using rollover.
Assigned this policy to index template.
We have 120 days of history data in the source and on single day we have created 120 indexes in elastic.
Index name format is xxx- YYYYMMDD

Out 120 indices only 90 should remain there and rest should be deleted as per ILM policy. But none of the indexes getting deleted.
What is the reason of index not getting deleted?

Did you create the historic indices on the same day?

The ILM per default uses the creation date of the index, so if you create an index today it will only
be deleted after 90 days, it doesn't matter if the index name if from a date before.

You can control this by changing some settings on the indices, but you will need to change the settings on all your indices, take a look on this blog post on how to make ILM take other dates in consideration.

Yes, I have created historic indices on same day.

Hi,
Yes, I have created historic indices on same day.
Can we change the format of the date to YYYYMMDD instead of YYYY.MM.DD?

You can't change an index name after it was created, only if you recreate it by reindexing, but there is no need to.

You can set manually set the origination date of the index with the setting index.lifecycle.origination_date as described in the blog post linked in the previous answer, you just need to convert the date to unix epoch with milliseconds and set it on your indices.

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