You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Nathan Gass (JIRA)" <ji...@apache.org> on 2017/11/06 11:29:00 UTC

[jira] [Commented] (LUCENE-8038) Decouple payload decoding from Similarity

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

Nathan Gass commented on LUCENE-8038:
-------------------------------------

Yes this also fixes  LUCENE-7744.

As I read the code however, SimilarityPayloadDecoder is not fully backwards compatible. The old code ignored tokens without payload for scoring, the new one treats them as having payload 0 (So a MinPayloadFunction for the document "foo|0.5 foo" would newly return 0 instead of the current 0.5 (or 1.0 in lucene 5).

It might be useful to let PayloadDecoder return null for missing payloads. This way its possible to get any of the three semantics with a custom PayloadDecoder and default PayloadFunctions.

> 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
>         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
(v6.4.14#64029)

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