mirror of https://github.com/apache/lucene.git
SOLR-2909: add support for ResourceLoaderAware tokenizerFactories in synonym filter factories
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1291541 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
314bce4f6e
commit
3ab34fc0d0
|
@ -608,6 +608,9 @@ Bug Fixes
|
|||
* SOLR-3052: Fixed typo in distributed grouping parameters.
|
||||
(Martijn van Groningen, Grant Ingersoll)
|
||||
|
||||
* SOLR-2909: Add support for ResourceLoaderAware tokenizerFactories in synonym
|
||||
filter factories. (Tom Klonikowski, Jun Ohtani via Koji Sekiguchi)
|
||||
|
||||
Other Changes
|
||||
----------------------
|
||||
* SOLR-2922: Upgrade commons-io and commons-lang to 2.1 and 2.6, respectively. (koji)
|
||||
|
|
|
@ -157,6 +157,9 @@ final class FSTSynonymFilterFactory extends BaseTokenFilterFactory implements Re
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -171,6 +171,9 @@ final class SlowSynonymFilterFactory extends BaseTokenFilterFactory implements R
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue