Class ElasticsearchAsyncSearchAsyncClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchAsyncSearchAsyncClient
(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptiondelete
(DeleteAsyncSearchRequest request) Delete an async search.Delete an async search.<TDocument>
CompletableFuture<GetAsyncSearchResponse<TDocument>>get
(GetAsyncSearchRequest request, Class<TDocument> tDocumentClass) Get async search results.<TDocument>
CompletableFuture<GetAsyncSearchResponse<TDocument>>get
(GetAsyncSearchRequest request, Type tDocumentType) Get async search results.final <TDocument>
CompletableFuture<GetAsyncSearchResponse<TDocument>>get
(Function<GetAsyncSearchRequest.Builder, ObjectBuilder<GetAsyncSearchRequest>> fn, Class<TDocument> tDocumentClass) Get async search results.final <TDocument>
CompletableFuture<GetAsyncSearchResponse<TDocument>>get
(Function<GetAsyncSearchRequest.Builder, ObjectBuilder<GetAsyncSearchRequest>> fn, Type tDocumentType) Get async search results.status
(AsyncSearchStatusRequest request) Get async search status.Get async search status.<TDocument>
CompletableFuture<SubmitResponse<TDocument>>submit
(SubmitRequest request, Class<TDocument> tDocumentClass) Run an async search.<TDocument>
CompletableFuture<SubmitResponse<TDocument>>submit
(SubmitRequest request, Type tDocumentType) Run an async search.final <TDocument>
CompletableFuture<SubmitResponse<TDocument>>submit
(Function<SubmitRequest.Builder, ObjectBuilder<SubmitRequest>> fn, Class<TDocument> tDocumentClass) Run an async search.final <TDocument>
CompletableFuture<SubmitResponse<TDocument>>submit
(Function<SubmitRequest.Builder, ObjectBuilder<SubmitRequest>> fn, Type tDocumentType) Run an async search.withTransportOptions
(TransportOptions transportOptions) Creates a new client with some request optionsMethods inherited from class co.elastic.clients.ApiClient
_jsonpMapper, _transport, _transportOptions, close, getDeserializer, withTransportOptions
-
Constructor Details
-
ElasticsearchAsyncSearchAsyncClient
-
ElasticsearchAsyncSearchAsyncClient
public ElasticsearchAsyncSearchAsyncClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
public ElasticsearchAsyncSearchAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) Description copied from class:ApiClient
Creates a new client with some request options- Specified by:
withTransportOptions
in classApiClient<ElasticsearchTransport,
ElasticsearchAsyncSearchAsyncClient>
-
delete
Delete an async search. If the asynchronous search is still running, it is 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.- See Also:
-
delete
public final CompletableFuture<DeleteAsyncSearchResponse> delete(Function<DeleteAsyncSearchRequest.Builder, ObjectBuilder<DeleteAsyncSearchRequest>> fn) Delete an async search. If the asynchronous search is still running, it is 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
- See Also:
-
get
public <TDocument> CompletableFuture<GetAsyncSearchResponse<TDocument>> get(GetAsyncSearchRequest request, Class<TDocument> tDocumentClass) Get async search results. Retrieve the results of a previously submitted asynchronous search request. 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.- See Also:
-
get
public final <TDocument> CompletableFuture<GetAsyncSearchResponse<TDocument>> get(Function<GetAsyncSearchRequest.Builder, ObjectBuilder<GetAsyncSearchRequest>> fn, Class<TDocument> tDocumentClass) Get async search results. Retrieve the results of a previously submitted asynchronous search request. 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
- See Also:
-
get
public <TDocument> CompletableFuture<GetAsyncSearchResponse<TDocument>> get(GetAsyncSearchRequest request, Type tDocumentType) Get async search results. Retrieve the results of a previously submitted asynchronous search request. 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.- See Also:
-
get
public final <TDocument> CompletableFuture<GetAsyncSearchResponse<TDocument>> get(Function<GetAsyncSearchRequest.Builder, ObjectBuilder<GetAsyncSearchRequest>> fn, Type tDocumentType) Get async search results. Retrieve the results of a previously submitted asynchronous search request. 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
- See Also:
-
status
Get async search status. Retrieve 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.- See Also:
-
status
public final CompletableFuture<AsyncSearchStatusResponse> status(Function<AsyncSearchStatusRequest.Builder, ObjectBuilder<AsyncSearchStatusRequest>> fn) Get async search status. Retrieve 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
- See Also:
-
submit
public <TDocument> CompletableFuture<SubmitResponse<TDocument>> submit(SubmitRequest request, Class<TDocument> tDocumentClass) Run an async search. 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. Partial results become available following the sort criteria that was requested.Warning: Asynchronous search does not support scroll or search requests that include only the suggest section.
By default, Elasticsearch does not 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 the
search.max_async_search_response_size
cluster level setting.- See Also:
-
submit
public final <TDocument> CompletableFuture<SubmitResponse<TDocument>> submit(Function<SubmitRequest.Builder, ObjectBuilder<SubmitRequest>> fn, Class<TDocument> tDocumentClass) Run an async search. 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. Partial results become available following the sort criteria that was requested.Warning: Asynchronous search does not support scroll or search requests that include only the suggest section.
By default, Elasticsearch does not 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 the
search.max_async_search_response_size
cluster level setting.- Parameters:
fn
- a function that initializes a builder to create theSubmitRequest
- See Also:
-
submit
public <TDocument> CompletableFuture<SubmitResponse<TDocument>> submit(SubmitRequest request, Type tDocumentType) Run an async search. 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. Partial results become available following the sort criteria that was requested.Warning: Asynchronous search does not support scroll or search requests that include only the suggest section.
By default, Elasticsearch does not 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 the
search.max_async_search_response_size
cluster level setting.- See Also:
-
submit
public final <TDocument> CompletableFuture<SubmitResponse<TDocument>> submit(Function<SubmitRequest.Builder, ObjectBuilder<SubmitRequest>> fn, Type tDocumentType) Run an async search. 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. Partial results become available following the sort criteria that was requested.Warning: Asynchronous search does not support scroll or search requests that include only the suggest section.
By default, Elasticsearch does not 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 the
search.max_async_search_response_size
cluster level setting.- Parameters:
fn
- a function that initializes a builder to create theSubmitRequest
- See Also:
-