Problems creating a ILM correctly

I am having problems creating an ILM that fits my needs.
I have it done in another cluster but even trying to replicate it piece by piece ends in errors.


  • This is on Elastic Cloud using latest ES version
  • I will use rollover indexes that eventually will go to a different tier but to keep it simple let's ignore other tiers, thats not the problematic point.

My requirements are:

  • I have an index named: name-0001 (so its easy for ILM to create new indexes name-000X)
  • I want rollover indexes to be name-0002, 3, 4, etc. (thats auto-handled I know)
  • I want all indexes to be searched so I set an alias doing this:
  "actions": [
      "add": {
        "index": "name*",
        "alias": "name"

When rollover happened the 0001 index lose the "name" alias so it stop receiving searches.

How is the proper way of mixing the ILM and aliases?

so there are some misunderstandings here and some mistakes that cooperated to cause problems:

First of all, the reason why new indexes are not being included in the alias is, for achieving that, the alias SHALL be set on the index template. Otherwise, the alias is only applied to the indexes that already exist. Thats a newbie mistake and explains a few things.

Next: the rollover-target alias shall only point to ONE index. Thats going to be the new designated ingestion index.

... so in order to achieve the requirements I defined in the question my solution was:

1st Create an index
2nd Include that index in an alias through API (thats going to be rollover-target)
3rd define a different alias on the template e.g. name-all

This was we will have all indexes included in the "name-all" alias and the write index rotating to each new created index after rollover happens.

1 Like

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