[Xapian-discuss] Howto activate pure boolean search

Olly Betts olly at survex.com
Thu Jan 17 12:24:59 GMT 2008


On Thu, Jan 17, 2008 at 04:21:57AM +0000, James Aylett wrote:
> On Thu, Jan 17, 2008 at 03:10:38AM +0000, Olly Betts wrote:
> 
> [Boolean weighting schemes]
> > Yes - in C++:
> > 
> >     enquire.set_weighting_scheme(Xapian::BoolWeight());
> > 
> > Alternatively, you can wrap your query using OP_SCALE_WEIGHT with a
> > factor of 0 - in C++:
> > 
> >     query = Xapian::Query(query.OP_SCALE_WEIGHT, query, 0);
> 
> Is that equivalent? Does Xapian avoid running the weighting scheme in
> this case?

Yes, in the same way we don't perform weighting calculations for the
right-hand side of OP_FILTER and OP_ANDNOT.

Cheers,
    Olly



More information about the Xapian-discuss mailing list