码迷,mamicode.com
首页 > Windows程序 > 详细

elasticsearch 中文API 删除(四)

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

标签:

删除API

删除api允许你通过id,从特定的索引中删除类型化的JSON文档。如下例:

DeleteResponse response = client.prepareDelete("twitter", "tweet", "1")
        .execute()
        .actionGet();

操作线程

The get API allows to set the threading model the operation will be performed when the actual execution of the API is performed on the same node (the API is executed on a shard that is allocated on the same server).

默认情况下,operationThreaded设置为true表示操作执行在不同的线程上面。下面是一个设置为false的例子。

DeleteResponse response = client.prepareDelete("twitter", "tweet", "1")
        .setOperationThreaded(false)
        .execute()
        .actionGet();

elasticsearch 中文API 删除(四)

标签:

原文地址:http://www.cnblogs.com/bmaker/p/5472431.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!