ElasticSearch版本5.X删除type操作
# index_name是index / type_name是type
curl -XPOST -u user 'localhost:9200/index_name/type_name/_delete_by_query?conflicts=proceed&pretty' -H 'Content-Type: application/json' -d'
{
"query": {
"match_all": {}
}
}
'
如果ElasticSearch有权限,输入-u user,如果无权限,可省去。