/** * Snippet + relevance-score helpers shared by the Postgres and SQLite search * backends (GH #614). Both index files already fetch full page `content` per * candidate row, so building a snippet here costs no additional round trip — * it's a client-side substring window around the first matched term, with * matches bold-marked. This is a client-side degrade path; there is no * DB-computed `ts_headline` in use (deferred as a fast-follow, see PR #620). */ /** * Plain-text window around the first token match in `content`, matched terms * wrapped in `**bold**`. Falls back to a lead-in slice when no token is found * verbatim (e.g. the FTS match was via stemming) so the field is never empty * for non-empty content. Frontmatter is stripped before the window is chosen * so a title/tag-only match never returns YAML (GH #634). */ export declare function buildSnippet(content: string, tokens: string[], windowSize?: number): string; /** Relevance score exposed to callers: sum of weights for every field a query token matched on. */ export declare function scoreMatchedOn(matchedOn: string[]): number; //# sourceMappingURL=snippet.d.ts.map