Pinecone TypeScript SDK - v8.2.0
    Preparing search index...

    Interface PreviewDocumentScoringMethod

    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 field or fields, and a values array.
    • sparse_vector: Score by sparse vector similarity. Requires field or fields, and sparse_values.
    • text: Score by BM25 text similarity against a single field. Requires field or fields, and query.
    • 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 PreviewDocumentScoringMethod {
        field?: string;
        query?: string;
        sparseValues?: PreviewSparseValues;
        type: string;
        values?: number[];
    }
    Index
    field?: string

    The field to score against.

    Required for dense_vector, sparse_vector, and text scoring types. Must not be provided for query_string.

    DocumentScoringMethod

    query?: string

    The text query to use for text and query_string scoring types.

    DocumentScoringMethod

    sparseValues?: PreviewSparseValues

    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