export type Field = { text: string; weight: number; }; export declare class Bm25Index { #private; /** * Build an index. * * `fields` returns the searchable text of one document, with a weight per * field. A weighted field contributes its words more than once, which is how * a match in a title outranks the same match buried in a body. */ constructor(items: T[], fields: (item: T) => Field[]); /** The best `limit` matches, highest score first. Empty when nothing matches. */ search(query: string, limit?: number): { item: T; score: number; }[]; } //# sourceMappingURL=bm25.d.ts.map