[
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: [email protected]
For additional commands, e-mail: [email protected]