Interface QueryVectorsRequest.Builder

  • Method Details

    • vectorBucketName

      QueryVectorsRequest.Builder vectorBucketName(String 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

      QueryVectorsRequest.Builder indexName(String 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

      QueryVectorsRequest.Builder indexArn(String 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

      QueryVectorsRequest.Builder queryVector(VectorData 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

      default QueryVectorsRequest.Builder queryVector(Consumer<VectorData.Builder> 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 the VectorData.Builder avoiding the need to create one manually via VectorData.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to queryVector(VectorData).

      Parameters:
      queryVector - a consumer that will call methods on VectorData.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

      QueryVectorsRequest.Builder returnMetadata(Boolean 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 is false.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • returnDistance

      QueryVectorsRequest.Builder returnDistance(Boolean 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 is false.
      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 interface AwsRequest.Builder
      Parameters:
      overrideConfiguration - The override configuration.
      Returns:
      This object for method chaining.
    • overrideConfiguration

      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      builderConsumer - A Consumer to which an empty AwsRequestOverrideConfiguration.Builder will be given.
      Returns:
      This object for method chaining.