Back to problems

Facebook Search (Mini Elasticsearch)

System Design · Meta · Hard

Requirements Functional behavior: accept posts, build searchable indexes, and serve keyword searches by returning the top K matches ordered by relevance. Capacity targets: index about 10 billion posts, sustain roughly 10,000 peak queries per second, and keep p95 latency under 200 ms. Key design choices: Inverted index: map each term to a postings list containing post IDs, ordered by recency and score. Ranking: begin with TF-IDF or BM25, then add a learned-to-rank layer.…

Checking your access…