import type { JinnConfig } from "../shared/types.js"; import type { GlobalSearchResult, ParsedQuery, SearchKind, SearchMatchField } from "./types.js"; /** * The six kinds that are not Todos. None of them has a text index, so each one * declares the fields it can be found by and a shared matcher does the rest — * one rule for word-order tolerance instead of six. * * Only Todos carry full bodies here: a note matches on its title, path and * preview, not its whole text. `/api/notes?q=` still searches note bodies. */ interface EntityField { field: SearchMatchField; value: string; } /** An entity reduced to what search needs: how to show it, where it goes, and * the text it can be found by. */ interface Candidate { id: string; title: string; url: string; subtitle?: string; status?: string; owner?: string; /** Read in order, so the first reason is the most identifying one. */ fields: EntityField[]; } export declare function textWords(freeText: string): string[]; export declare function searchEntities(kind: SearchKind, candidates: readonly Candidate[], words: readonly string[], limit: number): { results: GlobalSearchResult[]; total: number; }; export declare function employeeCandidates(config?: JinnConfig): Candidate[]; export declare function cronCandidates(): Candidate[]; export declare function skillCandidates(): Candidate[]; export declare function noteCandidates(home?: string): Candidate[]; export declare function pageCandidates(notesEnabled: boolean): Candidate[]; /** * Sessions are filtered in SQL rather than in process — there are far too many * to enumerate — so an assignee facet becomes the employee filter and the free * text becomes the text filter. */ export declare function searchSessions(parsed: ParsedQuery, limit: number): { results: GlobalSearchResult[]; total: number; }; export {}; //# sourceMappingURL=entity-results.d.ts.map