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

piglei piglei2007 at gmail.com
Wed Jul 18 04:21:47 BST 2012


Thank you.
If I want to write a custom weight scheme using C++ and use it in python,
is there any tutorial
of doing this thing?

2012/7/18 Olly Betts <olly at survex.com>

> 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