org.elasticsearch.client.RestHighLevelClient.deleteAsync()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(173)

本文整理了Java中org.elasticsearch.client.RestHighLevelClient.deleteAsync方法的一些代码示例,展示了RestHighLevelClient.deleteAsync的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RestHighLevelClient.deleteAsync方法的具体详情如下:
包路径:org.elasticsearch.client.RestHighLevelClient
类名称:RestHighLevelClient
方法名:deleteAsync

RestHighLevelClient.deleteAsync介绍

[英]Asynchronously deletes a document by id using the Delete API. See Delete API on elastic.co
[中]使用Delete API按id异步删除文档。见Delete API on elastic.co

代码示例

代码示例来源:origin: io.reactiverse/elasticsearch-client

@Override()
public void deleteAsync(DeleteRequest deleteRequest, RequestOptions options, Handler<AsyncResult<DeleteResponse>> handler) {
  Context context = vertx.getOrCreateContext();
  delegate.deleteAsync(deleteRequest, options, new ActionListener<DeleteResponse>() {
    @Override
    public void onResponse(DeleteResponse value) {
      context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
    }
    @Override
    public void onFailure(Exception e) {
      context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
    }
  });
}

代码示例来源:origin: eea/eea.elasticsearch.river.rdf

logger.info("===============================================================================");
client.deleteAsync(deleteRequest, new ActionListener<DeleteResponse>() {
  @Override
  public void onResponse(DeleteResponse deleteResponse) {

相关文章