Zvec Node.js API Reference
    Preparing search index...

    Interface ZVecMultiQuery

    Multi-query object used to combine multiple vector and/or full-text searches.

    Each sub-query contributes candidates, then rerank combines them into a single result list.

    interface ZVecMultiQuery {
        queries: ZVecSubQuery[];
        topk?: number;
        filter?: string;
        includeVector?: boolean;
        outputFields?: string[];
        rerank?:
            | { type: "rrf"; rankConstant?: number }
            | { type: "weighted"; weights: number[] };
    }
    Index

    Properties

    queries: ZVecSubQuery[]

    Sub-queries to execute and merge. At least two are required.

    topk?: number

    Number of final documents to return.

    10
    
    filter?: string

    Boolean expression to pre-filter candidates for every sub-query.

    undefined
    
    includeVector?: boolean

    Whether to include vector data in results.

    false
    
    outputFields?: string[]

    Scalar fields to include. If undefined, all fields are returned.

    undefined
    
    rerank?:
        | { type: "rrf"; rankConstant?: number }
        | { type: "weighted"; weights: number[] }

    Strategy for merging sub-query candidates. If omitted, reciprocal rank fusion with rank constant 60 is used.

    Type Declaration

    • { type: "rrf"; rankConstant?: number }
      • type: "rrf"

        Reciprocal rank fusion.

      • OptionalrankConstant?: number

        RRF rank constant.

        60
        
    • { type: "weighted"; weights: number[] }
      • type: "weighted"

        Weighted score fusion.

      • weights: number[]

        Per-sub-query weights. The length must match queries.length.