[
https://issues.apache.org/jira/browse/LUCENE-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740380#action_12740380
]
Grant Ingersoll commented on LUCENE-1790:
-----------------------------------------
Was actually just thinking we could have a simple Function Interface:
{code}
public interface PayloadFunction{
float currentScore(currentScore, currentPayloadScore);
float finalScore(numPayloadsSeen, payloadScore);
}
{code}
and it could be passed into the constructor. Then, in processPayload, you
could just have
{code}
payloadScore = function.score(payloadScore,
similarity.scorePayload(term.field(), payload, 0,
positions.getPayloadLength()));
{code}
instead of
{code}
payloadScore = Math.max(payloadScore,
similarity.scorePayload(term.field(), payload, 0,
positions.getPayloadLength()));
{code} or whatever is there.
Then, the getPayloadScore() method (see my patch) would be:
{code}
return (payloadsSeen > 0 ? (function.finalScore(payloadsSeen, payloadScore)) :
1);
{code}
What did you have in mind? I'm pretty tired, so the above may be a bit whacked.
> Boosting Max Term Query
> -----------------------
>
> Key: LUCENE-1790
> URL: https://issues.apache.org/jira/browse/LUCENE-1790
> Project: Lucene - Java
> Issue Type: New Feature
> Reporter: Grant Ingersoll
> Assignee: Grant Ingersoll
> Priority: Minor
> Fix For: 2.9
>
> Attachments: LUCENE-1790.patch
>
>
> Similar to the BoostingTermQuery, the BoostingMaxTermQuery is a
> SpanTermQuery, but the difference is the payload score for a doc is not the
> average of all the payloads, but the maximum instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]