[Xapian-devel] NearPostList and get_wdf

Yann ROBIN me.show at gmail.com
Sun Dec 28 15:09:09 GMT 2008


On Sun, Dec 28, 2008 at 4:01 PM, Yann ROBIN <me.show at gmail.com> wrote:
> Hi,
>
> I'm trying to make a near search that would give better scoring for
> document where the words a nearer.
> So i thought that i could change de wdf in the NearPostList according
> to the distance between words. But it seems that the get_wdf of the
> NearPostList is never called ... Instead it's the get_wdf of the
> ChertPostList that it is called.
> I don't think this is something wanted ? should i open a ticket ?
>
> Thanks!
>

Ok, i do understand why it is not called :

NearPostList inherit from SelectPostList which only do call on a given
postlist (that should be the database postlist).

So when the get_weight is made on the NearPostList, it calls the
SelectPostList implementation which calls source->get_weight();

source->get_weight() call get_wdf but it can't but the NearPostList
implementation ...

-- 
Yann



More information about the Xapian-devel mailing list