mirror of https://github.com/apache/lucene.git
Fix AnalyzerFactoryTask to call ResourceLoaderAware.inform using the current directory if neither the 'work.dir' property value nor ./work/ are legit directories; also fix the english-porter-comparison.alg report task to be RepSumByNameRound instead of RepSumByName.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1457390 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9fffda8c34
commit
efaef82383
|
@ -48,4 +48,4 @@ docs.dir=reuters-out
|
||||||
|
|
||||||
NewRound
|
NewRound
|
||||||
} : 5
|
} : 5
|
||||||
RepSumByName
|
RepSumByNameRound
|
||||||
|
|
|
@ -376,6 +376,9 @@ public class AnalyzerFactoryTask extends PerfTask {
|
||||||
instance.init(argMap);
|
instance.init(argMap);
|
||||||
if (instance instanceof ResourceLoaderAware) {
|
if (instance instanceof ResourceLoaderAware) {
|
||||||
File baseDir = new File(getRunData().getConfig().get("work.dir", "work")).getAbsoluteFile();
|
File baseDir = new File(getRunData().getConfig().get("work.dir", "work")).getAbsoluteFile();
|
||||||
|
if ( ! baseDir.isDirectory()) {
|
||||||
|
baseDir = new File(".").getAbsoluteFile();
|
||||||
|
}
|
||||||
((ResourceLoaderAware)instance).inform(new FilesystemResourceLoader(baseDir));
|
((ResourceLoaderAware)instance).inform(new FilesystemResourceLoader(baseDir));
|
||||||
}
|
}
|
||||||
if (CharFilterFactory.class.isAssignableFrom(clazz)) {
|
if (CharFilterFactory.class.isAssignableFrom(clazz)) {
|
||||||
|
|
Loading…
Reference in New Issue