DLH,DPH: Eliminate lower_bound
commit0f516f7f722df678b671b33a4070de85079e2f6a
authorOlly Betts <olly@survex.com>
Wed, 24 Aug 2016 05:33:13 +0000 (24 17:33 +1200)
committerOlly Betts <olly@survex.com>
Wed, 14 Sep 2016 03:20:00 +0000 (14 15:20 +1200)
treecdddbc899a747a1552047c5e6594b32a8929a7b9
parent9090b0444bc45125000cd9efb5d8a58e9ebbc892
DLH,DPH: Eliminate lower_bound

The idea of dealing with an algorithm which allows a term to have a
negative weight contribution by calculating a lower_bound for each term
and adjusting both sumpart and maxpart by it is fundamentally flawed -
the total offset it adds to a document depends on what combination of
terms it matches, and so in general isn't the same for every matching
document.

So get rid of lower_bound entirely, and instead clamp each term's
weight contribution to be >= 0.

(cherry picked from commit 92375204a109f455dbc51a64d5c4ea718c6beb25)
xapian-core/include/xapian/weight.h
xapian-core/tests/api_weight.cc
xapian-core/weight/dlhweight.cc
xapian-core/weight/dphweight.cc