Member Junction
    Preparing search index...
    interface ScoredRecord<T extends RecordMetadata = RecordMetadata> {
        id: string;
        metadata?: T;
        providerTemporaryDirectives?: Record<string, unknown>;
        score?: number;
        sparseValues?: RecordSparseValues;
        values: RecordValues;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    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.

    providerTemporaryDirectives?: Record<string, unknown>

    Provider-specific routing and operational directives set by VectorDBBase.BuildProviderDirectives during ingestion. This field is MJ-internal and must be stripped before the record is sent to any external vector database — it is never persisted in the index.

    Providers read keys they care about from this object in CreateRecord(s), then discard it before the actual upsert call. Example: Pinecone reads providerTemporaryDirectives.namespace to route each record to the correct namespace.

    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.