因爲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