Annotation Type DynamoDbSearchVectorsInlineFilterKey


@SdkPublicApi @Target(METHOD) @Retention(RUNTIME) public @interface DynamoDbSearchVectorsInlineFilterKey
Denotes an INLINE_FILTER attribute in the SearchSchema for one or more vector indexes. Inline filter attributes are applied as pre-filters before vector search and can be used in SearchConditionExpression.

Only the equality (=) operator is supported for inline filter attributes. Up to 18 inline filters can be defined per vector index.

You must specify at least one index name. The index names must match those specified in corresponding DynamoDbVectorAttribute annotations.

Example usage:


 @DynamoDbBean
 public class Product {
     @DynamoDbSearchVectorsInlineFilterKey(indexNames = {"product-embedding-index"})
     public String getColor() { return color; }

     @DynamoDbSearchVectorsInlineFilterKey(indexNames = {"product-embedding-index"})
     public String getSize() { return size; }

     @DynamoDbVectorAttribute(
         indexName = "product-embedding-index",
         dimensions = 1536,
         distanceFunction = DistanceFunction.COSINE)
     public List<Float> getProductEmbedding() { return productEmbedding; }
 }
 
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The names of one or more vector indexes that this inline filter key should participate in.
  • Element Details

    • indexNames

      String[] indexNames
      The names of one or more vector indexes that this inline filter key should participate in.