Design a Distributed Full-Text Search Engine
Problem
Design Elasticsearch's core: a distributed full-text search engine over sharded, replicated documents.
Requirements
Functional:
- Index documents; full-text and field queries
- Shard and replicate for scale + redundancy
- Ranked results (BM25)
- Near-real-time indexing
Non-functional:
- Billions of documents
- Low-latency search, high availability
- Survive node failures
Discussion points
- Inverted index + sharding strategy
- Replication and node roles (data/master/ingest)
- Scatter-gather query + ranking
- Near-real-time refresh and segment merges
- Cluster state and failover
added …