elasticsearch-5.6.1删除index下的某个type

因为elasticsearch-5.6.1不支持type直接删除,只能删除数据。json

执行命令:app

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中的全部数据。curl

相关文章
相关标签/搜索