ES 执行操作DELETE /dmtv_20230415*
出现一下问题
"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
}
问题解决:
Elasticsearch文档说:
删除索引 API 也可以应用于多个索引,方法是使用逗号分隔列表,或者使用 _all 或 *as 索引应用于所有索引(小心!)。
为了禁用允许通过通配符或 _all 删除索引,请将配置中的 action.destructive_requires_namesetting 设置为 true。也可以通过集群更新设置 api 更改此设置。
PUT /_cluster/settings
{
"transient": {
"action.destructive_requires_name": true
}
}