lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Trouble Boosting BooleanQuery's with Multiple Clauses
Date Sun, 31 Aug 2008 04:02:52 GMT

: When I create a TermQuery, add it as a SHOULD clause to a BooleanQuery, and
: boost that BooleanQuery, the boost shows up when I run
: IndexSearcher.explain(). However, when I add a second TermQuery as a SHOULD
: clause to that same BooleanQuery, and still boost the BooleanQuery, the
: boost is nowhere to be found in the output of IndexSearcher.explain(). Note

Does the numeric value for the explanation match the (raw) score you get 
from actaully searching for that doc?

We have some pretty exhaustive tests to verify that the "match" and 
"value" info for all of the Explanation objects of basic query types 
(including BooleanQuery) are correct -- but i don't think there are any 
tests that inspect the structure of the Explanation to ensure that it 
breaks the information down in any particular way.  The Boost info might 
be encapsulated into something else and not entirely obvious (It's been a 
while since i looked at BooleanWeight internals, the boost might be pushed 
down to the other clauses)

It would also help if you could send a short code sample showing exactly 
what you are trying and what output you are getting so there's no 
confusion about what it is you are testing.

the optimal situation would be if you could send a JUnit test 
demonstrating your problem.



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message