Deleteedit

Phases allowed: delete.

Permanently removes the index.

Optionsedit

delete_searchable_snapshot
(Optional, Boolean) Deletes the searchable snapshot created in a previous phase. Defaults to true. This option is applicable when the searchable snapshot action is used in any previous phase.

If a policy with a searchable snapshot action is applied on an existing searchable snapshot index, the snapshot backing this index will NOT be deleted because it was not created by this policy. If you want to clean this snapshot, please delete it manually after the index is deleted using the delete snapshot API, you can find the repository and snapshot name using the get index API.

Exampleedit

response = client.ilm.put_lifecycle(
  policy: 'my_policy',
  body: {
    policy: {
      phases: {
        delete: {
          actions: {
            delete: {}
          }
        }
      }
    }
  }
)
puts response
PUT _ilm/policy/my_policy
{
  "policy": {
    "phases": {
      "delete": {
        "actions": {
          "delete" : { }
        }
      }
    }
  }
}