Full-Text Search Over Blocks

Problem Implement search across millions of blocks: given a text query, tokenize the block corpus, build an index, and return the matching blocks ranked by relevance. Blocks are created, edited and deleted continuously, so the index must stay current rather than being built once.

Input / Output

  • Input: a stream of blocks (id, text) to index, and a text query.
  • Output: block ids matching the query, ranked by relevance.

Constraints

  • Millions of blocks; queries must be fast.
  • Blocks change constantly — the index has to reflect edits and deletes.

Example

  • After indexing the corpus, querying "meeting notes" returns the ids of blocks containing those terms, best matches first.
added …
LeaderboardSalaryAccount