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

Nathan Gass commented on LUCENE-7744:
-------------------------------------

Ping

I still think adding some flexibility on how to handle tokens without payload 
would be helpful. I'm also willing to try to implement a different approach but 
I need some input on what the correct approach would be.

One possibility is to let the PayloadFunction also handle tokens without 
payload. This way could be completely backwards compatible and even more 
flexible.

On the other hand, I have seen code examples for scorePayload which test for 
null. So perhaps at one time this was possible, or there are other ways this 
function could be called with null even now. 

> default value for scoring payloads
> ----------------------------------
>
>                 Key: LUCENE-7744
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7744
>             Project: Lucene - Core
>          Issue Type: New Feature
>          Components: core/query/scoring
>            Reporter: Nathan Gass
>            Priority: Minor
>
> In lucene 5, PayloadTermQuery used a hardcoded default of 1.0 for terms 
> without a payload. The replacing PayloadScoreQuery in lucene 6 just ignores 
> those terms. This is unflexible and wrong for many use cases (for example 
> using Payloads to deemphasize some terms, where terms without payload should 
> result in maximum score instead of being ignored).
> In my pull request I defer the decision on what to do with missing payloads 
> to the scorePayload method of the similarity, which has to check the given 
> payload for null and handle that case. I believe this breaks backwards 
> compatibility?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to