[
https://issues.apache.org/jira/browse/LUCENE-6023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14184148#comment-14184148
]
Robert Muir commented on LUCENE-6023:
-------------------------------------
By the way: you can already override just the normalization by overriding these
in TFIDFSimilarity:
* long encodeNormValue(float f)
* float decodeNormValue(long l)
So you can just extend TFIDFSimilarity for an easier time. I think its ok also
if 'final' is removed from these from DefaultSimilarity as well, but if you
override these two methods, you've implemented half that class already.
But i don't care, since the 8bit "assumption" is already gone from the API
here. But we should keep in mind this assumption can allow for optimizations
(e.g. BM25's tableization)...
However, we shouldnt remove final from methods like low-level weight/scorer. If
you really need to change those, you should be using Similarity directly for
that flexibility.
> Remove "final" modifier from four methods of TFIDFSimilarity class to make
> them overridable.
> --------------------------------------------------------------------------------------------
>
> Key: LUCENE-6023
> URL: https://issues.apache.org/jira/browse/LUCENE-6023
> Project: Lucene - Core
> Issue Type: Bug
> Components: core/query/scoring
> Affects Versions: 4.2.1
> Reporter: Hafiz M Hamid
> Labels: similarity
> Fix For: 4.2.1
>
>
> The TFIDFSimilarity has the following four of its public methods marked
> "final" which is keeping us from overriding these methods. Apparently there
> doesn't seem to be an obvious reason for keeping these methods
> non-overridable.
> Here are the four methods:
> computeNorm()
> computeWeight()
> exactSimScorer()
> sloppySimScorer()
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]