You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Alan Woodward (JIRA)" <ji...@apache.org> on 2018/07/24 12:37:00 UTC

[jira] [Commented] (LUCENE-8424) Payload null value exception handling

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

Alan Woodward commented on LUCENE-8424:
---------------------------------------

Thanks for opening the issue!

We can't just return immediately when the payload is null, due to LUCENE-7744.  I think the correct action here is to only increment {{payloadsSeen}} if the payload is not null, but still calculate the altered score.

It would also be good to add a test to TestPayloadScoreQuery that checks behaviour when some and/or all payloads are null.

> Payload null value exception handling
> -------------------------------------
>
>                 Key: LUCENE-8424
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8424
>             Project: Lucene - Core
>          Issue Type: Bug
>    Affects Versions: 7.2, 7.3.1
>            Reporter: Tapan Vaishnav
>            Assignee: Alan Woodward
>            Priority: Minor
>         Attachments: LUCENE-8424.patch
>
>
> If-Condition to check payload null value in _PayloadScoreQuery.java_ was removed in LUCENE-8038. Because of that, regarding of the payload value, _payloadsSeen_ is always getting increment. This has compromised the overall score of the document(for instance, as payloadSeens is always greater than 0, docScore() in _MinPayloadFunction.java_ only returns payloadScore which can be zero depending on the payload value). Ideally, it should've returned 1 in case of _payload==null_.
> I have added a simple patch to get started, Please let me know if it needs any improvements. 
> Thanks in advance.



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

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