Class SearchVectorsOperation<T>
java.lang.Object
software.amazon.awssdk.enhanced.dynamodb.internal.operations.SearchVectorsOperation<T>
- All Implemented Interfaces:
CommonOperation<T,,SearchVectorsRequest, SearchVectorsResponse, SearchVectorsEnhancedResponse<T>> VectorIndexOperation<T,SearchVectorsRequest, SearchVectorsResponse, SearchVectorsEnhancedResponse<T>>
@SdkInternalApi
public class SearchVectorsOperation<T>
extends Object
implements VectorIndexOperation<T,SearchVectorsRequest,SearchVectorsResponse,SearchVectorsEnhancedResponse<T>>
-
Method Summary
Modifier and TypeMethodDescriptionasyncServiceCall(DynamoDbAsyncClient dynamoDbAsyncClient) Provides a function for making the low level non-blocking asynchronous SDK call to DynamoDb.static <T> SearchVectorsOperation<T> create(SearchVectorsEnhancedRequest request) generateRequest(TableSchema<T> tableSchema, OperationContext context, DynamoDbEnhancedClientExtension extension) Builds the low-levelSearchVectorsRequest.The type, or name, of the operation.serviceCall(DynamoDbClient dynamoDbClient) Provides a function for making the low level synchronous SDK call to DynamoDb.transformResponse(SearchVectorsResponse response, TableSchema<T> tableSchema, OperationContext context, DynamoDbEnhancedClientExtension extension) Takes the response object returned by the actual DynamoDb call and maps it into a higher level abstracted result object.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.awssdk.enhanced.dynamodb.internal.operations.CommonOperation
execute, executeAsyncMethods inherited from interface software.amazon.awssdk.enhanced.dynamodb.internal.operations.VectorIndexOperation
executeOnVectorIndex, executeOnVectorIndexAsync
-
Method Details
-
create
-
operationName
Description copied from interface:CommonOperationThe type, or name, of the operation.- Specified by:
operationNamein interfaceCommonOperation<T,SearchVectorsRequest, SearchVectorsResponse, SearchVectorsEnhancedResponse<T>>
-
generateRequest
public SearchVectorsRequest generateRequest(TableSchema<T> tableSchema, OperationContext context, DynamoDbEnhancedClientExtension extension) Builds the low-levelSearchVectorsRequest.- Specified by:
generateRequestin interfaceCommonOperation<T,SearchVectorsRequest, SearchVectorsResponse, SearchVectorsEnhancedResponse<T>> - Parameters:
tableSchema- ATableSchemathat maps the table to a modelled object.context- An object containing the context, or target, of the command execution.extension- ADynamoDbEnhancedClientExtensionthat may modify the request of this operation. A null value here will result in no modifications.- Returns:
- A request that can be used as an argument to a
DynamoDbClientcall to perform the operation. - Throws:
IllegalArgumentException- ifcontext.indexName()is the primary index (TableMetadata.primaryIndexName()) — message:"SearchVectors cannot be executed against a primary index. A vector index name is required."IllegalArgumentException- ifcontext.indexName()is a GSI or LSI
-
transformResponse
public SearchVectorsEnhancedResponse<T> transformResponse(SearchVectorsResponse response, TableSchema<T> tableSchema, OperationContext context, DynamoDbEnhancedClientExtension extension) Description copied from interface:CommonOperationTakes the response object returned by the actual DynamoDb call and maps it into a higher level abstracted result object.- Specified by:
transformResponsein interfaceCommonOperation<T,SearchVectorsRequest, SearchVectorsResponse, SearchVectorsEnhancedResponse<T>> - Parameters:
response- The response object returned by the DynamoDb call for this operation.tableSchema- ATableSchemathat maps the table to a modelled object.context- An object containing the context, or target, of the command execution.extension- ADynamoDbEnhancedClientExtensionthat may modify the result of this operation. A null value here will result in no modifications.- Returns:
- A high level result object as specified by the implementation of this operation.
-
serviceCall
public Function<SearchVectorsRequest,SearchVectorsResponse> serviceCall(DynamoDbClient dynamoDbClient) Description copied from interface:CommonOperationProvides a function for making the low level synchronous SDK call to DynamoDb.- Specified by:
serviceCallin interfaceCommonOperation<T,SearchVectorsRequest, SearchVectorsResponse, SearchVectorsEnhancedResponse<T>> - Parameters:
dynamoDbClient- A low levelDynamoDbClientto make the call against.- Returns:
- A function that calls DynamoDb with a provided request object and returns the response object.
-
asyncServiceCall
public Function<SearchVectorsRequest,CompletableFuture<SearchVectorsResponse>> asyncServiceCall(DynamoDbAsyncClient dynamoDbAsyncClient) Description copied from interface:CommonOperationProvides a function for making the low level non-blocking asynchronous SDK call to DynamoDb.- Specified by:
asyncServiceCallin interfaceCommonOperation<T,SearchVectorsRequest, SearchVectorsResponse, SearchVectorsEnhancedResponse<T>> - Parameters:
dynamoDbAsyncClient- A low levelDynamoDbAsyncClientto make the call against.- Returns:
- A function that calls DynamoDb with a provided request object and returns the response object.
-