import { type DB } from '../db/client.js'; export interface HybridSearchOptions { /** * D1 binding OR a pre-built Drizzle client (any schema). v0.7+: * normalized internally. */ db: D1Database | DB; contentTable: string; ftsTable?: string; searchColumns: string[]; filters?: Record; rrfK?: number; bm25Weight?: number; keywordWeight?: number; dedupKey?: (row: Record) => string; } export interface SearchOptions { limit?: number; filters?: Record; } export interface ScoredRow extends Record { score: number; _kw: number; _bm: number; } export declare class HybridSearch { readonly db: DB; readonly contentTable: string; readonly ftsTable: string; readonly searchColumns: string[]; readonly filters: Record; readonly rrfK: number; readonly bm25Weight: number; readonly keywordWeight: number; readonly dedupKey: (row: Record) => string; constructor({ db, contentTable, ftsTable, searchColumns, filters, rrfK, bm25Weight, keywordWeight, dedupKey, }: HybridSearchOptions); search = Record>(query: string, { limit, filters }?: SearchOptions): Promise<(T & ScoredRow)[]>; bm25>(query: string, limit: number, filters?: Record): Promise; like>(query: string, limit: number, filters?: Record): Promise; private buildFilterFragment; rrf>(keyword: T[], bm25: T[], limit: number): (T & ScoredRow)[]; } export interface SearchSchemaArgs { contentTable: string; ftsTable?: string; ftsColumns: string[]; tokenize?: string; } export declare function buildSearchSchema({ contentTable, ftsTable, ftsColumns, tokenize }: SearchSchemaArgs): string[]; //# sourceMappingURL=hybrid_search.d.ts.map