software-search
Installation
SKILL.md
Search Engineering
Build search features that return the right results, fast.
Quick Reference
| Need | Default | Deviate when |
|---|---|---|
| Full-text search, PostgreSQL already in the stack | tsvector/tsquery plus pg_trgm, both on GIN indexes |
Ranking quality is the gap (ts_rank is not BM25): add a BM25 extension if the host allows it and its licence fits. Facets with counts, typo tolerance, merchandising, or latency at scale: move to a dedicated engine |
| Dedicated engine | Managed service when no one owns search-cluster operations | Self-host when data residency, cost at volume, or query control requires it and someone owns the cluster |
| Embedded or client-side search | Embedded index (such as SQLite FTS5) or a static client-side index | The corpus or its update rate outgrows a shipped index |
| Semantic search | Vector retrieval as a complement to lexical recall, in the existing database first when it supports vectors | Judged-query evidence shows the in-database option misses the latency or recall target |
| Hybrid search | Keyword + vector, merged with reciprocal rank fusion | Native fusion is missing from the edition or licence tier you will run: fuse in the application |
| Autocomplete | Prefix matching, search-as-you-type index, debounced queries | |
| Faceted search | Aggregation queries, filter counts, hierarchical facets | |
| Search analytics | Click-through rate, zero-result queries, query refinement patterns | |
| Search UI | The chosen engine's client UI library, if it has one | Custom components when the library cannot express the UX |
Lookup step before naming an engine. Engine capabilities, licences, and managed-service limits change from release to release, so shortlist by the criteria above, then check each candidate's current documentation and licence. Start from data/sources.json; the capability matrix in references/engine-and-relevance.md is a starting point, not current fact.