Inverted Index — pick a scenario
0/3 donePick one and press Start, then click Next › to step through it.
Watch forThe pair of markers stepping forward and the result row filling only when they land on the same id.
More about this scenario
You'll learnWhy an AND query costs about the length of two lists instead of scanning every document in the corpus.
How it runscat sits in four documents and dog in three. Two pointers advance whichever points at the smaller id, emitting a match only when both agree.