Hello, In the Xapian documentation, Theoretical Background, Boolean retrieval section, the last sentence mentions that Pure Boolean retrieval is also supported. However, I have not found yet any mention of that inside the code (maybe I should use Xapian to search through its own code ;-)). Could anybody point me to the right place in the API reference or the documentation/wiki please? Thanks, Yannick
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). J -- /--------------------------------------------------------------------------\ James Aylett xapian.org james@tartarus.org uncertaintydivision.org
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
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? J -- /--------------------------------------------------------------------------\ James Aylett xapian.org james@tartarus.org uncertaintydivision.org