Interface GenericFindAndRerankOptions

Options for some generic findAndRerank command.

interface GenericFindAndRerankOptions {
    hybridLimits?: number | Record<string, number>;
    includeScores?: boolean;
    includeSortVector?: boolean;
    limit?: number;
    maxTimeMS?: "ERROR: The `maxTimeMS` option is no longer available; the timeouts system has been overhauled, and timeouts should now be set using `timeout`";
    projection?: Projection;
    rerankOn?: string;
    rerankQuery?: string;
    sort?: HybridSort;
    timeout?: number | Pick<Partial<TimeoutDescriptor>, "requestTimeoutMs" | "generalMethodTimeoutMs">;
}

Hierarchy (view full)

  • WithTimeout<"generalMethodTimeoutMs">
    • GenericFindAndRerankOptions

Properties

hybridLimits?: number | Record<string, number>
includeScores?: boolean
includeSortVector?: boolean
limit?: number

The maximum number of records to return in the lifetime of the cursor.

Defaults to null, which means no limit.

maxTimeMS?: "ERROR: The `maxTimeMS` option is no longer available; the timeouts system has been overhauled, and timeouts should now be set using `timeout`"

This temporary error-ing property exists for migration convenience, and will be removed in a future version.

Deprecated

  • The maxTimeMS option is no longer available; the timeouts system has been overhauled, and timeouts should now be set using timeout, and defaults in timeoutDefaults. You may generally Ctrl+R replace maxTimeMS with timeout to retain the same behavior.
projection?: Projection

The projection to apply to the returned records, to specify only a select set of fields to return.

If using a projection, it is heavily recommended to provide a custom type for the returned records as a generic type-param to the find method.

rerankOn?: string
rerankQuery?: string
sort?: HybridSort

The order in which to apply the update if the filter selects multiple records.

Defaults to null, where the order is not guaranteed.

timeout?: number | Pick<Partial<TimeoutDescriptor>, "requestTimeoutMs" | "generalMethodTimeoutMs">

The method timeout override.

See TimeoutDescriptor for much more information.