Class ElasticsearchSqlAsyncClient
java.lang.Object
co.elastic.clients.ApiClient<ElasticsearchTransport,ElasticsearchSqlAsyncClient>
co.elastic.clients.elasticsearch.sql.ElasticsearchSqlAsyncClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class ElasticsearchSqlAsyncClient
extends ApiClient<ElasticsearchTransport,ElasticsearchSqlAsyncClient>
Client for the sql namespace.
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchSqlAsyncClient
(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptionclearCursor
(ClearCursorRequest request) Clear an SQL search cursor.Clear an SQL search cursor.deleteAsync
(DeleteAsyncRequest request) Delete an async SQL search.Delete an async SQL search.getAsync
(GetAsyncRequest request) Get async SQL search results.Get async SQL search results.getAsyncStatus
(GetAsyncStatusRequest request) Get the async SQL search status.Get the async SQL search status.query()
Get SQL search results.query
(QueryRequest request) Get SQL search results.final CompletableFuture<QueryResponse>
Get SQL search results.translate
(TranslateRequest request) Translate SQL into Elasticsearch queries.Translate SQL into Elasticsearch queries.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
-
ElasticsearchSqlAsyncClient
-
ElasticsearchSqlAsyncClient
public ElasticsearchSqlAsyncClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
public ElasticsearchSqlAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) Description copied from class:ApiClient
Creates a new client with some request options- Specified by:
withTransportOptions
in classApiClient<ElasticsearchTransport,
ElasticsearchSqlAsyncClient>
-
clearCursor
Clear an SQL search cursor.- See Also:
-
clearCursor
public final CompletableFuture<ClearCursorResponse> clearCursor(Function<ClearCursorRequest.Builder, ObjectBuilder<ClearCursorRequest>> fn) Clear an SQL search cursor.- Parameters:
fn
- a function that initializes a builder to create theClearCursorRequest
- See Also:
-
deleteAsync
Delete an async SQL search. Delete an async SQL search or a stored synchronous SQL search. If the search is still running, the API cancels it.If the Elasticsearch security features are enabled, only the following users can use this API to delete a search:
- Users with the
cancel_task
cluster privilege. - The user who first submitted the search.
- See Also:
- Users with the
-
deleteAsync
public final CompletableFuture<DeleteAsyncResponse> deleteAsync(Function<DeleteAsyncRequest.Builder, ObjectBuilder<DeleteAsyncRequest>> fn) Delete an async SQL search. Delete an async SQL search or a stored synchronous SQL search. If the search is still running, the API cancels it.If the Elasticsearch security features are enabled, only the following users can use this API to delete a search:
- Users with the
cancel_task
cluster privilege. - The user who first submitted the search.
- Parameters:
fn
- a function that initializes a builder to create theDeleteAsyncRequest
- See Also:
- Users with the
-
getAsync
Get async SQL search results. Get the current status and available results for an async SQL search or stored synchronous SQL search.If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API.
- See Also:
-
getAsync
public final CompletableFuture<GetAsyncResponse> getAsync(Function<GetAsyncRequest.Builder, ObjectBuilder<GetAsyncRequest>> fn) Get async SQL search results. Get the current status and available results for an async SQL search or stored synchronous SQL search.If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API.
- Parameters:
fn
- a function that initializes a builder to create theGetAsyncRequest
- See Also:
-
getAsyncStatus
Get the async SQL search status. Get the current status of an async SQL search or a stored synchronous SQL search.- See Also:
-
getAsyncStatus
public final CompletableFuture<GetAsyncStatusResponse> getAsyncStatus(Function<GetAsyncStatusRequest.Builder, ObjectBuilder<GetAsyncStatusRequest>> fn) Get the async SQL search status. Get the current status of an async SQL search or a stored synchronous SQL search.- Parameters:
fn
- a function that initializes a builder to create theGetAsyncStatusRequest
- See Also:
-
query
Get SQL search results. Run an SQL request.- See Also:
-
query
public final CompletableFuture<QueryResponse> query(Function<QueryRequest.Builder, ObjectBuilder<QueryRequest>> fn) Get SQL search results. Run an SQL request.- Parameters:
fn
- a function that initializes a builder to create theQueryRequest
- See Also:
-
query
Get SQL search results. Run an SQL request.- See Also:
-
translate
Translate SQL into Elasticsearch queries. Translate an SQL search into a search API request containing Query DSL. It accepts the same request body parameters as the SQL search API, excludingcursor
.- See Also:
-
translate
public final CompletableFuture<TranslateResponse> translate(Function<TranslateRequest.Builder, ObjectBuilder<TranslateRequest>> fn) Translate SQL into Elasticsearch queries. Translate an SQL search into a search API request containing Query DSL. It accepts the same request body parameters as the SQL search API, excludingcursor
.- Parameters:
fn
- a function that initializes a builder to create theTranslateRequest
- See Also:
-