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的更多相关文章

  1. elasticsearch 5.x Delete By Query API(根据条件删除)

    之前在 2.X版本里 这个Delete By Query功能被去掉了 因为官方认为会引发一些错误 如需使用 需要自己安装插件. bin/plugin install delete-by-query 需 ...

  2. Elasticsearch学习笔记-Delete By Query API

    记录关于Elasticsearch的文档删除API的学习 首先官网上Document APIs介绍了 Delete API 和Delete By Query API. Delete API可以通过指定 ...

  3. elasticsearch 2.4在head删除数据(使用Delete By Query插件)

    之所以说明是2.4版,是因为不同版本删除的语法不一样(例如跟5.x就不同) 首先安装Delete By Query插件,方式跟安装head插件差不多,安装命令:plugin install delet ...

  4. elasticsearch 基础 —— Delete By Query API

    Delete By Query API _delete_by_query 的简单用法,就是在查询匹配到的每个文档上执行删除.例如: POST twitter/_delete_by_query { &q ...

  5. 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 ...

  6. Delete PeopleSoft Query From the Database

    There could be different reasons why a PeopleSoft developer would like to delete a query from the da ...

  7. ElasticSearch query_string vs multi_match cross_fields query

    ElasticSearch query_string vs multi_match cross_fields query 本文记录以字段为中心的查询和以词为中心的查询这两种查询方式的区别以及在Elas ...

  8. How to delete the eclipse plugin.

    click  Help-->installation Details 2. choose the plugin that you want to delete.Then click uninst ...

  9. Elasticsearch查询——布尔查询Bool Query

    Elasticsearch在2.x版本的时候把filter查询给摘掉了,因此在query dsl里面已经找不到filter query了.其实es并没有完全抛弃filter query,而是它的设计与 ...

  10. Unity Dx9 Occlusion Query plugin

    //Occlusion Unity plugin #include "UnityPluginInterface.h" #include <math.h>#include ...

随机推荐

  1. Ricker wavelet 简介

    本文依照参考文献简介 Ricker wavelet . 参考: [1] Frequency of the Ricker wavelet DOI: 10.1190/GEO2014-0441.1 [2] ...

  2. Redis学习笔记一

    Redis 与其他 key - value 缓存产品有以下三个特点:    Redis支持数据的持久化,可以将内存中的数据保存在磁盘中,重启的时候可以再次加载进行使用.    Redis不仅仅支持简单 ...

  3. [转载]前端 阿里p6面试题集锦含答案

    1.说一下你了解CSS盒模型. 盒模型分为:IE的怪异盒模型和标注浏览器的盒模型,然后可以通过box-sizing属性控制两种盒模型的变换. 2.说一下box-sizing的应用场景. 这个也不难,简 ...

  4. Angular/cli 安装(windows环境)。

    1.卸载先前安装的Angular/cli npm uninstall -g angular-clinpm uninstall --save-dev angular-clinpm uninstall - ...

  5. SpringBoot的启动流程分析(1)

    通过分析我们可以找到 org.springframework.boot.SpringApplication 中如下, public static ConfigurableApplicationCont ...

  6. 常用css

    边框 css   基本设置:border:1px solid #d2d2d2;    风格有:solid=>实线 double=>双实线 dotted=>点状 dashed=> ...

  7. 掷骰子DApp的实现

    前言:​ DApp前些日子比较火, 这段时间有些低迷. 我也是后知后觉, 现在才接触一些, 这篇博文就当做DApp的初次印象吧.​ 本文要写的是基于智能合约的博彩游戏DApp—骰子游戏, 来看看它是怎 ...

  8. .Net中World转PDF

    using System;using System.Collections.Generic;using System.Linq;using System.Web;using Aspose.Words; ...

  9. 第一次实验: CC2530平台上电源管理与休眠

    实验一 CC2530平台上电源管理与休眠 实验目的: 加深和巩固学生对于TinyOS编程方法的理解和掌握 让学生初步的认识TinyOS编程的基础和简单的程序编写 学生通过本实验能够初步的了解和掌握Ti ...

  10. 自适应reset.js布局 用于手机端页面编写

    以下是reset.js具体内容,是从淘宝网站拔下来的.把它存为js文件引入html里,它的默认尺寸是iphone4的分辨率也就是320*480,美工给你的图不管多少尺寸用ps量图后像素值(px)除以4 ...