BM25+

What it is

BM25+ is a modification of BM25 that addresses a known flaw: in the original BM25, a term’s TF contribution can approach zero for very long documents due to the length normalisation penalty. This means a very long document that mentions a query term once might score lower than a short document that doesn’t mention the term at all — a counterintuitive result called the lower-bounding problem.

BM25+ adds a small constant δ (delta) to the TF component to ensure that any document containing a term receives a minimum positive contribution from that term.

How it works

Standard BM25 term weight:

tf_bm25(t, d) = (tf · (k₁ + 1)) / (tf + k₁ · (1 - b + b · |d| / avgdl))

For a very long document (|d| >> avgdl) with tf=1:

denominator ≈ k₁ · b · (|d| / avgdl)  →  very large
→  tf_bm25 → 0

BM25+ formula:

tf_bm25plus(t, d) = δ + (tf · (k₁ + 1)) / (tf + k₁ · (1 - b + b · |d| / avgdl))

The δ parameter (typically 1.0) guarantees the TF component never falls to zero. A document containing a term always scores strictly higher than one not containing it — regardless of document length.

[illustrate: BM25 vs BM25+ TF contribution curves for a fixed k₁ and b — x-axis is document length (1× to 20× avgdl), y-axis is TF weight for a single occurrence — BM25 curve descending toward zero for long documents, BM25+ curve asymptoting to δ (dashed floor) rather than zero]

Example

Three documents for query "rare_term":

Doc Length Contains term BM25 score BM25+ score
D1 500 tokens No 0.0 0.0
D2 50 tokens Yes, once 0.8 1.8
D3 5000 tokens Yes, once 0.05 1.05

Under BM25, D3 ranks below D1 (which doesn’t contain the term at all) — clearly wrong. BM25+ ensures D2 and D3 both score higher than D1, with D2 still scoring higher due to its shorter length.

Variants and history

BM25+ was proposed by Lv and Zhai in their 2011 paper “Lower-Bounding Term Frequency Normalization.” The paper demonstrated the flaw empirically on TREC collections and showed that adding δ = 1 consistently improved ranking quality.

BM25L is a related variant from the same paper that addresses the same problem using a different approach — capping the length normalisation factor rather than adding a floor.

When to use it

BM25+ is most beneficial when your corpus contains a wide range of document lengths — for example, mixing short product descriptions with long user manuals in the same index. In practice, BM25 and BM25+ perform similarly on homogeneous corpora.

Native BM25+ is not available as a built-in option in Elasticsearch or OpenSearch as of writing — the default BM25 implementation does not include the δ parameter. Custom Lucene Similarity implementations can add it. Some newer search libraries (Tantivy, Meilisearch) expose BM25 parameter tuning that may be extended to BM25+.

See also