本文整理了Java中org.elasticsearch.client.RestHighLevelClient.searchAsync
方法的一些代码示例,展示了RestHighLevelClient.searchAsync
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RestHighLevelClient.searchAsync
方法的具体详情如下:
包路径:org.elasticsearch.client.RestHighLevelClient
类名称:RestHighLevelClient
方法名:searchAsync
[英]Asynchronously executes a search using the Search API. See Search API on elastic.co
[中]使用搜索API异步执行搜索。见Search API on elastic.co
代码示例来源:origin: io.reactiverse/elasticsearch-client
@Override()
public void searchAsync(SearchRequest searchRequest, RequestOptions options, Handler<AsyncResult<SearchResponse>> handler) {
Context context = vertx.getOrCreateContext();
delegate.searchAsync(searchRequest, options, new ActionListener<SearchResponse>() {
@Override
public void onResponse(SearchResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
代码示例来源:origin: DigitalPebble/storm-crawler
client.searchAsync(request, this);
代码示例来源:origin: DigitalPebble/storm-crawler
client.searchAsync(request, this);
内容来源于网络,如有侵权,请联系作者删除!