Interface QueryVectorsRequest.Builder
- All Superinterfaces:
AwsRequest.Builder
,Buildable
,CopyableBuilder<QueryVectorsRequest.Builder,
,QueryVectorsRequest> S3VectorsRequest.Builder
,SdkBuilder<QueryVectorsRequest.Builder,
,QueryVectorsRequest> SdkPojo
,SdkRequest.Builder
- Enclosing class:
QueryVectorsRequest
-
Method Summary
Modifier and TypeMethodDescriptionMetadata filter to apply during the query.The ARN of the vector index that you want to query.The name of the vector index that you want to query.overrideConfiguration
(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration
(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.default QueryVectorsRequest.Builder
queryVector
(Consumer<VectorData.Builder> queryVector) The query vector.queryVector
(VectorData queryVector) The query vector.returnDistance
(Boolean returnDistance) Indicates whether to include the computed distance in the response.returnMetadata
(Boolean returnMetadata) Indicates whether to include metadata in the response.The number of results to return for each query.vectorBucketName
(String vectorBucketName) The name of the vector bucket that contains the vector index.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfiguration
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.services.s3vectors.model.S3VectorsRequest.Builder
build
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
vectorBucketName
The name of the vector bucket that contains the vector index.
- Parameters:
vectorBucketName
- The name of the vector bucket that contains the vector index.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
indexName
The name of the vector index that you want to query.
- Parameters:
indexName
- The name of the vector index that you want to query.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
indexArn
The ARN of the vector index that you want to query.
- Parameters:
indexArn
- The ARN of the vector index that you want to query.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
topK
The number of results to return for each query.
- Parameters:
topK
- The number of results to return for each query.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
queryVector
The query vector. Ensure that the query vector has the same dimension as the dimension of the vector index that's being queried. For example, if your vector index contains vectors with 384 dimensions, your query vector must also have 384 dimensions.
- Parameters:
queryVector
- The query vector. Ensure that the query vector has the same dimension as the dimension of the vector index that's being queried. For example, if your vector index contains vectors with 384 dimensions, your query vector must also have 384 dimensions.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
queryVector
The query vector. Ensure that the query vector has the same dimension as the dimension of the vector index that's being queried. For example, if your vector index contains vectors with 384 dimensions, your query vector must also have 384 dimensions.
This is a convenience method that creates an instance of theVectorData.Builder
avoiding the need to create one manually viaVectorData.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toqueryVector(VectorData)
.- Parameters:
queryVector
- a consumer that will call methods onVectorData.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
filter
Metadata filter to apply during the query. For more information about metadata keys, see Metadata filtering in the Amazon S3 User Guide.
- Parameters:
filter
- Metadata filter to apply during the query. For more information about metadata keys, see Metadata filtering in the Amazon S3 User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
returnMetadata
Indicates whether to include metadata in the response. The default value is
false
.- Parameters:
returnMetadata
- Indicates whether to include metadata in the response. The default value isfalse
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
returnDistance
Indicates whether to include the computed distance in the response. The default value is
false
.- Parameters:
returnDistance
- Indicates whether to include the computed distance in the response. The default value isfalse
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
overrideConfiguration
QueryVectorsRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Description copied from interface:AwsRequest.Builder
Add an optional request override configuration.- Specified by:
overrideConfiguration
in interfaceAwsRequest.Builder
- Parameters:
overrideConfiguration
- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
QueryVectorsRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.Builder
Add an optional request override configuration.- Specified by:
overrideConfiguration
in interfaceAwsRequest.Builder
- Parameters:
builderConsumer
- AConsumer
to which an emptyAwsRequestOverrideConfiguration.Builder
will be given.- Returns:
- This object for method chaining.
-