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 ...
随机推荐
- python笔记2——关于列表的使用
一.列表的一些基本用法 names=["XiaoNaiyou", "XiaoNan", "WeiZhen", "WuCheng ...
- dos脚本》大神
关于dos命令行脚本编写 dos常用命令另查 开始之前先简单说明下cmd文件和bat文件的区别:在本质上两者没有区别,都是简单的文本编码方式,都可以用记事本创建.编辑和查看.两者所用的命令行代码也是共 ...
- (a ==1 && a== 2 && a==3) 有可能是 true 吗?
工作之余逛知乎的时候看到一个有意思的讨论,(a ==1 && a== 2 && a==3) 有可能是 true 吗?啊?一个变量同时满足三个条件?扯呢? 当然是我太天真 ...
- 微信公众号服务器配置url二次修改
最近微信公众号配置的服务器的域名和云服务到期,就想着更换到别的域名下的服务器:修改的时候出现token验证失败: 我同样的微信签名验证代码在以前服务器上是没问题的,但是修改到新的域名地址时候,总是提醒 ...
- mybatis 源码分析一
1.SqlSessionFactoryBuilder public SqlSessionFactory build(InputStream inputStream, String environme ...
- 获取Xcode工程所有的类名
有的时候在需求中需要获取工程中所有的类名.例如在获取工程中继承某个类的列表. 核心代码如下: unsigned ; const char **classes = nil; Dl_info info; ...
- JavaScript原型链及继承
在JavaScript中,所有的东西都是对象,但是JavaScript中的面向对象并不是面向类,而是面向原型的,这是与C++.Java等面向对象语言的区别,比较容易混淆,因此把我自己学习的过程记录下来 ...
- BarCodeUtile
package com.rscode.credits.util; import java.awt.image.BufferedImage; import java.io.ByteArrayOutput ...
- jq ajax数据交互
get 与 post 的区别 了解和使用 get和post是HTTP与服务器交互的方式, 说到方式,其实总共有四种:put,delete,post,get. 他们的作用分别是对服务器资源的增,删,改, ...
- 16.python-I/O模型
一.事件驱动模型1.什么是事件驱动模型:本身是一种编程范式,这里程序的执行是由外部事件来决定的.它的特点是包含一个事件循环,当外部事件发生时使用回调机制来触发相应的处理.常见的编程范式(单线程)同步以 ...