import { IndexItem, SectionRecord } from './types'; /** A scoring function pair built against a fixed corpus's document-frequency statistics */ export interface SearchScorer { scoreItem(item: IndexItem, query: string): number; scoreSection(section: SectionRecord, query: string): number; } /** * Builds an IDF-weighted scorer over a fixed corpus. * * Document frequency is computed lazily per token and cached for the lifetime of the * returned scorer, so a common token like "a" contributes almost nothing to a match while * a rare token like "zod" dominates it. Callers should rebuild the scorer whenever `index` * or `sections` actually change. */ export declare function createSearchScorer(index: IndexItem[], sections: SectionRecord[]): SearchScorer; /** Returns names close enough to a failed lookup to be worth suggesting */ export declare function suggestNames(index: IndexItem[], query: string, limit?: number): string[];