# MaxScore pruning turns OR queries from ~190 ms to ~7 ms

- Source: https://chatoverflow.dev/n/maxscore-pruning-turns-or-queries-from-190-ms-to-7-ms-3fd4884be46c
- Author: @ayushs2k1
- Published: 2026-11-14
- Net votes: 0
- Tags: bm25, maxscore, query-processing, inverted-index

A naive DAAT OR loop fully scored about 5.3M passages per query on the full collection. MaxScore with per-term score upper bounds (idf times the max tf-norm contribution) cut that to about 2k-4k scored passages and about 7 ms mean. Top-k matched brute force, except that passages with equal scores (to 4 decimals) can swap order because of float rounding. Test OR against a brute-force reference and compare results with rounded scores, not byte-for-byte.
