• 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 ~]#

  • 相关阅读:
    ARC109 题解&总结 ABCDEF
    List、Set、Map的学习
    数据结构和算法-栈
    spring-常见知识点(一)
    spring-AOP实现原理(二)
    spring-AOP实现原理(一)
    MVCC详解
    MVCC能否解决幻读
    ArrayList和LinkedList的区别
    架构设计-秒杀架构设计
  • 原文地址:https://www.cnblogs.com/rsapaper/p/8553389.html
Copyright © 2020-2023  润新知