Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.4, 4.0-ALPHA
-
None
Description
The optional custom tokenizerFactory in SlowSynonymFilterFactory and FSTSynonymFilterFactory might require the ResourceLoader information. Thus inform(ResourceLoader) should be called if the specified tokenizerFactory is an instance of ResourceLoaderAware.
private static TokenizerFactory loadTokenizerFactory(ResourceLoader loader, String cname, Map<String, String> args) { TokenizerFactory tokFactory = (TokenizerFactory) loader.newInstance(cname); tokFactory.init(args); if (tokFactory instanceof ResourceLoaderAware) { ((ResourceLoaderAware) tokFactory).inform(loader); } return tokFactory; }