Class SearchVectorsEnhancedRequest

java.lang.Object
software.amazon.awssdk.enhanced.dynamodb.model.SearchVectorsEnhancedRequest

@SdkPublicApi @ThreadSafe public final class SearchVectorsEnhancedRequest extends Object
Defines parameters used when performing a vector search via table.vectorIndex(name).searchVectorsWithResponse(...).

The vector index name is bound on the vector index handle and is not part of this request. All parameters are optional; the service validates required fields such as searchVector().

  • Method Details

    • builder

      public static SearchVectorsEnhancedRequest.Builder builder()
    • toBuilder

    • searchVector

      public float[] searchVector()
      The query embedding used for similarity search. Must match the dimensionality of the target vector index.
    • topK

      public Integer topK()
      The maximum number of similar items to return.
    • searchConditionExpression

      public Expression searchConditionExpression()
      Filter expression applied together with vector similarity, including the required HASH attribute condition when configured on the index.
    • attributesToProject

      public List<String> attributesToProject()
      Returns the list of projected attributes on this request object, or null if no projection is specified. Nested attributes are represented using the '.' separator. Example : foo.bar is represented as "foo.bar" which is indistinguishable from a non-nested attribute with the name "foo.bar". Use nestedAttributesToProject() if you have a use-case that requires discrimination between these two cases.
    • nestedAttributesToProject

      public List<NestedAttributeName> nestedAttributesToProject()
      Returns the list of projected attribute names, in the form of NestedAttributeName objects, for this request object, or null if no projection is specified.
      See Also:
    • returnConsumedCapacity

      public ReturnConsumedCapacity returnConsumedCapacity()
      Whether to return the capacity consumed by this operation.
      See Also:
    • returnConsumedCapacityAsString

      public String returnConsumedCapacityAsString()
      Whether to return the capacity consumed by this operation.

      Similar to returnConsumedCapacity() but return the value as a string. This is useful in situations where the value is not defined in ReturnConsumedCapacity.

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object