org.elasticsearch.client.transport.TransportClient.get()方法的使用及代码示例

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

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

TransportClient.get介绍

暂无

代码示例

代码示例来源:origin: apache/incubator-gobblin

@Override
public GetResponse get(GetRequest getRequest)
  throws IOException {
 try {
  return transportClient.get(getRequest).get();
 } catch (Exception e) {
  throw new IOException(e);
 }
}

代码示例来源:origin: floragunncom/search-guard

Assert.assertTrue(tc.get(new GetRequest("searchguard", "sg", "config")).actionGet().isExists());
Assert.assertTrue(tc.get(new GetRequest("searchguard","sg","internalusers")).actionGet().isExists());
Assert.assertTrue(tc.get(new GetRequest("searchguard","sg","roles")).actionGet().isExists());
Assert.assertTrue(tc.get(new GetRequest("searchguard","sg","rolesmapping")).actionGet().isExists());
Assert.assertTrue(tc.get(new GetRequest("searchguard","sg","actiongroups")).actionGet().isExists());
Assert.assertFalse(tc.get(new GetRequest("searchguard","sg","rolesmapping_xcvdnghtu165759i99465")).actionGet().isExists());
Assert.assertTrue(tc.get(new GetRequest("searchguard","sg","config")).actionGet().isExists());

代码示例来源:origin: fujitsu-pio/io

/**
 * 非同期でドキュメントを取得.
 * @param index インデックス名
 * @param type タイプ名
 * @param id ドキュメントのID
 * @param routingId routingId
 * @param realtime リアルタイムモードなら真
 * @return 非同期応答
 */
public ActionFuture<GetResponse> asyncGet(String index, String type, String id, String routingId,
    boolean realtime) {
  GetRequest req = new GetRequest(index, type, id);
  if (routingFlag) {
    req = req.routing(routingId);
  }
  req.realtime(realtime);
  ActionFuture<GetResponse> ret = esTransportClient.get(req);
  this.fireEvent(Event.afterRequest, index, type, id, null, "Get");
  return ret;
}

相关文章

微信公众号

最新文章

更多