WARNING: Deprecated in 7.15.0.
The Java REST Client is deprecated in favor of the Java API Client.
Get Async Search APIedit
Requestedit
A GetAsyncSearchRequest
allows to get a running asynchronous search task by
its id. Required arguments are the id
of a running async search:
GetAsyncSearchRequest request = new GetAsyncSearchRequest(id);
Optional argumentsedit
The following arguments can optionally be provided:
Synchronous Executionedit
Asynchronous Executionedit
The asynchronous execution of a GetAsyncSearchRequest
allows to use an
ActionListener
to be called back when the submit request returns:
The asynchronous method does not block and returns immediately. Once it is
completed the ActionListener
is called back using the onResponse
method
if the execution successfully completed or using the onFailure
method if
it failed.
A typical listener for AsyncSearchResponse
looks like:
Responseedit
The returned AsyncSearchResponse
allows to retrieve information about the executed
operation as follows:
response.getSearchResponse(); response.getId(); response.isPartial(); response.isRunning(); response.getStartTime(); response.getExpirationTime(); response.getFailure();
The |
|
The id of the async search request, |
|
|
|
|
|
The time the response was created (millis since epoch) |
|
The time the response expires (millis since epoch) |
|
Get failure reasons or |