[ https://issues.apache.org/jira/browse/LUCENE-8582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Namgyu Kim updated LUCENE-8582: ------------------------------- Description: Currently the parent class of DutchAnalyzer is *Analyzer*. And I saw the comment {code:java} // TODO: extend StopwordAnalyzerBase {code} in DutchAnalyzer. So I changed the code as follows. {code:java} public final class DutchAnalyzer extends StopwordAnalyzerBase { ... // This instance is no longer necessary. // private final CharArraySet stoptable; public DutchAnalyzer(CharArraySet stopwords, CharArraySet stemExclusionTable, CharArrayMap<String> stemOverrideDict) { super(stopwords); // Use StopwordAnalyzerBase's constructor to set stopwords. ... } ... @Override protected TokenStreamComponents createComponents(String fieldName) { ... result = new StopFilter(result, stopwords); // Use StopwordAnalyzerBase's instance ... } ... } {code} was: Currently the parent class of DutchAnalyzer is *Analyzer*. And I saw the comment {code:java} // TODO: extend StopwordAnalyzerBase {code} in DutchAnalyzer. So I changed the code as follows. {code:java} public final class DutchAnalyzer extends StopwordAnalyzerBase { ... // This instance is no longer necessary. // private final CharArraySet stoptable; public DutchAnalyzer(CharArraySet stopwords, CharArraySet stemExclusionTable, Ch1arArrayMap<String> stemOverrideDict) { super(stopwords); // Use StopwordAnalyzerBase's constructor to set stopwords. ... } ... @Override protected TokenStreamComponents createComponents(String fieldName) { ... result = new StopFilter(result, stopwords); // Use StopwordAnalyzerBase's instance ... } ... } {code} > Set parent class of DutchAnalyzer to StopwordAnalyzerBase > --------------------------------------------------------- > > Key: LUCENE-8582 > URL: https://issues.apache.org/jira/browse/LUCENE-8582 > Project: Lucene - Core > Issue Type: Task > Components: modules/analysis > Reporter: Namgyu Kim > Priority: Major > Attachments: LUCENE-8582.patch > > > Currently the parent class of DutchAnalyzer is *Analyzer*. > And I saw the comment > {code:java} > // TODO: extend StopwordAnalyzerBase > {code} > in DutchAnalyzer. > > So I changed the code as follows. > {code:java} > public final class DutchAnalyzer extends StopwordAnalyzerBase { > ... > > // This instance is no longer necessary. > // private final CharArraySet stoptable; > > public DutchAnalyzer(CharArraySet stopwords, CharArraySet > stemExclusionTable, CharArrayMap<String> stemOverrideDict) { > super(stopwords); // Use StopwordAnalyzerBase's constructor to set > stopwords. > ... > } > ... > @Override > protected TokenStreamComponents createComponents(String fieldName) { > ... > result = new StopFilter(result, stopwords); // Use StopwordAnalyzerBase's > instance > ... > } > ... > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org