Fix bug in PL2+ implementation
commitb003809378b0ac3a773a5bff67203351f9d35116
authorOlly Betts <olly@survex.com>
Wed, 19 Jun 2024 01:44:37 +0000 (19 13:44 +1200)
committerOlly Betts <olly@survex.com>
Wed, 19 Jun 2024 01:44:37 +0000 (19 13:44 +1200)
tree39ae790c55bee271321ed8ed2efa44dd9375bd3e
parent65f3a6edc3073ffa13fe0b8345e44ce10bdd1762
Fix bug in PL2+ implementation

Our variable mean is 1/lambda_t from the PL2+ paper, so we need to check
mean > 1 for lambda_t < 1 but we were actually checking mean < 1.

The result of this is that PL2+ actually returned a zero weight unless
the term occurred frequently enough in the collection.
xapian-core/tests/api_weight.cc
xapian-core/weight/pl2plusweight.cc