import { FunctionChainColumnArg, FunctionChainExpr, FunctionChainSpec, FunctionChainStage, FunctionChains } from './types/FunctionChain'; type ColumnRef = { column: FunctionChainColumnArg; }; type MergeStrategy = 'rrf' | 'weighted' | 'max' | 'sum' | 'avg'; type NumCombineMode = 'multiply' | 'sum' | 'max' | 'min' | 'avg' | 'weighted'; type ParamInput = boolean | number | string | Uint8Array | readonly ParamInput[] | { [name: string]: ParamInput; }; /** * Reference a collection field, temporary column or system column. * @param name - Column name. * @returns A column argument for function chain expressions. */ export declare function col(name: string): ColumnRef; /** * Build an ordered chain of operations for a Milvus execution stage. * @param stage - The stage in which Milvus executes the chain. * @param options - An optional chain name and QueryScan output columns. */ export declare class FunctionChain { private readonly stage; private readonly ops; private readonly name; private readonly outputColumns; constructor(stage: FunctionChainStage, { name, outputColumns, }?: { name?: string; outputColumns?: readonly string[]; }); /** * Write the result of an expression to a column. * @param output - Temporary or system column name. * @param expr - Expression to evaluate. * @returns This chain. */ map(output: string, expr: FunctionChainExpr): this; /** * Sort by a column, optionally using a second column to break ties. * @param by - Primary sort column. * @param options - Sort direction and optional tie-break column. * @returns This chain. */ sort(by: string | ColumnRef, { desc, tieBreakCol, }?: { desc?: boolean; tieBreakCol?: string | ColumnRef; }): this; /** * Keep a page of results. * @param limit - Positive maximum row count. * @param offset - Number of rows to skip. * @returns This chain. */ limit(limit: number, offset?: number): this; /** * Merge the candidate lists in hybrid search. * @param strategy - Fusion strategy. * @param options - Per-input weights, score normalization and RRF constant. * @returns This chain. */ merge(strategy: MergeStrategy, { weights, normScore, k, }?: { weights?: readonly number[]; normScore?: boolean; k?: number; }): this; /** @returns The function chain's protobuf-shaped object. */ toProto(): FunctionChainSpec; } export declare function serializeFunctionChains(chains?: FunctionChains): FunctionChainSpec[]; /** Expression helpers for use with {@link FunctionChain.map}. */ export declare const fn: { /** * Combine two or more numeric columns. * @param columns - Columns in evaluation order. * @param options - Combination mode and weights for weighted mode. * @returns A num_combine expression. */ numCombine(columns: readonly ColumnRef[], { mode, weights, }?: { mode?: NumCombineMode | undefined; weights?: readonly number[] | undefined; }): FunctionChainExpr; /** * Compute a score based on the distance from an origin. * @param column - Numeric input column. * @param options - Decay function and its numeric parameters. * @returns A decay expression. */ decay(column: ColumnRef, { function: kind, origin, scale, offset, decay, }: { function: 'gauss' | 'exp' | 'linear'; origin: number; scale: number; offset?: number | undefined; decay?: number | undefined; }): FunctionChainExpr; /** * Round a numeric column to a fixed precision. * @param column - Numeric input column. * @param options - Number of decimal places. * @returns A round_decimal expression. */ roundDecimal(column: ColumnRef, { decimal }: { decimal: number; }): FunctionChainExpr; /** * Score a text column with the configured rerank provider. * @param column - Text input column. * @param options - Query strings and provider-specific parameters. * @returns A rerank_model expression. */ rerankModel(column: ColumnRef, options: { [name: string]: ParamInput; queries: readonly string[]; }): FunctionChainExpr; /** * Score numeric features with a registered UBJ XGBoost model. * @param features - Feature columns in model input order. * @param options - Milvus FileResource name and prediction mode. * @returns An xgboost expression. */ xgboost(features: readonly ColumnRef[], { modelResource, output, }: { modelResource: string; output?: "default" | "raw" | undefined; }): FunctionChainExpr; }; export {};