lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <j...@apache.org>
Subject [jira] Updated: (LUCENE-2864) add maxtf to fieldinvertstate
Date Thu, 13 Jan 2011 08:13:47 GMT

     [ 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


Mime
View raw message