Index alias

Hi all,
I am a beginner in elastic and I've inherited an environment in elastic cloud.
I have an index that ends with a dash, let's call it indexname-
Developers wrote code to insert records to this index name.
There is no index template and no lifecycle management.
Now I want to perform some order in the mess that is currently happening.
I want to create an ILM and also to change the index name to something more normal like indexname-000001

Now here comes my question, forget about the index rename for now, assuming data is not important and I create a new index with a proper name as mentioned above.
I guess I need to create an index template with an alias named indexname
Then ask for the developers to change the reference in their code to indexname instead of indexname-, will this cause the code to write to my index indexname-00001?

Also after creating the ILM it will automatically create a new index named indexname-000002 and point the alias to this index?

Thanks in advance for your patience to a novice.

Yes , your understanding is correct. The rollover strategy would depend upon the ism policy you define.

Welcome to our community! :smiley:

You could also use an alias so there's no code changes needed.

Great guys,
Thanks for your help

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