lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "paul.elschot (JIRA)" <>
Subject [jira] Commented: (LUCENE-605) Make Explanation include information about match/non-match
Date Sun, 18 Jun 2006 10:13:30 GMT
    [ ] 

paul.elschot commented on LUCENE-605:

I tried removing the Explanation constructor that is deprecated in the demo-fix.patch.
One of the uses of this constructor is in the (patched) BooleanQuery from line 317,
and fixed it like this (under ASL 2):

      float coordFactor = similarity.coord(coord, maxCoord);
      if (coordFactor != 1.0f) { // coordination has effect
        sumExpl.setValue(sumExpl.getValue() * coordFactor);
        sumExpl.setDescription(sumExpl.getDescription() + " * " + coordFactor + "=coord("+coord+"/"+maxCoord+")");
      return sumExpl;

The point is that adding by adding a match indicator to Explanation, Explanation becomes less
to explain a subformula of a (matching) score value, in this case the coordination factor.
The fix is to add the subformula to the description and the value of the explanation.

Btw. the actual explained score value was not changed by setValue() in the existing code for
the coordination factor.
This is probably a bug in BooleanQuery.explain().

There seems to be no test for the explanation descriptions, and I did not have a look at the
actually produced
getDescription() of the returned Explanation in this case.

> Make Explanation include information about match/non-match
> ----------------------------------------------------------
>          Key: LUCENE-605
>          URL:
>      Project: Lucene - Java
>         Type: Improvement

>   Components: Search
>     Reporter: Hoss Man
>     Assignee: Hoss Man
>  Attachments: demo-fix.patch
> As discussed, I'm looking into the possibility of improving the Explanation class to
include some basic info about the "match" status of the Explanation -- independent of the
> This is neccesary to deal with things like LUCENE-451

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message