Design a Scalable Document Search Service

Problem

Design a full-text document search service over a large enterprise corpus.

Requirements

Functional:

  • Index and search millions of documents
  • Ranked results with snippets
  • Access control per document
  • Incremental indexing on updates

Non-functional:

  • 10s of millions of docs
  • Sub-second search
  • Freshness within minutes

Discussion points

  1. Inverted index and sharding
  2. Ranking (TF-IDF/BM25)
  3. Incremental indexing pipeline
  4. ACL filtering at query time
  5. Caching hot queries
added …
LeaderboardSalaryAccount