[Xapian-discuss] Matching exact phrases only

Olly Betts olly at survex.com
Fri Aug 25 23:39:32 BST 2006


On Wed, Aug 09, 2006 at 11:06:19AM +0100, James Aylett wrote:
> Changing the k2_ parameters to BM25Weight's constructor
> to non-zero may be enough for you - that introduces a n_q / (1 + L_d)
> multiplier to weight calculation, where n_q is the size of the query
> and L_d is the normalised document length.

This is certainly what I'd try.  BM25's k2 must be >= 0, but there's no
upper limit and the more you increase it, the more you'll bias towards
shorter documents.

Cheers,
    Olly



More information about the Xapian-discuss mailing list