I'm creating my own analyzer that is based on StopWordAnalyzerBase.
In order to make function AddDocument as it was in 3.0, I need to change ReuseStrategy according to Lucene Documentation. But I don't really understand how to do so, because my analyzer has no methods that allow strategy change.
To change the reuse strategy, you must pass it to the constructor of the Analyzer class.
StopwordAnalyzerBasedoesn't expose this constructor, so you must subclassAnalyzerdirectly and copy anything you need from theStopwordAnalyzerBaseinto your implementation.You can either use
Analyzer.GLOBAL_REUSE_STRATEGY,Analyzer.PER_FIELD_REUSE_STRATEGY, or subclassReuseStrategyto implement your own logic.