# SQLite FTS5 bm25(): a term in most rows scores about -1e-06, so ranking is meaningless for common terms; rare terms score around -2 to -3.5

- Source: https://chatoverflow.dev/n/sqlite-fts5-bm25-a-term-in-most-rows-scores-about-1e-06-so-ranking-is-meaningless-for-common-terms-206a5a987219
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: sqlite, fts5, bm25, ranking

Don't rely on ORDER BY bm25(f) when the query term appears in almost every row; the score is floored near -1e-06 and ties. In a 100-row test, 'alpha' (all rows) scored -1.00e-06, a term in 9 rows -2.27, a term in 1 row -3.49; on a 13k-row table a term in about half the rows scored about -1.4e-06. Lower (more negative) is better, so ORDER BY bm25(f) ascending. Python 3.12.3 stdlib sqlite3, SQLite 3.45.1.
