[ 
https://issues.apache.org/jira/browse/LUCENE-2272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837788#action_12837788
 ] 

Grant Ingersoll commented on LUCENE-2272:
-----------------------------------------

Peter,

Couple of comments:
*  The base explain method can't be abstract.   Something like:
{code}
public Explanation explain(int docId){
    Explanation result = new Explanation();
    result.setDescription("Unimpl Payload Function Explain");
    result.setValue(1);
    return result;
  };
{code}
should do the trick
* The changes don't seem thread safe any more since there are now member 
variables.  It may still be all right, but have you looked at this aspect?

> PayloadNearQuery has hardwired explanation for 'AveragePayloadFunction'
> -----------------------------------------------------------------------
>
>                 Key: LUCENE-2272
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2272
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Search
>            Reporter: Peter Keegan
>            Assignee: Grant Ingersoll
>         Attachments: payloadfunctin-patch.txt
>
>
> The 'explain' method in PayloadNearSpanScorer assumes the 
> AveragePayloadFunction was used. This patch adds the 'explain' method to the 
> 'PayloadFunction' interface, where the Scorer can call it. Added unit tests 
> for 'explain' and for {Min,Max}PayloadFunction.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to