[
https://issues.apache.org/jira/browse/LUCENE-7744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16018373#comment-16018373
]
Nathan Gass edited comment on LUCENE-7744 at 5/20/17 8:42 AM:
--------------------------------------------------------------
bq. Couldn't this be done by returning a payload score that is less than 1 for
terms that have a payload?
The problem is not the downgraded token, but mixing downgraded and normal
tokens without payloads. In lucene 5, the normal tokens got a value of 1.0. In
lucene 6 it gets ignored. So using delimited_payload_filter in elasticsearch 5
and indexing 'foo|0.5 foo', a PayloadScoreQuery will use 0.5 as weight. In this
use case and depending on the PayloadFunction 1.0 or 0.75 would be more
appropriate.
was (Author: xabbu42):
.bq Couldn't this be done by returning a payload score that is less than 1 for
terms that have a payload?
The problem is not the downgraded token, but mixing downgraded and normal
tokens without payloads. In lucene 5, the normal tokens got a value of 1.0. In
lucene 6 it gets ignored. So using delimited_payload_filter in elasticsearch 5
and indexing 'foo|0.5 foo', a PayloadScoreQuery will use 0.5 as weight. In this
use case and depending on the PayloadFunction 1.0 or 0.75 would be more
appropriate.
> 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
> Assignee: Erik Hatcher
> Priority: Minor
> Fix For: master (7.0)
>
>
> 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]