Pinecone TypeScript SDK - v9.1.0
    Preparing search index...

    Interface DocumentScoringMethod

    A scoring method that defines how documents are scored against a query.

    type selects the method and which other fields apply:

    • dense_vector: field or fields naming one field, and values.
    • sparse_vector: field or fields naming one field, and sparseValues.
    • text: field or fields naming one or more fields, and query.
    • query_string: query only. Use field qualifiers (field:(clause)) in the query to target a field.
    • embed / sparse_embed: field or fields naming one string field that declares embed / sparse_embed, and query.
    interface DocumentScoringMethod {
        field?: string;
        fields?: string[];
        query?: string;
        sparseValues?: SparseValues;
        type: string;
        values?: number[];
    }
    Index
    field?: string

    The one-field form of fields.

    fields?: string[]

    The fields to score against. Provide fields or field (not both) for every type except query_string, which takes neither. text accepts one or more fields; the other types accept exactly one.

    query?: string

    The text query for text, query_string, embed, and sparse_embed. For embed and sparse_embed, Pinecone embeds this text with the named field's model. Leading and trailing whitespace is trimmed, and an empty query is rejected.

    sparseValues?: SparseValues

    The sparse query vector for sparse_vector.

    type: string

    The scoring method: dense_vector, sparse_vector, text, query_string, embed, or sparse_embed.

    values?: number[]

    The dense query vector for dense_vector. Its length must match the field's dimension.