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

    Interface DocumentScoringMethod

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

    The type field determines which other fields are used:

    • dense_vector: Score by dense vector similarity. Requires either field or fields naming exactly one field, and a values array.
    • sparse_vector: Score by sparse vector similarity. Requires either field or fields naming exactly one field, and sparse_values.
    • text: Score by BM25 text similarity. Requires either field or fields naming one or more fields, and query. Naming several fields scores the query against all of them.
    • query_string: Score using a Lucene query string. Use field qualifiers (field:(clause)) to target a field, or omit field qualifiers to search against all text-searchable fields. Errors if field or fields is provided.

    DocumentScoringMethod

    interface DocumentScoringMethod {
        field?: string;
        fields?: string[];
        query?: string;
        sparseValues?: SparseValues;
        type: string;
        values?: number[];
    }
    Index
    field?: string

    A single field to score against. Equivalent to a one-element fields; prefer fields, which can also name more than one field. Either field or fields must be provided for dense_vector, sparse_vector, and text scoring types, but not both.

    DocumentScoringMethod

    fields?: string[]

    The fields to score against.

    Either fields or field must be provided for dense_vector, sparse_vector, and text scoring types, and neither may be provided for query_string. dense_vector and sparse_vector accept exactly one field; text accepts one or more.

    DocumentScoringMethod

    query?: string

    The text query to use for text and query_string scoring types. Leading and trailing whitespace is trimmed; a query that is empty after trimming is rejected. At most 10 KB.

    DocumentScoringMethod

    sparseValues?: SparseValues

    DocumentScoringMethod

    type: string

    The scoring method type. Possible values: dense_vector, sparse_vector, text, or query_string.

    DocumentScoringMethod

    values?: number[]

    The dense vector values to use for dense_vector scoring type.

    DocumentScoringMethod