Class ElasticsearchAsyncSearchClient
java.lang.Object
co.elastic.clients.ApiClient<ElasticsearchTransport,ElasticsearchAsyncSearchClient>
co.elastic.clients.elasticsearch.async_search.ElasticsearchAsyncSearchClient
public class ElasticsearchAsyncSearchClient
extends ApiClient<ElasticsearchTransport,ElasticsearchAsyncSearchClient>
Client for the async_search namespace.
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchAsyncSearchClient
(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptiondelete
(DeleteAsyncSearchRequest request) Deletes an async search by identifier.Deletes an async search by identifier.<TDocument>
GetAsyncSearchResponse<TDocument>get
(GetAsyncSearchRequest request, Class<TDocument> tDocumentClass) Retrieves the results of a previously submitted async search request given its identifier.<TDocument>
GetAsyncSearchResponse<TDocument>get
(GetAsyncSearchRequest request, Type tDocumentType) Retrieves the results of a previously submitted async search request given its identifier.final <TDocument>
GetAsyncSearchResponse<TDocument>get
(Function<GetAsyncSearchRequest.Builder, ObjectBuilder<GetAsyncSearchRequest>> fn, Class<TDocument> tDocumentClass) Retrieves the results of a previously submitted async search request given its identifier.final <TDocument>
GetAsyncSearchResponse<TDocument>get
(Function<GetAsyncSearchRequest.Builder, ObjectBuilder<GetAsyncSearchRequest>> fn, Type tDocumentType) Retrieves the results of a previously submitted async search request given its identifier.status
(AsyncSearchStatusRequest request) Get async search status Retrieves the status of a previously submitted async search request given its identifier, without retrieving search results.Get async search status Retrieves the status of a previously submitted async search request given its identifier, without retrieving search results.<TDocument>
SubmitResponse<TDocument>submit
(SubmitRequest request, Class<TDocument> tDocumentClass) Runs a search request asynchronously.<TDocument>
SubmitResponse<TDocument>submit
(SubmitRequest request, Type tDocumentType) Runs a search request asynchronously.final <TDocument>
SubmitResponse<TDocument>submit
(Function<SubmitRequest.Builder, ObjectBuilder<SubmitRequest>> fn, Class<TDocument> tDocumentClass) Runs a search request asynchronously.final <TDocument>
SubmitResponse<TDocument>submit
(Function<SubmitRequest.Builder, ObjectBuilder<SubmitRequest>> fn, Type tDocumentType) Runs a search request asynchronously.withTransportOptions
(TransportOptions transportOptions) Creates a new client with some request optionsMethods inherited from class co.elastic.clients.ApiClient
_jsonpMapper, _transport, _transportOptions, getDeserializer, withTransportOptions
-
Constructor Details
-
ElasticsearchAsyncSearchClient
-
ElasticsearchAsyncSearchClient
public ElasticsearchAsyncSearchClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
public ElasticsearchAsyncSearchClient withTransportOptions(@Nullable TransportOptions transportOptions) Description copied from class:ApiClient
Creates a new client with some request options- Specified by:
withTransportOptions
in classApiClient<ElasticsearchTransport,
ElasticsearchAsyncSearchClient>
-
delete
public DeleteAsyncSearchResponse delete(DeleteAsyncSearchRequest request) throws IOException, ElasticsearchException Deletes an async search by identifier. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have thecancel_task
cluster privilege.- Throws:
IOException
ElasticsearchException
- See Also:
-
delete
public final DeleteAsyncSearchResponse delete(Function<DeleteAsyncSearchRequest.Builder, ObjectBuilder<DeleteAsyncSearchRequest>> fn) throws IOException, ElasticsearchExceptionDeletes an async search by identifier. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have thecancel_task
cluster privilege.- Parameters:
fn
- a function that initializes a builder to create theDeleteAsyncSearchRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
get
public <TDocument> GetAsyncSearchResponse<TDocument> get(GetAsyncSearchRequest request, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchException Retrieves the results of a previously submitted async search request given its identifier. If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it.- Throws:
IOException
ElasticsearchException
- See Also:
-
get
public final <TDocument> GetAsyncSearchResponse<TDocument> get(Function<GetAsyncSearchRequest.Builder, ObjectBuilder<GetAsyncSearchRequest>> fn, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchExceptionRetrieves the results of a previously submitted async search request given its identifier. If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it.- Parameters:
fn
- a function that initializes a builder to create theGetAsyncSearchRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
get
public <TDocument> GetAsyncSearchResponse<TDocument> get(GetAsyncSearchRequest request, Type tDocumentType) throws IOException, ElasticsearchException Retrieves the results of a previously submitted async search request given its identifier. If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it.- Throws:
IOException
ElasticsearchException
- See Also:
-
get
public final <TDocument> GetAsyncSearchResponse<TDocument> get(Function<GetAsyncSearchRequest.Builder, ObjectBuilder<GetAsyncSearchRequest>> fn, Type tDocumentType) throws IOException, ElasticsearchExceptionRetrieves the results of a previously submitted async search request given its identifier. If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it.- Parameters:
fn
- a function that initializes a builder to create theGetAsyncSearchRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
status
public AsyncSearchStatusResponse status(AsyncSearchStatusRequest request) throws IOException, ElasticsearchException Get async search status Retrieves the status of a previously submitted async search request given its identifier, without retrieving search results. If the Elasticsearch security features are enabled, use of this API is restricted to themonitoring_user
role.- Throws:
IOException
ElasticsearchException
- See Also:
-
status
public final AsyncSearchStatusResponse status(Function<AsyncSearchStatusRequest.Builder, ObjectBuilder<AsyncSearchStatusRequest>> fn) throws IOException, ElasticsearchExceptionGet async search status Retrieves the status of a previously submitted async search request given its identifier, without retrieving search results. If the Elasticsearch security features are enabled, use of this API is restricted to themonitoring_user
role.- Parameters:
fn
- a function that initializes a builder to create theAsyncSearchStatusRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
submit
public <TDocument> SubmitResponse<TDocument> submit(SubmitRequest request, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchException Runs a search request asynchronously. When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field, hence partial results become available following the sort criteria that was requested. Warning: Async search does not support scroll nor search requests that only include the suggest section. By default, Elasticsearch doesn’t allow you to store an async search response larger than 10Mb and an attempt to do this results in an error. The maximum allowed size for a stored async search response can be set by changing thesearch.max_async_search_response_size
cluster level setting.- Throws:
IOException
ElasticsearchException
- See Also:
-
submit
public final <TDocument> SubmitResponse<TDocument> submit(Function<SubmitRequest.Builder, ObjectBuilder<SubmitRequest>> fn, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchExceptionRuns a search request asynchronously. When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field, hence partial results become available following the sort criteria that was requested. Warning: Async search does not support scroll nor search requests that only include the suggest section. By default, Elasticsearch doesn’t allow you to store an async search response larger than 10Mb and an attempt to do this results in an error. The maximum allowed size for a stored async search response can be set by changing thesearch.max_async_search_response_size
cluster level setting.- Parameters:
fn
- a function that initializes a builder to create theSubmitRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
submit
public <TDocument> SubmitResponse<TDocument> submit(SubmitRequest request, Type tDocumentType) throws IOException, ElasticsearchException Runs a search request asynchronously. When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field, hence partial results become available following the sort criteria that was requested. Warning: Async search does not support scroll nor search requests that only include the suggest section. By default, Elasticsearch doesn’t allow you to store an async search response larger than 10Mb and an attempt to do this results in an error. The maximum allowed size for a stored async search response can be set by changing thesearch.max_async_search_response_size
cluster level setting.- Throws:
IOException
ElasticsearchException
- See Also:
-
submit
public final <TDocument> SubmitResponse<TDocument> submit(Function<SubmitRequest.Builder, ObjectBuilder<SubmitRequest>> fn, Type tDocumentType) throws IOException, ElasticsearchExceptionRuns a search request asynchronously. When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field, hence partial results become available following the sort criteria that was requested. Warning: Async search does not support scroll nor search requests that only include the suggest section. By default, Elasticsearch doesn’t allow you to store an async search response larger than 10Mb and an attempt to do this results in an error. The maximum allowed size for a stored async search response can be set by changing thesearch.max_async_search_response_size
cluster level setting.- Parameters:
fn
- a function that initializes a builder to create theSubmitRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-