elasticSearch 2.3 delete-by-query plugin
The delete-by-query plugin adds support for deleteing all of the documents which match the specified query.
It is a replacement for the problematic delete-by-query functionality which has been removed from the Elasticsearch core.
Internally, it uses Scolle and Bluk 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.
TIP:
Queries which match large numbers of documents may run for a long time, as every document had to be deleted individually. Don't use delete-by-query to clean out all or most documents in an index. Rather create a new index and perhaps reindex the document you want to keep.
Installation:
This plugin can be installed by the plugin manager:
bin/plugin install delete-by-query
The plugin must be installed on every node in the cluster, and each node must be restarted after installation.
Removal:
This plugin can be removed with the following command:
bin/plugin remove delete-by-query
The node must be stoped before removing the plugin.
Using delete-by-query
The query can be provided using a simple query string as a paremeter.
curl -XDELETE 'localhost:9200/twitter/tweet/_query?q=user:kimchy&pretty'
Delete-by-query supports deletion accoss multiple indics and multiple types.
IMPORTANT:
Delete by query will only delete the version of the document that was visible to search at the time the request was executed. Any documents that have been reindexed or updated during executiong will not be deleted.
The response record some counters for each index, the counters are as follows:
-found:
-deleted:
-missing: The number of documents that were missing when the plugin tried to delete them. Missing documents were percent when the original query was run, but have already been deleted by another process.
-failed:
Scroll Docs
While a search request returns a single page of results, the scroll API can be used to get large numbers of results from a single search request, in much the same way as you would use a cursor on a traditional database.
= =!
学英语系列
elasticSearch 2.3 delete-by-query plugin的更多相关文章
- elasticsearch 5.x Delete By Query API(根据条件删除)
之前在 2.X版本里 这个Delete By Query功能被去掉了 因为官方认为会引发一些错误 如需使用 需要自己安装插件. bin/plugin install delete-by-query 需 ...
- Elasticsearch学习笔记-Delete By Query API
记录关于Elasticsearch的文档删除API的学习 首先官网上Document APIs介绍了 Delete API 和Delete By Query API. Delete API可以通过指定 ...
- elasticsearch 2.4在head删除数据(使用Delete By Query插件)
之所以说明是2.4版,是因为不同版本删除的语法不一样(例如跟5.x就不同) 首先安装Delete By Query插件,方式跟安装head插件差不多,安装命令:plugin install delet ...
- elasticsearch 基础 —— Delete By Query API
Delete By Query API _delete_by_query 的简单用法,就是在查询匹配到的每个文档上执行删除.例如: POST twitter/_delete_by_query { &q ...
- elasticsearch6.7 05. Document APIs(5)Delete By Query API
4.Delete By Query API _delete_by_query API可以删除某个匹配条件的文档: POST twitter/_delete_by_query { "query ...
- Delete PeopleSoft Query From the Database
There could be different reasons why a PeopleSoft developer would like to delete a query from the da ...
- ElasticSearch query_string vs multi_match cross_fields query
ElasticSearch query_string vs multi_match cross_fields query 本文记录以字段为中心的查询和以词为中心的查询这两种查询方式的区别以及在Elas ...
- How to delete the eclipse plugin.
click Help-->installation Details 2. choose the plugin that you want to delete.Then click uninst ...
- Elasticsearch查询——布尔查询Bool Query
Elasticsearch在2.x版本的时候把filter查询给摘掉了,因此在query dsl里面已经找不到filter query了.其实es并没有完全抛弃filter query,而是它的设计与 ...
- Unity Dx9 Occlusion Query plugin
//Occlusion Unity plugin #include "UnityPluginInterface.h" #include <math.h>#include ...
随机推荐
- ionic iphone下的问题
1. nsunknownkeyexception Terminating app due to uncaught exception 'NSUnknownKeyException', reason: ...
- 博客 新址: https://pheromone.github.io/
该博客暂时调整歇业,小店地址暂时搬迁至: https://pheromone.github.io/ 该博客只做旧文章的维护工作. 博客 新址: https://pheromone.github.io ...
- Some notes in Stanford CS106A(1)
Karel world 1.During make a divider operation --int x=5; double y = x/2 => y=2 we need sth as a ...
- 清理maven本地库中的lastUpdated文件
通过CMD命令窗口进入响应的文件夹下 输入指令 for /r %i in (*.lastUpdated) do del %i
- ios 拉伸背景图中间图片不变四周拉伸
上图中间区域的翅膀不能变形,Android的点九能很好的解决,但是iOS的stretchableImageWithLeftCapWidth没法一次性指定拉伸区域,最后发现https://www.jia ...
- 【证明】【一题多解】布尔不等式(union bound)的证明
布尔不等式(Boole's inequality)也叫(union bound),即并集的上界,描述的是至少一个事件发生的概率(P(⋃iAi)" role="presentatio ...
- HBase学习笔记2 - HBase shell常用命令
转载请标注原链接:http://www.cnblogs.com/xczyd/p/6639397.html 扫表的时候限定行数 scan } 即为扫表的时候,限定只输出五条数据 ============ ...
- Codeforces1100F. Ivan and Burgers(离线+线性基)
题目链接:传送门 思路: 按查询的右端点离线. 然后从左到右维护线性基. 每个基底更新为最右边的方案,可以让尽量多的查询享受到这个基底. 用ci维护后更新右端点为i的答案. 代码(析构1000ms,别 ...
- PTA——出现次数最多的数
PTA 7-58 求整数序列中出现次数最多的数 #include<stdio.h> #define N 1000 int main() { ,flag; ]; scanf("%d ...
- jsp(待改)
##JSP 1.指令 作用:用于配置JSP页面,导入资源文件 *书写格式 <%@ 指令名称 属性1=值1,属性2=值2 ...%> *分类: *page :配置JSP页面的 #属性: c ...