首页 > Windows开发 > 详细

elasticsearch 中文API 基于查询的删除(九)

时间:2016-05-09 01:41:09      阅读:175      评论:0      收藏:0      [点我收藏+]

基于查询的删除API

基于查询的删除API允许开发者基于查询删除一个或者多个索引、一个或者多个类型。下面是一个例子。

import static org.elasticsearch.index.query.FilterBuilders.*;
import static org.elasticsearch.index.query.QueryBuilders.*;

DeleteByQueryResponse response = client.prepareDeleteByQuery("test")
        .setQuery(termQuery("_type", "type1"))
        .execute()
        .actionGet();

elasticsearch 中文API 基于查询的删除(九)

原文:http://www.cnblogs.com/bmaker/p/5472438.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!