You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Grant Ingersoll (JIRA)" <ji...@apache.org> on 2009/08/07 05:01:14 UTC

[jira] Created: (LUCENE-1790) Boosting Max Term Query

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


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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-1790) Boosting Function Term Query

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Ingersoll updated LUCENE-1790:
------------------------------------

    Attachment: LUCENE-1790.patch

Next take on this:

1. Added includeSpanScore flag, which allows you to ignore the score from the TermQuery part of the score and only count the payload.

2. Deprecated Similarity.scorePayload(String fieldName, ...) to a similar method that also takes in the Doc id.  Now, in theory, you could have different scoring for payloads based on different documents, fields, etc.  The old method just calls the new one and passes in a NO_DOC_ID_PROVIDED value (-1).

3. Added a Marker Interface named PayloadQuery and marked the various PayloadQueries.  This could be useful for Queries that work with other PayloadQueries (more exclusive than the fact that they are SpanQueries.

I really do intend to commit this :-)

> Boosting Function 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, LUCENE-1790.patch, LUCENE-1790.patch
>
>
> Similar to the BoostingTermQuery, the BoostingFunctionTermQuery is a SpanTermQuery, but the difference is the payload score for a doc is not the average of all the payloads, but applies a function to them instead.  BoostingTermQuery becomes a BoostingFunctionTermQuery with an AveragePayloadFunction applied to it.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-1790) Add Boosting Function Term Query and Some Payload Query refactorings

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743747#action_12743747 ] 

Mark Miller commented on LUCENE-1790:
-------------------------------------

BoostingFunctionTermQuery implements equals but not hashcode - important for a query class I think.

> Add Boosting Function Term Query and Some Payload Query refactorings
> --------------------------------------------------------------------
>
>                 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-position.patch, LUCENE-1790.patch, LUCENE-1790.patch, LUCENE-1790.patch
>
>
> Similar to the BoostingTermQuery, the BoostingFunctionTermQuery is a SpanTermQuery, but the difference is the payload score for a doc is not the average of all the payloads, but applies a function to them instead.  BoostingTermQuery becomes a BoostingFunctionTermQuery with an AveragePayloadFunction applied to it.
> Also add marker interface to indicate PayloadQuery types.  Refactor Similarity.scorePayload to also take in the doc id.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-1790) Add Boosting Function Term Query and Some Payload Query refactorings

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller updated LUCENE-1790:
--------------------------------

    Attachment: LUCENE-1790.patch

remove some unused imports
added missing license header

Added hashCode to BoostingFunctionTermQuery

Added hashCode/equals to PayloadFunction classes

added hashcode/equals to query - really it should be handling the equals/hashcode for boost, not subclasses (which will be likely to forget it - you should check super classes for these things anyway as well).

BoostingFunctionTermQuery is a subclass of SpanTermQuery, but both of them use a weak equals method (using instanceof)
so while BoostingFunctionTermQuery.equals(SpanTermQuery) should equal SpanTermQuery.equals(BoostFunctionTermQuery), it doesn't.

Added new hashCode/equals for both classes that work properly.

Added a couple tests for these fixes

> Add Boosting Function Term Query and Some Payload Query refactorings
> --------------------------------------------------------------------
>
>                 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-position.patch, LUCENE-1790.patch, LUCENE-1790.patch, LUCENE-1790.patch, LUCENE-1790.patch
>
>
> Similar to the BoostingTermQuery, the BoostingFunctionTermQuery is a SpanTermQuery, but the difference is the payload score for a doc is not the average of all the payloads, but applies a function to them instead.  BoostingTermQuery becomes a BoostingFunctionTermQuery with an AveragePayloadFunction applied to it.
> Also add marker interface to indicate PayloadQuery types.  Refactor Similarity.scorePayload to also take in the doc id.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Issue Comment Edited: (LUCENE-1790) Add Boosting Function Term Query and Some Payload Query refactorings

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742977#action_12742977 ] 

Grant Ingersoll edited comment on LUCENE-1790 at 8/13/09 2:23 PM:
------------------------------------------------------------------

Pass in position information as well for scoring.  Will commit tomorrow.

      was (Author: gsingers):
    Pass in position information as well for scoring
  
> Add Boosting Function Term Query and Some Payload Query refactorings
> --------------------------------------------------------------------
>
>                 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-position.patch, LUCENE-1790.patch, LUCENE-1790.patch, LUCENE-1790.patch
>
>
> Similar to the BoostingTermQuery, the BoostingFunctionTermQuery is a SpanTermQuery, but the difference is the payload score for a doc is not the average of all the payloads, but applies a function to them instead.  BoostingTermQuery becomes a BoostingFunctionTermQuery with an AveragePayloadFunction applied to it.
> Also add marker interface to indicate PayloadQuery types.  Refactor Similarity.scorePayload to also take in the doc id.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-1790) Boosting Function Term Query

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Ingersoll updated LUCENE-1790:
------------------------------------

    Attachment: LUCENE-1790.patch

Refactors BoostingTermQuery to be a BoostingFunctionQuery.  Adds in several PayloadFunction implementations.  All tests pass

Will commit today or tomorrow.

> Boosting Function 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, LUCENE-1790.patch
>
>
> Similar to the BoostingTermQuery, the BoostingFunctionTermQuery is a SpanTermQuery, but the difference is the payload score for a doc is not the average of all the payloads, but applies a function to them instead.  BoostingTermQuery becomes a BoostingFunctionTermQuery with an AveragePayloadFunction applied to it.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-1790) Boosting Max Term Query

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740546#action_12740546 ] 

Mark Miller commented on LUCENE-1790:
-------------------------------------

Yeah, thats basically what I was thinking - then you could do min score or whatever as well - .

Does it really needs all of those args though? I guess you could possibly do more that way, but it almost seems you just need:

{code}
public interface PayloadAggregationFunction{
   void aggregate(score);
   float score();
}

{code}

> 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-1790) Boosting Function Term Query

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Ingersoll updated LUCENE-1790:
------------------------------------

    Description: Similar to the BoostingTermQuery, the BoostingFunctionTermQuery is a SpanTermQuery, but the difference is the payload score for a doc is not the average of all the payloads, but applies a function to them instead.  BoostingTermQuery becomes a BoostingFunctionTermQuery with an AveragePayloadFunction applied to it.  (was: 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.)
        Summary: Boosting Function Term Query  (was: Boosting Max Term Query)

> Boosting Function 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 BoostingFunctionTermQuery is a SpanTermQuery, but the difference is the payload score for a doc is not the average of all the payloads, but applies a function to them instead.  BoostingTermQuery becomes a BoostingFunctionTermQuery with an AveragePayloadFunction applied to it.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-1790) Boosting Max Term Query

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Ingersoll updated LUCENE-1790:
------------------------------------

    Attachment: LUCENE-1790.patch

Will commit tomorrow or Saturday, as it is a pretty minor variant of the BoostingTermQuery

> 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Reopened: (LUCENE-1790) Add Boosting Function Term Query and Some Payload Query refactorings

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Ingersoll reopened LUCENE-1790:
-------------------------------------


Going to reopen and actually pass along the Term and the position information into both the new scorePayload() method and into the PayloadFunction, as it may be useful to know this information when scoring payloads.

> Add Boosting Function Term Query and Some Payload Query refactorings
> --------------------------------------------------------------------
>
>                 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, LUCENE-1790.patch, LUCENE-1790.patch
>
>
> Similar to the BoostingTermQuery, the BoostingFunctionTermQuery is a SpanTermQuery, but the difference is the payload score for a doc is not the average of all the payloads, but applies a function to them instead.  BoostingTermQuery becomes a BoostingFunctionTermQuery with an AveragePayloadFunction applied to it.
> Also add marker interface to indicate PayloadQuery types.  Refactor Similarity.scorePayload to also take in the doc id.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Resolved: (LUCENE-1790) Add Boosting Function Term Query and Some Payload Query refactorings

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Ingersoll resolved LUCENE-1790.
-------------------------------------

       Resolution: Fixed
    Lucene Fields:   (was: [Patch Available])

Deprecated BoostingTermQuery and committed

> Add Boosting Function Term Query and Some Payload Query refactorings
> --------------------------------------------------------------------
>
>                 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, LUCENE-1790.patch, LUCENE-1790.patch
>
>
> Similar to the BoostingTermQuery, the BoostingFunctionTermQuery is a SpanTermQuery, but the difference is the payload score for a doc is not the average of all the payloads, but applies a function to them instead.  BoostingTermQuery becomes a BoostingFunctionTermQuery with an AveragePayloadFunction applied to it.
> Also add marker interface to indicate PayloadQuery types.  Refactor Similarity.scorePayload to also take in the doc id.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-1790) Add Boosting Function Term Query and Some Payload Query refactorings

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12744055#action_12744055 ] 

Grant Ingersoll commented on LUCENE-1790:
-----------------------------------------

Looks good, Mark.  +1 for you to commit.  Good catch.

> Add Boosting Function Term Query and Some Payload Query refactorings
> --------------------------------------------------------------------
>
>                 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-position.patch, LUCENE-1790.patch, LUCENE-1790.patch, LUCENE-1790.patch, LUCENE-1790.patch
>
>
> Similar to the BoostingTermQuery, the BoostingFunctionTermQuery is a SpanTermQuery, but the difference is the payload score for a doc is not the average of all the payloads, but applies a function to them instead.  BoostingTermQuery becomes a BoostingFunctionTermQuery with an AveragePayloadFunction applied to it.
> Also add marker interface to indicate PayloadQuery types.  Refactor Similarity.scorePayload to also take in the doc id.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-1790) Add Boosting Function Term Query and Some Payload Query refactorings

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Ingersoll updated LUCENE-1790:
------------------------------------

      Description: 
Similar to the BoostingTermQuery, the BoostingFunctionTermQuery is a SpanTermQuery, but the difference is the payload score for a doc is not the average of all the payloads, but applies a function to them instead.  BoostingTermQuery becomes a BoostingFunctionTermQuery with an AveragePayloadFunction applied to it.

Also add marker interface to indicate PayloadQuery types.  Refactor Similarity.scorePayload to also take in the doc id.

  was:Similar to the BoostingTermQuery, the BoostingFunctionTermQuery is a SpanTermQuery, but the difference is the payload score for a doc is not the average of all the payloads, but applies a function to them instead.  BoostingTermQuery becomes a BoostingFunctionTermQuery with an AveragePayloadFunction applied to it.

    Lucene Fields: [Patch Available]  (was: [Patch Available, New])
          Summary: Add Boosting Function Term Query and Some Payload Query refactorings  (was: Boosting Function Term Query)

> Add Boosting Function Term Query and Some Payload Query refactorings
> --------------------------------------------------------------------
>
>                 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, LUCENE-1790.patch, LUCENE-1790.patch
>
>
> Similar to the BoostingTermQuery, the BoostingFunctionTermQuery is a SpanTermQuery, but the difference is the payload score for a doc is not the average of all the payloads, but applies a function to them instead.  BoostingTermQuery becomes a BoostingFunctionTermQuery with an AveragePayloadFunction applied to it.
> Also add marker interface to indicate PayloadQuery types.  Refactor Similarity.scorePayload to also take in the doc id.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Reopened: (LUCENE-1790) Add Boosting Function Term Query and Some Payload Query refactorings

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller reopened LUCENE-1790:
---------------------------------


reopen to fix hashCode/equals

> Add Boosting Function Term Query and Some Payload Query refactorings
> --------------------------------------------------------------------
>
>                 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-position.patch, LUCENE-1790.patch, LUCENE-1790.patch, LUCENE-1790.patch, LUCENE-1790.patch
>
>
> Similar to the BoostingTermQuery, the BoostingFunctionTermQuery is a SpanTermQuery, but the difference is the payload score for a doc is not the average of all the payloads, but applies a function to them instead.  BoostingTermQuery becomes a BoostingFunctionTermQuery with an AveragePayloadFunction applied to it.
> Also add marker interface to indicate PayloadQuery types.  Refactor Similarity.scorePayload to also take in the doc id.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-1790) Add Boosting Function Term Query and Some Payload Query refactorings

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Ingersoll updated LUCENE-1790:
------------------------------------

    Attachment: LUCENE-1790-position.patch

Pass in position information as well for scoring

> Add Boosting Function Term Query and Some Payload Query refactorings
> --------------------------------------------------------------------
>
>                 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-position.patch, LUCENE-1790.patch, LUCENE-1790.patch, LUCENE-1790.patch
>
>
> Similar to the BoostingTermQuery, the BoostingFunctionTermQuery is a SpanTermQuery, but the difference is the payload score for a doc is not the average of all the payloads, but applies a function to them instead.  BoostingTermQuery becomes a BoostingFunctionTermQuery with an AveragePayloadFunction applied to it.
> Also add marker interface to indicate PayloadQuery types.  Refactor Similarity.scorePayload to also take in the doc id.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-1790) Add Boosting Function Term Query and Some Payload Query refactorings

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12741791#action_12741791 ] 

Michael McCandless commented on LUCENE-1790:
--------------------------------------------

Is this done?

> Add Boosting Function Term Query and Some Payload Query refactorings
> --------------------------------------------------------------------
>
>                 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, LUCENE-1790.patch, LUCENE-1790.patch
>
>
> Similar to the BoostingTermQuery, the BoostingFunctionTermQuery is a SpanTermQuery, but the difference is the payload score for a doc is not the average of all the payloads, but applies a function to them instead.  BoostingTermQuery becomes a BoostingFunctionTermQuery with an AveragePayloadFunction applied to it.
> Also add marker interface to indicate PayloadQuery types.  Refactor Similarity.scorePayload to also take in the doc id.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Issue Comment Edited: (LUCENE-1790) Add Boosting Function Term Query and Some Payload Query refactorings

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742957#action_12742957 ] 

Grant Ingersoll edited comment on LUCENE-1790 at 8/13/09 2:03 PM:
------------------------------------------------------------------

Going to reopen and see about passing along the position information into both the new scorePayload() method and into the PayloadFunction, as it may be useful to know this information when scoring payloads.

      was (Author: gsingers):
    Going to reopen and actually pass along the Term and the position information into both the new scorePayload() method and into the PayloadFunction, as it may be useful to know this information when scoring payloads.
  
> Add Boosting Function Term Query and Some Payload Query refactorings
> --------------------------------------------------------------------
>
>                 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, LUCENE-1790.patch, LUCENE-1790.patch
>
>
> Similar to the BoostingTermQuery, the BoostingFunctionTermQuery is a SpanTermQuery, but the difference is the payload score for a doc is not the average of all the payloads, but applies a function to them instead.  BoostingTermQuery becomes a BoostingFunctionTermQuery with an AveragePayloadFunction applied to it.
> Also add marker interface to indicate PayloadQuery types.  Refactor Similarity.scorePayload to also take in the doc id.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-1790) Add Boosting Function Term Query and Some Payload Query refactorings

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12741792#action_12741792 ] 

Michael McCandless commented on LUCENE-1790:
--------------------------------------------

Should we deprecate BoostingTermQuery, with this?

> Add Boosting Function Term Query and Some Payload Query refactorings
> --------------------------------------------------------------------
>
>                 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, LUCENE-1790.patch, LUCENE-1790.patch
>
>
> Similar to the BoostingTermQuery, the BoostingFunctionTermQuery is a SpanTermQuery, but the difference is the payload score for a doc is not the average of all the payloads, but applies a function to them instead.  BoostingTermQuery becomes a BoostingFunctionTermQuery with an AveragePayloadFunction applied to it.
> Also add marker interface to indicate PayloadQuery types.  Refactor Similarity.scorePayload to also take in the doc id.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-1790) Boosting Max Term Query

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740378#action_12740378 ] 

Mark Miller commented on LUCENE-1790:
-------------------------------------

What about a common class with chooseable aggregation method?

> 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
>
>
> 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-1790) Boosting Max Term Query

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
    [ 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Resolved: (LUCENE-1790) Add Boosting Function Term Query and Some Payload Query refactorings

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller resolved LUCENE-1790.
---------------------------------

    Resolution: Fixed

thanks for the review,

r804994

> Add Boosting Function Term Query and Some Payload Query refactorings
> --------------------------------------------------------------------
>
>                 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-position.patch, LUCENE-1790.patch, LUCENE-1790.patch, LUCENE-1790.patch, LUCENE-1790.patch
>
>
> Similar to the BoostingTermQuery, the BoostingFunctionTermQuery is a SpanTermQuery, but the difference is the payload score for a doc is not the average of all the payloads, but applies a function to them instead.  BoostingTermQuery becomes a BoostingFunctionTermQuery with an AveragePayloadFunction applied to it.
> Also add marker interface to indicate PayloadQuery types.  Refactor Similarity.scorePayload to also take in the doc id.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Resolved: (LUCENE-1790) Add Boosting Function Term Query and Some Payload Query refactorings

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Ingersoll resolved LUCENE-1790.
-------------------------------------

    Resolution: Fixed

Committed revision 804178.

Committed the position patch

> Add Boosting Function Term Query and Some Payload Query refactorings
> --------------------------------------------------------------------
>
>                 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-position.patch, LUCENE-1790.patch, LUCENE-1790.patch, LUCENE-1790.patch
>
>
> Similar to the BoostingTermQuery, the BoostingFunctionTermQuery is a SpanTermQuery, but the difference is the payload score for a doc is not the average of all the payloads, but applies a function to them instead.  BoostingTermQuery becomes a BoostingFunctionTermQuery with an AveragePayloadFunction applied to it.
> Also add marker interface to indicate PayloadQuery types.  Refactor Similarity.scorePayload to also take in the doc id.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org