码迷,mamicode.com
首页 > 其他好文 > 详细

elasticsearch-5.6.1删除index下的某个type

时间:2019-11-28 18:53:26      阅读:92      评论:0      收藏:0      [点我收藏+]

标签:cts   localhost   cse   host   elastics   div   arc   cee   post   

由于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中的所有数据。

elasticsearch-5.6.1删除index下的某个type

标签:cts   localhost   cse   host   elastics   div   arc   cee   post   

原文地址:https://www.cnblogs.com/tanglc/p/11951956.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!