Class ElasticsearchAsyncSearchClient
- All Implemented Interfaces:
- Closeable,- AutoCloseable
- 
Field SummaryFields inherited from class co.elastic.clients.ApiClienttransport, transportOptions
- 
Constructor SummaryConstructorsConstructorDescriptionElasticsearchAsyncSearchClient(ElasticsearchTransport transport, TransportOptions transportOptions) 
- 
Method SummaryModifier and TypeMethodDescriptiondelete(DeleteAsyncSearchRequest request) Delete an async search.Delete an async search.get(GetAsyncSearchRequest request) Overload ofget(GetAsyncSearchRequest, Class), where Class is defined as Void, meaning the documents will not be deserialized.<TDocument>
 GetAsyncSearchResponse<TDocument>get(GetAsyncSearchRequest request, Class<TDocument> tDocumentClass) Get async search results.<TDocument>
 GetAsyncSearchResponse<TDocument>get(GetAsyncSearchRequest request, Type tDocumentType) Get async search results.final GetAsyncSearchResponse<Void>Overload ofget(Function, Class), where Class is defined as Void, meaning the documents will not be deserialized.final <TDocument>
 GetAsyncSearchResponse<TDocument>get(Function<GetAsyncSearchRequest.Builder, ObjectBuilder<GetAsyncSearchRequest>> fn, Class<TDocument> tDocumentClass) Get async search results.final <TDocument>
 GetAsyncSearchResponse<TDocument>get(Function<GetAsyncSearchRequest.Builder, ObjectBuilder<GetAsyncSearchRequest>> fn, Type tDocumentType) Get async search results.status(AsyncSearchStatusRequest request) Get the async search status.Get the async search status.submit(SubmitRequest request) Overload ofsubmit(SubmitRequest, Class), where Class is defined as Void, meaning the documents will not be deserialized.<TDocument>
 SubmitResponse<TDocument>submit(SubmitRequest request, Class<TDocument> tDocumentClass) Run an async search.<TDocument>
 SubmitResponse<TDocument>submit(SubmitRequest request, Type tDocumentType) Run an async search.final SubmitResponse<Void>Overload ofsubmit(Function, Class), where Class is defined as Void, meaning the documents will not be deserialized.final <TDocument>
 SubmitResponse<TDocument>submit(Function<SubmitRequest.Builder, ObjectBuilder<SubmitRequest>> fn, Class<TDocument> tDocumentClass) Run an async search.final <TDocument>
 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- 
ElasticsearchAsyncSearchClient
- 
ElasticsearchAsyncSearchClientpublic ElasticsearchAsyncSearchClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions) 
 
- 
- 
Method Details- 
withTransportOptionspublic ElasticsearchAsyncSearchClient withTransportOptions(@Nullable TransportOptions transportOptions) Description copied from class:ApiClientCreates a new client with some request options- Specified by:
- withTransportOptionsin class- ApiClient<ElasticsearchTransport,- ElasticsearchAsyncSearchClient> 
 
- 
deletepublic DeleteAsyncSearchResponse delete(DeleteAsyncSearchRequest request) throws IOException, ElasticsearchException 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 the cancel_taskcluster privilege.- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
deletepublic final DeleteAsyncSearchResponse delete(Function<DeleteAsyncSearchRequest.Builder, ObjectBuilder<DeleteAsyncSearchRequest>> fn) throws IOException, ElasticsearchExceptionDelete 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 the cancel_taskcluster privilege.- Parameters:
- fn- a function that initializes a builder to create the- DeleteAsyncSearchRequest
- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
getpublic <TDocument> GetAsyncSearchResponse<TDocument> get(GetAsyncSearchRequest request, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchException 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. - Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
getpublic final <TDocument> GetAsyncSearchResponse<TDocument> get(Function<GetAsyncSearchRequest.Builder, ObjectBuilder<GetAsyncSearchRequest>> fn, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchExceptionGet 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 the- GetAsyncSearchRequest
- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
getpublic GetAsyncSearchResponse<Void> get(GetAsyncSearchRequest request) throws IOException, ElasticsearchException Overload ofget(GetAsyncSearchRequest, Class), where Class is defined as Void, meaning the documents will not be deserialized.- Throws:
- IOException
- ElasticsearchException
 
- 
getpublic final GetAsyncSearchResponse<Void> get(Function<GetAsyncSearchRequest.Builder, ObjectBuilder<GetAsyncSearchRequest>> fn) throws IOException, ElasticsearchExceptionOverload ofget(Function, Class), where Class is defined as Void, meaning the documents will not be deserialized.- Throws:
- IOException
- ElasticsearchException
 
- 
getpublic <TDocument> GetAsyncSearchResponse<TDocument> get(GetAsyncSearchRequest request, Type tDocumentType) throws IOException, ElasticsearchException 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. - Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
getpublic final <TDocument> GetAsyncSearchResponse<TDocument> get(Function<GetAsyncSearchRequest.Builder, ObjectBuilder<GetAsyncSearchRequest>> fn, Type tDocumentType) throws IOException, ElasticsearchExceptionGet 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 the- GetAsyncSearchRequest
- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
statuspublic AsyncSearchStatusResponse status(AsyncSearchStatusRequest request) throws IOException, ElasticsearchException Get the async search status.Get the status of a previously submitted async search request given its identifier, without retrieving search results. If the Elasticsearch security features are enabled, the access to the status of a specific async search is restricted to: - The user or API key that submitted the original async search request.
- Users that have the monitorcluster privilege or greater privileges.
 - Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
statuspublic final AsyncSearchStatusResponse status(Function<AsyncSearchStatusRequest.Builder, ObjectBuilder<AsyncSearchStatusRequest>> fn) throws IOException, ElasticsearchExceptionGet the async search status.Get the status of a previously submitted async search request given its identifier, without retrieving search results. If the Elasticsearch security features are enabled, the access to the status of a specific async search is restricted to: - The user or API key that submitted the original async search request.
- Users that have the monitorcluster privilege or greater privileges.
 - Parameters:
- fn- a function that initializes a builder to create the- AsyncSearchStatusRequest
- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
submitpublic <TDocument> SubmitResponse<TDocument> submit(SubmitRequest request, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchException 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_sizecluster level setting.- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
submitpublic final <TDocument> SubmitResponse<TDocument> submit(Function<SubmitRequest.Builder, ObjectBuilder<SubmitRequest>> fn, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchExceptionRun 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_sizecluster level setting.- Parameters:
- fn- a function that initializes a builder to create the- SubmitRequest
- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
submitpublic SubmitResponse<Void> submit(SubmitRequest request) throws IOException, ElasticsearchException Overload ofsubmit(SubmitRequest, Class), where Class is defined as Void, meaning the documents will not be deserialized.- Throws:
- IOException
- ElasticsearchException
 
- 
submitpublic final SubmitResponse<Void> submit(Function<SubmitRequest.Builder, ObjectBuilder<SubmitRequest>> fn) throws IOException, ElasticsearchExceptionOverload ofsubmit(Function, Class), where Class is defined as Void, meaning the documents will not be deserialized.- Throws:
- IOException
- ElasticsearchException
 
- 
submitpublic <TDocument> SubmitResponse<TDocument> submit(SubmitRequest request, Type tDocumentType) throws IOException, ElasticsearchException 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_sizecluster level setting.- Throws:
- IOException
- ElasticsearchException
- See Also:
 
- 
submitpublic final <TDocument> SubmitResponse<TDocument> submit(Function<SubmitRequest.Builder, ObjectBuilder<SubmitRequest>> fn, Type tDocumentType) throws IOException, ElasticsearchExceptionRun 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_sizecluster level setting.- Parameters:
- fn- a function that initializes a builder to create the- SubmitRequest
- Throws:
- IOException
- ElasticsearchException
- See Also:
 
 
-