[
https://issues.apache.org/jira/browse/SOLR-6022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13982033#comment-13982033
]
Uwe Schindler edited comment on SOLR-6022 at 4/26/14 4:10 PM:
--------------------------------------------------------------
The sophisticated backwards policeman says:
To provide backwards compatibility for those that *implement* getAnalyzer, the
delegation must be the other way round:
- In trunk, all like it is in the patch.
- In 4.x, getAnalyzer() stays as it is - no code changes, but gets deprecated.
getIndexAnalyzer is new method, but delegates in 4.x to the deprecated
getAnalyzer() with a @SuppressWranings("deprecation") on the call. By this we
have two good things: both methods behave identical behavior, so people can
call both. But people who implement only the old one will still get called by
Solr's code, so they don't loose functionality. This is the general pattern to
replace methods (also used by the JDK).
Uwe
was (Author: thetaphi):
The sophisticated backwards policeman says:
To provide backwards compatibility for those that *implement* getAnalyzer, the
delegation must be the other way round:
- In trunk, all like it is at the moment
- In 4.x, getAnalyzer() stays as it is - no code changes, but gets deprecated.
getIndexAnalyzer is new method, but delegates in 4.x to the deprecated
getAnalyzer() with a @SuppressWranings("deprecation") on the call. By this we
have two good things: both methods behave identical behavior, so people can
call both. But people who implement only the old one will still get called by
Solr's code, so they don't loose functionality. This is the general pattern to
replace methods (also used by the JDK).
Uwe
> Rename getAnalyzer to getIndexAnalyzer
> --------------------------------------
>
> Key: SOLR-6022
> URL: https://issues.apache.org/jira/browse/SOLR-6022
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan Ernst
> Attachments: SOLR-6022.patch
>
>
> We have separate index/query analyzer chains, but the access methods for the
> analyzers do not match up with the names. This can lead to unknowingly using
> the wrong analyzer chain (as it did in SOLR-6017). We should do this
> renaming in trunk, and deprecate the old getAnalyzer function in 4x.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]