[ 
https://issues.apache.org/jira/browse/LUCENE-2854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael McCandless updated LUCENE-2854:
---------------------------------------

    Attachment: LUCENE-2854.patch

I think we should simply make a hard break on the Sim.lengthNorm ->
computeNorm cutover.  Subclassing sim is an expert thing, and, I'd
rather apps see a compilation error on upgrade so that they realize
their lengthNorm wasn't being called this whole time because of
LUCENE-2828 (and that they must now cutover to computeNorm).

So I made lengthNorm final (and throws UOE), computeNorm abstract.  I
deprecated SimilarityDelegator, and fixed BQ to not use it anymore.
The only other use is FuzzyLikeThisQuery, but fixing that is a little
too involved for today.


> Deprecate SimilarityDelegator and Similarity.lengthNorm
> -------------------------------------------------------
>
>                 Key: LUCENE-2854
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2854
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2854.patch
>
>
> SimilarityDelegator is a back compat trap (see LUCENE-2828).
> Apps should just [statically] subclass Sim or DefaultSim; if they really need 
> "runtime subclassing" then they can make their own app-level delegator.
> Also, Sim.computeNorm subsumes lengthNorm, so we should deprecate lengthNorm 
> in favor of computeNorm.

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

Reply via email to