lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@lucene.com>
Subject Re: [patch] bug with boosts in parsed queries
Date Wed, 11 Sep 2002 22:30:58 GMT
Lee Mallabone wrote:
> Should I update the patch for now so that BooleanQuery.setBoost() just
> calls setBoost() on all its clauses?

That only works if you call setBoost() after all of the clauses have 
been added, which is a little fragile.  So you'd also need to boost new 
clauses as they're added.  Also, what happens when a clause already has 
a boost that's not equal to 1?  Should setBoost() then set each clause's 
boost to the product of its current boost and the supplied boost?

So yes, its possible to fix this way, if a little complex.  Things would 
be simpler if BooleanQuery just multiplied its boost into the scores.

Doug


--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message