zoukankan      html  css  js  c++  java
  • 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 ~]#

  • 相关阅读:
    算法
    UVA 10318 Security Panel(DFS剪枝 + 状压 + 思维)题解
    CodeForces 509C Sums of Digits(贪心乱搞)题解
    UVA 10382 Watering Grass(区间覆盖,贪心)题解
    CodeForces 430A Points and Segments (easy)(构造)题解
    CodeForces 459C Pashmak and Buses(构造)题解
    newcoder F石头剪刀布(DFS + 思维)题解
    newcoder H肥猪(单调队列 / 线段树)题解
    UVALive 7501 Business Cycle(二分)题解
    UVALive 7503 Change(乱搞)题解
  • 原文地址:https://www.cnblogs.com/rsapaper/p/8553389.html
Copyright © 2011-2022 走看看