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

    Interface ZVecQuery

    Query object used to perform searches against a collection.

    You can use it for:

    • Vector similarity search: provide both fieldName and vector.
    • Scalar-only filtering: provide only filter.
    • Hybrid search: provide fieldName + vector along with a scalar filter.
    interface ZVecQuery {
        fieldName?: string;
        topk?: number;
        vector?: ZVecVector;
        filter?: string;
        includeVector?: boolean;
        outputFields?: string[];
        params?: ZVecHnswQueryParams | ZVecIVFQueryParams;
    }
    Index

    Properties

    fieldName?: string

    The name of the vector field to search against.

    topk?: number

    Number of nearest neighbors to return.

    10
    
    vector?: ZVecVector

    The query vector. Can be a standard JavaScript array, a typed array, or a sparse vector object map.

    undefined
    
    filter?: string

    Boolean expression to pre-filter candidates.

    undefined
    
    includeVector?: boolean

    Whether to include vector data in results.

    false
    
    outputFields?: string[]

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

    undefined
    

    Query-time parameters to fine-tune search behavior.

    undefined