elasticsearchwildcardhttp-delete

Permit wildcard deletions permanently?


To do this for the current session, you can do this:

PUT _cluster/settings
{
    "transient": {
        "action.destructive_requires_name": false
    }
}

... after that I can do DELETE ".../dummy* "

... but I want to do it permanently, so I tried this:

{
    "permanent": {
        "action.destructive_requires_name": false
    }
}

... fails with status 400: ""reason": "Validation Failed: 1: no settings to update;"".

Just to make sure, I tried set to true, with a view to setting to false afterwards. I got the same error with true.

Can anyone explain the failure and say whether it's possible to set this permanently?


Solution

  • It's not recommended but it's possible to set action.destructive_requires_name settings to false permanently.

    The name of the settings is NOT permanent but persistent.

    PUT _cluster/settings
    {
        "persistent": {
            "action.destructive_requires_name": false
        }
    }
    

    Updates made using the cluster update settings API can be persistent, which apply across cluster restarts, or transient, which reset after a cluster restart. You can also reset transient or persistent settings by assigning them a null value using the API.

    https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html#cluster-update-settings-api-desc