[Xapian-discuss] Set Term Frequency for a Query

Olly Betts olly at survex.com
Mon Mar 7 12:44:09 GMT 2011


On Mon, Mar 07, 2011 at 12:43:33PM +0100, Pierre-Alain Moellic wrote:
>     Xapian::Query query_test(Xapian::Query::OP_OR, Xapian::Query("Bonjour",
> 10), Xapian::Query("Hello", 5));
>     Xapian::TermIterator qt = query_test.get_terms_begin();
>     while (qt != query_test.get_terms_end())
>     {
>       cout<<*qt<<" "<<qt.get_wdf()<<" ";
>       qt++;
>     }
> 
> returns : Bonjour 1 Hello 1
> 
> I don't understand why get_wdf returns "1" and not Bonjour 10 Hello 5 ?

Well, 10 and 5 are wqfs not wdfs, but I think you're right that
get_wdf() should return the wqf in this case.

So it's a bug, I'd say.

Cheers,
    Olly



More information about the Xapian-discuss mailing list