Manual rollover from hot state to warm state

I have a policy which has Hot, Warm and Cold faces. indices are managed.
I need to manually rollover hot state index to warm state, in case of mappings changes.
I tried rollover but old index and new index both stay in hot state, how can i change state of old index to warm.

Setting “index.lifecycle.indexing_complete” to true works fine in ILM.

Thanks

did you find a solution that works in open distro elasticsearch. i have a similar issue

Its been a couple of years since this thread started :slight_smile: Is there any documented way / API endpoint / best practices for manually transitioning to a new ISM state? Specifically, manually instigating a roll over? I’ve changed some mappings and I would like to have the current ISM index roll over so that the new index uses the new mapping…

Do I need to manually create the next index, and manually switch the write index setting in the Alias? And if so, how do I move the previous write index into the next stage? i.e. from Hot to Warm? Do I need to create a new policy that does not include the roll over phase and assign that new policy to the previous index?

Hi Seth! I definitely have to congratulate you on your persistence. To be honest, I feel terrible, as I have no idea off the top of my head. However, the maintainers of the repo for index management should be able to help you out.

@nateynate ,
I am not sure if this indicates persistence, or insanity, but I have found the solution and I wanted to share it here, just in case other people have this question.

I am also not sure if it was always this simple, or it was made more simple in newer versions of OpenSearch than I was using at the time of my original question. I am presently using OpenSearch 2.8.

As a reminder, ISM checks the conditions for operations on every execution of the policy based on the set interval, not continuously. The rollover will be performed if the value has reached or has exceeded the configured limit when the check is performed.

Sample policy with ISM template for auto rollover - from latest OpenSearch documentation.

If there is a requirement to have this roll-over process happen before the set criteria is met, for example to update the mapping of newly created indexes based on a template update, the rollover action can be triggered with a POST action.

Force the rollover action given an index alias

POST my_ism_rollover_alias/_rollover
Notice that the argument is the rollover_alias alias name, NOT the index name.

Some other related and possibly useful commands

Determine the rollover alias name of an index

GET my_ism_managed_index-000001/_settings?filter_path=*.settings.index.plugins.index_state_management.rollover_alias

Determine which index is the write target of an alias

GET _cat/aliases/my_ism_rollover_alias?v&h=alias,index,is_write_index&s=is_write_index:desc