Skip to content

Instantly share code, notes, and snippets.

@inqueue
Last active November 5, 2019 21:47
Show Gist options
  • Save inqueue/0fc4e981014891a4b84feed04b02c5d5 to your computer and use it in GitHub Desktop.
Save inqueue/0fc4e981014891a4b84feed04b02c5d5 to your computer and use it in GitHub Desktop.

Manual index rollover with ILM

  1. Stop ILM

    POST /_ilm/stop
    
  2. Call the Rollover API on the write alias

    POST /write_alias_name/_rollover
    {
      "conditions": {
        "max_docs": 1
      }
    }
    
  3. After rollover, a new write index will be creatd. Set "index.lifecycle.indexing_complete": true on the previous write index.

  4. Start ILM

    POST /_ilm/start
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment