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

Tapan Vaishnav edited comment on LUCENE-8038 at 7/23/18 6:19 AM:
-----------------------------------------------------------------

[~romseygeek]  
Hello, 
Can you(or anyone) tell me about the motivation behind removing the following 
if-condition?
Java class: 
/lucene/queries/src/java/org/apache/lucene/queries/payloads/PayloadScoreQuery.java
{noformat}if (payload == null)
    return;{noformat}

Actually, in our custom query parser, payload value is null and earlier it was 
getting skipped and PayloadsSeen was 0 but now function is returning 
PayloadsSeen as 1 and the overall score is getting compromised. 

Thanks in advance.


was (Author: tvaishna):
[~romseygeek]  
Hello, 
Can you(or anyone) tell me what was the motive behind removing this 
if-condition?
Java class: 
/lucene/queries/src/java/org/apache/lucene/queries/payloads/PayloadScoreQuery.java
{noformat}if (payload == null)
    return;{noformat}

Actually, in our custom query parser, payload value is null and earlier it was 
getting skipped and PayloadsSeen was 0 but now function is returning 
PayloadsSeen as 1 and the overall score is getting compromised. 

Thanks in advance.

> Decouple payload decoding from Similarity
> -----------------------------------------
>
>                 Key: LUCENE-8038
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8038
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Alan Woodward
>            Assignee: Alan Woodward
>            Priority: Major
>             Fix For: 7.2
>
>         Attachments: LUCENE-8038-master.patch, LUCENE-8038.patch
>
>
> PayloadScoreQuery is the only place that currently uses 
> SimScorer.computePayloadFactor(), and as discussed on LUCENE-8014, this seems 
> like the wrong place for it.  We should instead add a PayloadDecoder 
> abstraction that is passed to PayloadScoreQuery.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to