PrepCity

Search and the inverted index

Open the lab

By the last page, this is the design you will have built. Drag it, or Show all, to see every part.

Lesson · 14 pages · about 13 min

Search and the inverted index

LIKE '%…%' scans every row and cannot rank. An inverted index maps analysed words to the products that contain them, BM25 ranks the matches, and change data capture keeps the index a moment behind the database.

Words you’ll learn

  • PostgreSQL
  • B-tree
  • Database
  • Processor core
  • Row
  • Recall
  • Elasticsearch
  • Lucene
  • Inverted index
  • Postings list

Page by page