WARNING: Deprecated in 7.15.0.
The Java REST Client is deprecated in favor of the Java API Client.
Get Async Search API
editGet Async Search API
editRequest
editA 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 arguments
editThe following arguments can optionally be provided:
Synchronous Execution
editAsynchronous Execution
editThe 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:
Response
editThe 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 |