Issue Details (XML | Word | Printable)

Key: LUCENE-451
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Hoss Man
Reporter: Yonik Seeley
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Lucene - Java

BooleanQuery explain with boost==0

Created: 12/Oct/05 12:56 AM   Updated: 27/Jun/06 01:40 AM
Return to search
Component/s: Search
Affects Version/s: CVS Nightly - Specify date in submission
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works bq.containing.clause.with.zero.boost.tests.patch 2006-06-22 05:06 AM Hoss Man 11 kB
Text File Licensed for inclusion in ASF works bq.containing.clause.with.zero.boost.tests.patch 2006-06-21 08:02 AM Hoss Man 11 kB
Text File Licensed for inclusion in ASF works bq.containing.clause.with.zero.boost.tests.patch 2006-06-20 08:49 AM Hoss Man 5 kB
Issue Links:
Dependants
 

Resolution Date: 27/Jun/06 01:40 AM


 Description  « Hide
BooleanWeight.explain() uses the returned score of subweights to determine if a clause matched.
If any required clause has boost==0, the returned score will be zero and the explain for the entire BooleanWeight will be simply Explanation(0.0f, "match required").

I'm not sure what the correct fix is here. I don't think it can be done based on score alone, since that isn't how scorers work. Perhaps we need a new method "boolean Explain.matched()" that returns true on a match, regardless of what the score may be?

Related to the problem above, even if no boosts are zero, it it sometimes nice to know why a particular query failed to match. It would mean a longer explanation, but maybe we should include non matching explains too?



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order