lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grant Ingersoll (JIRA)" <>
Subject [jira] Commented: (LUCENE-1790) Boosting Max Term Query
Date Fri, 07 Aug 2009 03:15:14 GMT


Grant Ingersoll commented on LUCENE-1790:

Was actually just thinking we could have a simple Function Interface:
public interface PayloadFunction{
   float currentScore(currentScore, currentPayloadScore);

   float finalScore(numPayloadsSeen, payloadScore);

and it could be passed into the constructor.  Then, in processPayload, you could just have
          payloadScore = function.score(payloadScore, similarity.scorePayload(term.field(),
payload, 0, positions.getPayloadLength()));
instead of
          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:
return (payloadsSeen > 0 ? (function.finalScore(payloadsSeen, payloadScore)) : 1);

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:
>             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:
For additional commands, e-mail:

View raw message