es bulk 批量删除
bulk
[root@hadoop2 ~]# cat bulk.del.es.json
{"delete":{"_index":"direct_vote","_type":"kwaddress","_id":"b2b.88152.com/show-3005770.html"}}
{"delete":{"_index":"direct_vote","_type":"kwaddress","_id":"b2b.88152.com/show-3005770.html"}}
{"delete":{"_index":"direct_vote","_type":"kwaddress","_id":"b2b.88152.com/show-3005770.html"}}
{"delete":{"_index":"direct_vote","_type":"kwaddress","_id":"b2b.88152.com/show-3005770.html"}}
{"delete":{"_index":"direct_vote","_type":"kwaddress","_id":"b2b.88152.com/show-3005770.html"}}
{"delete":{"_index":"direct_vote","_type":"kwaddress","_id":"b2b.88152.com/show-3005775.html"}}
{"delete":{"_index":"direct_vote","_type":"kwaddress","_id":"b2b.88152.com/show-3005760.html"}}
[root@hadoop2 ~]#
[root@hadoop2 ~]# curl -XPOST hadoop2:9200/_bulk --data-binary @bulk.del.es.json
{"took":43,"errors":false,"items":[{"delete":{"_index":"direct_vote","_type":"kwaddress","_id":"b2b.88152.com/show-3005770.html","_version":1,"_shards":{"total":2,"successful":1,"failed":0},"status":404,"found":false}},{"delete":{"_index":"direct_vote","_type":"kwaddress","_id":"b2b.88152.com/show-3005770.html","_version":2,"_shards":{"total":2,"successful":1,"failed":0},"status":404,"found":false}},{"delete":{"_index":"direct_vote","_type":"kwaddress","_id":"b2b.88152.com/show-3005770.html","_version":3,"_shards":{"total":2,"successful":1,"failed":0},"status":404,"found":false}},{"delete":{"_index":"direct_vote","_type":"kwaddress","_id":"b2b.88152.com/show-3005770.html","_version":4,"_shards":{"total":2,"successful":1,"failed":0},"status":404,"found":false}},{"delete":{"_index":"direct_vote","_type":"kwaddress","_id":"b2b.88152.com/show-3005770.html","_version":5,"_shards":{"total":2,"successful":1,"failed":0},"status":404,"found":false}},{"delete":{"_index":"direct_vote","_type":"kwaddress","_id":"b2b.88152.com/show-3005775.html","_version":2,"_shards":{"total":2,"successful":1,"failed":0},"status":200,"found":true}},{"delete":{"_index":"direct_vote","_type":"kwaddress","_id":"b2b.88152.com/show-3005760.html","_version":2,"_shards":{"total":2,"successful":1,"failed":0},"status":200,"found":true}}]}[root@hadoop2 ~]#
[root@hadoop2 ~]#