Search — Roadmap
Build an inverted index from scratch. Then self-host Meilisearch or Elasticsearch.
Real-World Analogy
A book index vs reading every page: without an index, finding “database” means scanning every word. A search engine’s inverted index maps every word to the documents containing it — lookup is instant. Understanding that structure is understanding everything that follows: why some queries are fast, why typo tolerance costs something, why facets require special data structures.
What you will learn
Search is one of the most visible features in any product, and one of the most misunderstood. This track starts from how search engines actually work — inverted indexes, tokenization, BM25 scoring — then covers Postgres full-text search (good enough for most cases), Meilisearch (typo-tolerant, easy to self-host), Elasticsearch (complex aggregations, massive scale), and the practical discipline of measuring and improving search quality over time.
Chapters in this track
- How Search Works — inverted index, tokenization, TF-IDF, BM25, phrase search
- Postgres Full-Text Search — tsvector, GIN indexes, ranking, highlighting, autocomplete
- Meilisearch — setup, indexing, typo tolerance, facets, keeping in sync with Postgres
- Elasticsearch — mappings, analyzers, Query DSL, aggregations, production cluster
- Search in Practice — relevance tuning, synonyms, A/B testing, analytics, zero-results handling