[Xapian-discuss] Can not use custom weight scheme with python binding

Olly Betts olly at survex.com
Wed Jul 18 01:00:38 BST 2012


On Tue, Jul 17, 2012 at 11:56:21PM +0800, piglei wrote:
> Actually, I want to make the weight only related to the count of the
> matching terms,
> not related with the document length or some thing else.
> Maybe like the
> 
> CoordinateWeight in http://xapian.org/docs/sorting.html
> 
> Because I'm not very familiar with c++.
> So can I achive this simple weight scheme by using some special
> arguments of the BM25 weight?

No - you can turn off the effects of wdf and doclen in BM25 by setting
k1=k2=k3=0, but the log involving term frequency and collection size is
always there.

Cheers,
    Olly



More information about the Xapian-discuss mailing list