intermediate
Search engines
Use Elasticsearch, OpenSearch, inverted indexes, and full-text search when product search needs ranking, tokenization, and fast retrieval.
Search engine interviews test inverted indexes, analyzers, ranking, and operational cost when product search outgrows SQL `LIKE` or PostgreSQL full-text. Elasticsearch and OpenSearch share concepts with different ecosystem paths.
Subtopics: Elasticsearch, OpenSearch, full-text search concepts, inverted index mechanics.
On interviews: explain tokenization versus storage index, refresh near-real-time behavior, and when to reindex versus alias swap.
Common pitfalls: treating search as strongly consistent with OLTP; wrong analyzer for the language; huge aggregations on hot clusters without capacity plan.
The trade-off is balancing relevance and speed against cluster operations, reindexing, and sync from source of truth.
Checklist:
- Map queries to analyzers, filters, and scoring needs.
- Understand inverted index and refresh semantics.
- Plan sync, reindex, and alias cutover from OLTP.
- Compare Elasticsearch vs OpenSearch for ops and licensing.