import type { VaultInfo } from "../utils/vault.js"; export interface SearchResult { file: string; score: number; links: number; modified: string; snippets: { line: number; text: string; }[]; } export interface SearchOptions { path?: string; limit?: number; snippetLines?: number; snippets?: boolean; } export interface RankedHit { file: string; /** Composite relevance: BM25 + log₂(1+backlinks) + recency, rounded to 0.1. */ score: number; links: number; mtime: number; content: string; } export interface SearchCorpus { rank(query: string): RankedHit[]; } /** * The vault's ranked search corpus — the index, documents, and backlink * counts behind every relevance judgement, loaded from the search cache or * built and saved. `searchVault` and the overview keyword probes share it so * their notion of "what this query returns" can never disagree. */ export declare function loadSearchCorpus(vault: VaultInfo, folder?: string): SearchCorpus; export declare function searchVault(vault: VaultInfo, query: string, opts?: SearchOptions): SearchResult[];