ElasticSearch,如何使用通配符删除多个索引

lyfkaqu1  于 2022-10-06  发布在  ElasticSearch
关注(0)|答案(1)|浏览(270)

我想删除所有*-meow索引。

DELETE不允许使用通配符表达式

{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Wildcard expressions or all indices are not allowed"}],"type":"illegal_argument_exception","reason":"Wildcard expressions or all indices are not allowed"},"status":400}

我怎么删除它们,有很多..

jvidinwx

jvidinwx1#

请参考https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-index.html中的action.destructive_requires_name,它控制删除操作中wildcard的使用。

PUT_CLUSTER/设置

{
    "transient": {
        "action.destructive_requires_name": false // allow wildcards
    }
}

相关问题