dyna-record
    Preparing search index...

    Interface SearchResult<E>

    A single vector search result: the complete typed entity instance with the search's similarity measures.

    interface SearchResult<E extends default = default> {
        entity: EntityInstance<E>;
        score: number;
        similarity: number;
    }

    Type Parameters

    Index

    Properties

    entity: EntityInstance<E>

    The matched entity, hydrated from the index's projected attributes.

    score: number

    The raw score returned by DynamoDB. Its interpretation depends on the index's distance function (EX: for COSINE it is a distance in [0, 2], lower is more similar).

    similarity: number

    Similarity of the entity to the query, converted from the raw score by the index model's distance function (higher is more similar).