import type { SearchDoc } from '../core/content.js'; /** One result row: enough to render a link and a preview. */ export type SearchResult = { path: string; title: string; section?: string; snippet: string; /** The page's version id, so a versioned site can scope results. */ version?: string; }; export type SearchEngine = { /** * Ranked results for `query`, at most `limit` (default 8). Pass `version` to * return only that version's pages (over-fetches internally so the limit is * still met after filtering). */ search(query: string, limit?: number, version?: string): SearchResult[]; }; /** Build a search engine over `docs`. Indexing is synchronous and one-time. */ export declare function createSearchEngine(docs: SearchDoc[]): SearchEngine;