[Xapian-discuss] Howto activate pure boolean search
Olly Betts
olly at survex.com
Thu Jan 17 03:10:38 GMT 2008
On Mon, Jan 14, 2008 at 11:02:22PM +0000, James Aylett wrote:
> On Mon, Jan 14, 2008 at 11:35:20PM +0100, Yannick Warnier wrote:
>
> > In the Xapian documentation, Theoretical Background, Boolean retrieval
> > section, the last sentence mentions that Pure Boolean retrieval is also
> > supported.
>
> I *think* all you need to do is to use a Xapian::BoolWeight as your
> weighting scheme (instead of the default of Xapian::BM25Weight).
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);
Cheers,
Olly
More information about the Xapian-discuss
mailing list