elasticsearch-5.6.1删除index下的某个type

由于elasticsearch-5.6.1不支持type直接删除,只能删除数据。

执行命令:

curl -H "Content-Type: application/json" -XPOST "http://localhost:9200/test_index/test_type/_delete_by_query?conflicts=proceed&pretty" -d '
{
"query": {
"match_all": {}
}
}'

即可删除test_index索引下type为test_type中的所有数据。

posted @ 2019-11-28 18:27  huazhiliange  阅读(733)  评论(0编辑  收藏  举报