[
https://issues.apache.org/jira/browse/LUCENE-6023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14185854#comment-14185854
]
Hafiz M Hamid commented on LUCENE-6023:
---------------------------------------
Thanks a lot for your valuable insights [~rcmuir]. Since the byte-constraint
seems to have been removed from encode/decodeNormValue signatures since 4.4,
removing "final" from these methods in DefaultSimilarity (as you suggested) and
overriding them in a subclass would do the job for us. I'll change the bug
title to reflect that and will send a patch.
Just so you're interested in knowing, our goal is to do the length-norm
computation at search-time. For that, we want to store the raw field-length
(i.e. numTerms) as fieldNorm so we could use it at search-time to compute
length-norm. It'll enable us vary the length-norm function and A/B test them
without having to re-index all the data which is out of question given our
scale and limitations.
> 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]