繁体   English   中英

如何使用 JAVA 高级别 Z50780F47F6839D047D60BC453

[英]How to make Point InTime API request of Elasticsearch using JAVA High Level REST client

It will be helpful if someone can point me to a way to execute Point In Time API request, which is newly introduced in Elasticsearch 7.10.1, from JAVA using REST high-level client or any other way in JAVA. (Transport 客户端除外,因为它很快就会被弃用)

当高级 rest 客户端没有任何 api 的包装器时,低级 rest 客户端来救援。 您可以通过高级客户端使用低级客户端,如下所示:

String endPoint = "my-index-000001/_pit";
Request request = new Request("POST", endPoint);
request.addParameter("keep_alive", "1m");
Response response = highLevelClient.getLowLevelClient().performRequest(request);

然后使用response object 提取出相关信息。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM