[
https://issues.apache.org/jira/browse/LUCENE-7429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15451727#comment-15451727
]
Adrien Grand commented on LUCENE-7429:
--------------------------------------
This part was necessary because AnalyzerWrapper has {{Analyzer
getWrappedAnalyzer(String fieldName)}}. So in order to know which attribute
factory to use, I had to add a fieldName parameter, so that
AnalyzerWrapper.attributeFactory can be implemented as:
{code}
@Override
protected final AttributeFactory attributeFactory(String fieldName) {
return getWrappedAnalyzer(fieldName).attributeFactory(fieldName);
}
{code}
Otherwise we could not figure out which analyzer to delegate to?
> DelegatingAnalyzerWrapper should delegate normalization too
> -----------------------------------------------------------
>
> Key: LUCENE-7429
> URL: https://issues.apache.org/jira/browse/LUCENE-7429
> Project: Lucene - Core
> Issue Type: Bug
> Affects Versions: 6.2
> Reporter: Adrien Grand
> Priority: Minor
> Attachments: LUCENE-7355.patch, LUCENE-7429.patch
>
>
> This is something that I overlooked in LUCENE-7355:
> (Delegating)AnalyzerWrapper uses the default implementation of
> initReaderForNormalization and normalize, meaning that by default the
> normalization is a no-op. It should delegate to the wrapped analyzer.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]