You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2011/01/13 09:13:46 UTC

[jira] Created: (LUCENE-2864) add maxtf to fieldinvertstate

add maxtf to fieldinvertstate
-----------------------------

                 Key: LUCENE-2864
                 URL: https://issues.apache.org/jira/browse/LUCENE-2864
             Project: Lucene - Java
          Issue Type: New Feature
          Components: Query/Scoring
            Reporter: Robert Muir
             Fix For: 3.1, 4.0
         Attachments: LUCENE-2864.patch

the maximum within-document TF is a very useful scoring value, 
we should expose it so that people can use it in scoring

consider the following sim:
{code}
@Override
public float idf(int docFreq, int numDocs) {
  return 1.0F; /* not used */
}

@Override
public float computeNorm(String field, FieldInvertState state) {
  return state.getBoost() / (float) Math.sqrt(state.getMaxTF());
}
{code}

which is surprisingly effective, but more interesting for practical reasons.



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


[jira] Updated: (LUCENE-2864) add maxtf to fieldinvertstate

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

Robert Muir updated LUCENE-2864:
--------------------------------

    Attachment: LUCENE-2864.patch

> add maxtf to fieldinvertstate
> -----------------------------
>
>                 Key: LUCENE-2864
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2864
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: Query/Scoring
>            Reporter: Robert Muir
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2864.patch
>
>
> the maximum within-document TF is a very useful scoring value, 
> we should expose it so that people can use it in scoring
> consider the following sim:
> {code}
> @Override
> public float idf(int docFreq, int numDocs) {
>   return 1.0F; /* not used */
> }
> @Override
> public float computeNorm(String field, FieldInvertState state) {
>   return state.getBoost() / (float) Math.sqrt(state.getMaxTF());
> }
> {code}
> which is surprisingly effective, but more interesting for practical reasons.

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


[jira] Resolved: (LUCENE-2864) add maxtf to fieldinvertstate

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

Robert Muir resolved LUCENE-2864.
---------------------------------

    Resolution: Fixed
      Assignee: Robert Muir

Committed revision 1058939, 1058944 (3x)

> add maxtf to fieldinvertstate
> -----------------------------
>
>                 Key: LUCENE-2864
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2864
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: Query/Scoring
>            Reporter: Robert Muir
>            Assignee: Robert Muir
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2864.patch
>
>
> the maximum within-document TF is a very useful scoring value, 
> we should expose it so that people can use it in scoring
> consider the following sim:
> {code}
> @Override
> public float idf(int docFreq, int numDocs) {
>   return 1.0F; /* not used */
> }
> @Override
> public float computeNorm(String field, FieldInvertState state) {
>   return state.getBoost() / (float) Math.sqrt(state.getMaxTF());
> }
> {code}
> which is surprisingly effective, but more interesting for practical reasons.

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


[jira] Commented: (LUCENE-2864) add maxtf to fieldinvertstate

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

Michael McCandless commented on LUCENE-2864:
--------------------------------------------

+1

> add maxtf to fieldinvertstate
> -----------------------------
>
>                 Key: LUCENE-2864
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2864
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: Query/Scoring
>            Reporter: Robert Muir
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2864.patch
>
>
> the maximum within-document TF is a very useful scoring value, 
> we should expose it so that people can use it in scoring
> consider the following sim:
> {code}
> @Override
> public float idf(int docFreq, int numDocs) {
>   return 1.0F; /* not used */
> }
> @Override
> public float computeNorm(String field, FieldInvertState state) {
>   return state.getBoost() / (float) Math.sqrt(state.getMaxTF());
> }
> {code}
> which is surprisingly effective, but more interesting for practical reasons.

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