interface ScoredRecord<T> {
    id: string;
    metadata?: T;
    score?: number;
    sparseValues?: RecordSparseValues;
    values: RecordValues;
}

Type Parameters

Hierarchy (view full)

Properties

id: string

The id of the record. This string can be any value and is useful when fetching or deleting by id.

metadata?: T

Any metadata associated with this record.

score?: number

The similarity score of the record. The interpretation of this score will be different depending on the distance metric configured on the index.

For indexes using the euclidean distance metric, a lower similarity score is more similar, while for indexes using the dotproduct metric, higher scores are more similar.

sparseValues?: RecordSparseValues

Records can optionally include sparse and dense values when an index is used for hybrid search.

values: RecordValues

An array of numbers representing an embedding vector.