dyna-record
    Preparing search index...

    Interface VectorIndexOptions

    Options for defining a vector index through the static vectorIndexes factory on a table class.

    interface VectorIndexOptions {
        members: (() => EntityClass<default>)[];
        model: EmbeddingModelDescriptor;
        name: string;
        provider: EmbeddingProvider;
        scopedBy?: () => EntityClass<default>;
        vectorAttribute: VectorAttributeName;
    }
    Index

    Properties

    members: (() => EntityClass<default>)[]

    Entity thunks declaring the index's complete membership. Nothing is derived — the list is the membership, there is no universal membership, and every listed entity must carry a @Searchable attribute. Members of a scoped index must also carry the scoping foreign key. Required and non-empty on every index.

    The embedding model descriptor (EX: TitanTextEmbedV2), carrying the dimensions and distance function the index is provisioned with.

    name: string

    The DynamoDB IndexName of the vector index.

    The embed function used to generate vectors. Required — dyna-record ships no embedding implementation; the provider owns credentials, region, retry, and timeout posture.

    scopedBy?: () => EntityClass<default>

    Optional entity thunk selecting the scope parent. The foreign key attribute referencing this entity becomes the index HASH, making the index queryable only per scope value. Without scopedBy the index compiles to no HASH and its searches span its whole membership.

    vectorAttribute: VectorAttributeName

    The table attribute the index's vectors are written under. Required and explicit — the attribute is the index's physical membership surface, so it must never change implicitly. Must satisfy VectorAttributeName and be unique among the table's vector indexes.