search for: weightsource

Displaying 2 results from an estimated 2 matches for "weightsource".

2018 Jan 24
0
How to get the serialise score returned in Xapian::KeyMaker->operator().
...thon example and source code of xapian, > the simple demo is here. > https://github.com/xiangqianzsh/xapian_leaning/blob/master/postingsource/ExternalWeightPostingSource.h I'd just put the get_weight() and get_maxweight() implementations into your ExternalWeightPostingSource class - the WeightSource class doesn't seem to serve a useful purpose and just adds virtual method call overheads (and those can add up, unless the compiler can devirtualise the calls, which compilers are getting better at). In the python example, the WeightSource class is just meant to be a placeholder for "some...
2018 Jan 22
2
How to get the serialise score returned in Xapian::KeyMaker->operator().
>A possible workaround (and perhaps a better approach) would be to >set BoolWeight as the weighting scheme, then feed in your score as >a weight using a PostingSource. Then it's available via get_weight() >on the MSetIterator object: > >https://getting-started-with-xapian.readthedocs.io/en/latest/advanced/postingsource.html > >You may find that's faster because