search-infralisted
Install: claude install-skill kouroshez/coding-os
# Search Infrastructure — Ranked Retrieval Done Right
A practical guide to building search that returns the *relevant* result, not just a matching row. Covers classic full-text (inverted index, BM25) and modern semantic (embeddings, vector ANN) retrieval, and the index-sync discipline that keeps either honest. Stack-agnostic; recipes target Elasticsearch/OpenSearch, Meilisearch, Typesense, and pgvector/Qdrant as the reference engines.
## When to Use This Skill
- Adding a search box, autocomplete, or "find similar" to a product.
- Choosing a search engine — managed Elastic vs Meilisearch vs Typesense vs Postgres FTS vs a vector DB.
- Designing an index mapping: which fields are searchable, which are filters, which analyzer.
- Tuning relevance — results are "technically matching but useless", boosting, synonyms, typo tolerance.
- Deciding keyword vs vector vs hybrid retrieval for a given query distribution.
- Keeping the search index consistent with the database that owns the data.
Skip when: the lookup is by exact key / known field on a small set — that is a database index (`WHERE id = ?`), see db-design, not a search engine. Search earns its complexity only for ranked, fuzzy, or free-text retrieval.
## The Index Is Derived, Never the Source of Truth
The single most important rule: **the search index is a denormalized, rebuildable projection of data that lives authoritatively elsewhere** (the transactional DB). It is eventually consistent and disposable.
- Never write u