Lesson 14 of 15
19. Search and Inverted Indexes

Sources

3 min read+10 XP

Source notes

  • Elasticsearch default similarity BM25 with k1 = 1.2 and b = 0.75: Elasticsearch documentation, "Similarity settings"; Elastic blog, "Practical BM25 Part 2". Default index.refresh_interval of 1 second (near real-time search) and default of 1 primary shard: Elasticsearch documentation. Checked 2026-10-08.
  • Inverted indexes, TF-IDF and BM25: Manning, Raghavan and Schütze, Introduction to Information Retrieval (Cambridge University Press, 2008); Robertson and Zaragoza, "The Probabilistic Relevance Framework: BM25 and Beyond" (2009).
  • Lucene segments and merging: Apache Lucene documentation.
  • Catalogue size, row sizes, disk speed and query rates are illustrative assumptions; arithmetic computed 2026-10-08.
  • Level 3 and Level 4 code: tested 2026-10-08 (code/ch19_search.py, all checks pass).