WARNING: Deprecated in 7.15.0.
The Java REST Client is deprecated in favor of the Java API Client.
Open a point in time
editOpen a point in time
editA point in time must be opened before being used in search requests.
An OpenPointInTimeRequest requires an index
and keepAlive
arguments:
OpenPointInTimeRequest openRequest = new OpenPointInTimeRequest("posts"); openRequest.keepAlive(TimeValue.timeValueMinutes(30)); OpenPointInTimeResponse openResponse = client.openPointInTime(openRequest, RequestOptions.DEFAULT); String pitId = openResponse.getPointInTimeId();
Create an |
|
Set the |
|
Read the returned point in time id, which points to the search context that’s being kept alive and will be used in the search requests. |
Optional arguments
editThe following arguments can optionally be provided:
Setting |