Class OpenSearchKnnAsyncClient
java.lang.Object
org.opensearch.client.ApiClient<OpenSearchTransport,OpenSearchKnnAsyncClient>
org.opensearch.client.opensearch.knn.OpenSearchKnnAsyncClient
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class OpenSearchKnnAsyncClient
extends ApiClient<OpenSearchTransport,OpenSearchKnnAsyncClient>
Client for the knn namespace.
-
Field Summary
Fields inherited from class org.opensearch.client.ApiClient
transport, transportOptions -
Constructor Summary
ConstructorsConstructorDescriptionOpenSearchKnnAsyncClient(OpenSearchTransport transport) OpenSearchKnnAsyncClient(OpenSearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptionUsed to delete a particular model in the cluster.deleteModel(DeleteModelRequest request) Used to delete a particular model in the cluster.Used to retrieve information about models present in the cluster.getModel(GetModelRequest request) Used to retrieve information about models present in the cluster.Use an OpenSearch query to search for models in the index.Use an OpenSearch query to search for models in the index.searchModels(SearchModelsRequest request) Use an OpenSearch query to search for models in the index.stats()Provides information about the current status of the k-NN plugin.Provides information about the current status of the k-NN plugin.stats(KnnStatsRequest request) Provides information about the current status of the k-NN plugin.Create and train a model that can be used for initializing k-NN native library indexes during indexing.trainModel(TrainModelRequest request) Create and train a model that can be used for initializing k-NN native library indexes during indexing.final CompletableFuture<WarmupResponse> Preloads native library files into memory, reducing initial search latency for specified indexes.warmup(WarmupRequest request) Preloads native library files into memory, reducing initial search latency for specified indexes.withTransportOptions(TransportOptions transportOptions) Creates a new client with some request optionsMethods inherited from class org.opensearch.client.ApiClient
_transport, _transportOptions, getDeserializer
-
Constructor Details
-
OpenSearchKnnAsyncClient
-
OpenSearchKnnAsyncClient
public OpenSearchKnnAsyncClient(OpenSearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
Description copied from class:ApiClientCreates a new client with some request options- Specified by:
withTransportOptionsin classApiClient<OpenSearchTransport,OpenSearchKnnAsyncClient>
-
deleteModel
public CompletableFuture<DeleteModelResponse> deleteModel(DeleteModelRequest request) throws IOException, OpenSearchException Used to delete a particular model in the cluster.- Throws:
IOExceptionOpenSearchException
-
deleteModel
public final CompletableFuture<DeleteModelResponse> deleteModel(Function<DeleteModelRequest.Builder, ObjectBuilder<DeleteModelRequest>> fn) throws IOException, OpenSearchExceptionUsed to delete a particular model in the cluster.- Parameters:
fn- a function that initializes a builder to create theDeleteModelRequest- Throws:
IOExceptionOpenSearchException
-
getModel
public CompletableFuture<GetModelResponse> getModel(GetModelRequest request) throws IOException, OpenSearchException Used to retrieve information about models present in the cluster.- Throws:
IOExceptionOpenSearchException
-
getModel
public final CompletableFuture<GetModelResponse> getModel(Function<GetModelRequest.Builder, ObjectBuilder<GetModelRequest>> fn) throws IOException, OpenSearchExceptionUsed to retrieve information about models present in the cluster.- Parameters:
fn- a function that initializes a builder to create theGetModelRequest- Throws:
IOExceptionOpenSearchException
-
searchModels
public CompletableFuture<SearchModelsResponse> searchModels(SearchModelsRequest request) throws IOException, OpenSearchException Use an OpenSearch query to search for models in the index.- Throws:
IOExceptionOpenSearchException
-
searchModels
public final CompletableFuture<SearchModelsResponse> searchModels(Function<SearchModelsRequest.Builder, ObjectBuilder<SearchModelsRequest>> fn) throws IOException, OpenSearchExceptionUse an OpenSearch query to search for models in the index.- Parameters:
fn- a function that initializes a builder to create theSearchModelsRequest- Throws:
IOExceptionOpenSearchException
-
searchModels
public final CompletableFuture<SearchModelsResponse> searchModels() throws IOException, OpenSearchExceptionUse an OpenSearch query to search for models in the index.- Throws:
IOExceptionOpenSearchException
-
stats
public CompletableFuture<KnnStatsResponse> stats(KnnStatsRequest request) throws IOException, OpenSearchException Provides information about the current status of the k-NN plugin.- Throws:
IOExceptionOpenSearchException
-
stats
public final CompletableFuture<KnnStatsResponse> stats(Function<KnnStatsRequest.Builder, ObjectBuilder<KnnStatsRequest>> fn) throws IOException, OpenSearchExceptionProvides information about the current status of the k-NN plugin.- Parameters:
fn- a function that initializes a builder to create theKnnStatsRequest- Throws:
IOExceptionOpenSearchException
-
stats
Provides information about the current status of the k-NN plugin.- Throws:
IOExceptionOpenSearchException
-
trainModel
public CompletableFuture<TrainModelResponse> trainModel(TrainModelRequest request) throws IOException, OpenSearchException Create and train a model that can be used for initializing k-NN native library indexes during indexing.- Throws:
IOExceptionOpenSearchException
-
trainModel
public final CompletableFuture<TrainModelResponse> trainModel(Function<TrainModelRequest.Builder, ObjectBuilder<TrainModelRequest>> fn) throws IOException, OpenSearchExceptionCreate and train a model that can be used for initializing k-NN native library indexes during indexing.- Parameters:
fn- a function that initializes a builder to create theTrainModelRequest- Throws:
IOExceptionOpenSearchException
-
warmup
public CompletableFuture<WarmupResponse> warmup(WarmupRequest request) throws IOException, OpenSearchException Preloads native library files into memory, reducing initial search latency for specified indexes.- Throws:
IOExceptionOpenSearchException
-
warmup
public final CompletableFuture<WarmupResponse> warmup(Function<WarmupRequest.Builder, ObjectBuilder<WarmupRequest>> fn) throws IOException, OpenSearchExceptionPreloads native library files into memory, reducing initial search latency for specified indexes.- Parameters:
fn- a function that initializes a builder to create theWarmupRequest- Throws:
IOExceptionOpenSearchException
-