概述
今天忽然需要删除某个索引下面的某个type下面的所有xxxx字段以lrz开头的数据,查看elasticsearch2.4.4文档,发现只有根据id一个一个删除,类似如下写法:
$ curl -XDELETE ‘http://localhost:9200/twitter/tweet/1’
查看文档,没有满足该类需求的方法,偶然看见文档如下:
Delete By Query Pluginedit
The delete-by-query plugin adds support for deleting all of the documents (from one or more indices) which match the specified query. It is a replacement for the problematic delete-by-queryfunctionality which has been removed from Elasticsearch core.Internally, it uses Scroll and Bulk APIs to delete documents in an efficient and safe manner. It is slower than the old delete-by-query functionality, but fixes the problems with the previous implementation.
To understand more about why we removed delete-by-query
最后
以上就是害羞紫菜为你收集整理的elasticsearch2.4.4多行删除的全部内容,希望文章能够帮你解决elasticsearch2.4.4多行删除所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复