Hi, Lucene Dev Community:

In our legacy Lucene7 based code, we have logic like:
return new TokenStreamComponents(Tokenizer source, TokenStream result) {
    @Override
    protected void setReader(Final Reader reader) {
        // _config.getCharFilterFactory() , this will return an instance of
org.apache.lucene.analysis.util.CharFilterFactory
        super.setReader(_config.getCharFilterFactory().create(reader));
    }
};

However, in Lucene9.7, Analyzer.TokenStreamComponents.setReader(Reader)
becomes private (actually I don't see this method being called
anywhere in TokenStreamComponents,
not sure why it is still there).
Moreover, Tokenizer.setReader(Reader) is final, and cannot be overridden.

So, could anyone help me to understand what is the best approach to migrate
that piece of legacy code to L9.
An example will also be very helpful.

Thanks

Reply via email to