Skip to content

DynamoDB  >  Structures  >  VectorIndex

VectorIndex

Structure Class

VectorIndex dataclass

Contains the configuration settings for a vector index, including the index name, vector attribute, dimensions, distance function, search schema, and projection.

Attributes

dimensions instance-attribute
dimensions: int

The number of dimensions in each vector.

distance_function instance-attribute
distance_function: VectorDistanceFunction

The distance function used to calculate similarity between vectors. Valid values: COSINE, EUCLIDEAN, DOT_PRODUCT.

index_name instance-attribute
index_name: str

The name of the vector index.

projection instance-attribute
projection: Projection

Specifies attributes that are copied (projected) from the table into the vector index.

search_schema class-attribute instance-attribute
search_schema: list[SearchSchemaElement] | None = None

The search schema that defines partition key and inline filter attributes for the vector index.

vector_attribute instance-attribute
vector_attribute: VectorAttributeDefinition

The vector attribute configuration for the index.