QueryShared: {
    filter?: object;
    includeMetadata?: boolean;
    includeValues?: boolean;
    maxCandidates?: number;
    namespace?: string;
    scanFactor?: number;
    topK: number;
}

Type declaration

  • Optionalfilter?: object

    This parameter allows you to modify your query with a metadata filter.

  • OptionalincludeMetadata?: boolean

    This boolean value specifies whether metadata values are returned with query results.

    By default, metadata values are not returned to reduce the size of the request payload.

  • OptionalincludeValues?: boolean

    This boolean value specifies whether embedding values are returned with query results.

    By default, values are not returned to reduce the size of the request payload.

  • OptionalmaxCandidates?: number

    An optimization parameter that controls the maximum number of candidate dense vectors to rerank. Reranking computes exact distances to improve recall but increases query latency. Range: topK100000.

    Keep the default for a balance of recall and latency. Increase this value if recall is too low, or decrease it to reduce latency at the cost of accuracy. This parameter is only supported for dedicated (DRN) dense indexes.

  • Optionalnamespace?: string

    The namespace to query. If not specified, uses the namespace configured on the Index.

  • OptionalscanFactor?: number

    An optimization parameter for IVF dense indexes in dedicated read node (DRN) indexes. It adjusts how much of the index is scanned to find vector candidates. Range: 0.54 (default).

    Keep the default (4.0) for the best search results. If query latency is too high, try lowering this value incrementally (minimum 0.5) to speed up the search at the cost of slightly lower accuracy. This parameter is only supported for dedicated (DRN) dense indexes.

  • topK: number

    The number of query results you would like returned.