import { FoamWorkspace } from '../model/workspace'; import { URI } from '../model/uri'; export interface SearchMatch { id: string; uri: URI; title: string; type: string; tags: string[]; properties: Record; line: number; text: string; context_before?: string[]; context_after?: string[]; } export interface PropertyFilter { key: string; /** undefined means "has the property" (any value) */ value?: string; } export interface SearchOptions { query?: string; tags?: string[]; properties?: PropertyFilter[]; type?: string; limit?: number; context?: number; /** * How to match `query` against titles and aliases. * * - `'substring'` (default): the query must appear as a contiguous substring, * case-insensitive. Suitable for `foam search` and similar UX. * - `'subsequence'`: the query characters must appear in the candidate in * order but not necessarily contiguous, case-insensitive. Matches VS * Code's `Ctrl+T` symbol-search behavior — `"alt"` matches `"alternative"`. */ matchMode?: 'substring' | 'subsequence'; } /** * Searches the Foam workspace index by title, alias, tag, and/or frontmatter * property. Returns one match per note (matched on the title line). * * This is an in-memory query over the workspace index — it does not read * note bodies. For full-text content search, use the file content directly. */ export declare function searchWorkspace(workspace: FoamWorkspace, opts: SearchOptions): SearchMatch[]; //# sourceMappingURL=search.d.ts.map