Switching policies for an index

edit

Setting index.lifecycle.name to a different policy behaves much like a policy update, but instead of just switching to a different version, it switches to a different policy.

After setting a policy for an index, we can switch out my_policy with my_other_policy by just updating the index’s index.lifecycle.name setting to the new policy. After completing its currently executed phase, it will move on to the next phase in my_other_policy. So if it was on the hot phase before, it will move to the delete phase after the hot phase concluded.

PUT my_index/_settings
{
  "lifecycle.name": "my_other_policy"
}

The change to the new policy will not happen immediately. The currently executing phase of the existing policy for my_index will continue to execute until it completes. Once completed, my_index will move to being managed by the my_other_policy.