export type SearchMatchMode = "allTerms" | "anyTerm" | "phrase" | "regex"; export type TextSearchMode = "substring" | "glob" | "sql-like" | "regex"; export interface TextMatcher { matches(value: string): boolean; error?: string; } export declare function escapeLikeTerm(value: string): string; export declare function normalizeSearchTerms(query: string): string[]; export declare function matchesSearchMode(value: string, query: string, mode: SearchMatchMode): boolean; export declare function createTextMatcher(pattern: string, mode?: TextSearchMode): TextMatcher; export declare function buildSearchSnippet(value: string, terms: string[], maxLength?: number): string; export declare function scoreSearchText(fields: { title?: string | null; summary?: string | null; body?: string | null; metadata?: string | null; }, terms: string[]): number;