/** * SMI-579: SearchService - FTS5 search with BM25 ranking * * Features: * - Full-text search using SQLite FTS5 * - BM25 ranking for relevance scoring * - Phrase queries and boolean operators * - Result highlighting for matched terms * - Pagination support * - Search caching */ import type { Database as DatabaseType } from '../db/database-interface.js'; import type { Skill, SearchOptions, SearchResult, PaginatedResults, TrustTier } from '../types/skill.js'; export type { FTSRow, BooleanSearchTerms, SearchCacheOptions } from './SearchService.types.js'; export { escapeFtsToken, buildFtsQuery, buildHighlights } from './SearchService.helpers.js'; /** * Full-text search service with BM25 ranking */ export declare class SearchService { private db; private cache; private cacheTtl; constructor(db: DatabaseType, options?: { cacheTtl?: number; }); /** * Search skills using FTS5 with BM25 ranking */ search(options: SearchOptions): PaginatedResults; /** * Search with phrase query support */ searchPhrase(phrase: string, options?: Omit): PaginatedResults; /** * Search with boolean operators (AND, OR, NOT) */ searchBoolean(terms: { must?: string[]; should?: string[]; not?: string[]; }, options?: Omit): PaginatedResults; /** * Get search suggestions based on partial input */ suggest(prefix: string, limit?: number): string[]; /** * Find similar skills based on a skill's content */ findSimilar(skillId: string, limit?: number): SearchResult[]; /** * Get popular skills by trust tier */ getPopular(trustTier?: TrustTier, limit?: number): Skill[]; /** * Clear the search cache */ clearCache(): number; /** * ADR-019: Filter-only search when query is empty * Queries the skills table directly instead of using FTS5 */ private searchByFiltersOnly; } //# sourceMappingURL=SearchService.d.ts.map