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:
Steven Rowe 2013-03-17 07:32:30 +00:00
parent 9fffda8c34
commit efaef82383
2 changed files with 4 additions and 1 deletions

View File

@ -48,4 +48,4 @@ docs.dir=reuters-out
NewRound
} : 5
RepSumByName
RepSumByNameRound

View File

@ -376,6 +376,9 @@ public class AnalyzerFactoryTask extends PerfTask {
instance.init(argMap);
if (instance instanceof ResourceLoaderAware) {
File baseDir = new File(getRunData().getConfig().get("work.dir", "work")).getAbsoluteFile();
if ( ! baseDir.isDirectory()) {
baseDir = new File(".").getAbsoluteFile();
}
((ResourceLoaderAware)instance).inform(new FilesystemResourceLoader(baseDir));
}
if (CharFilterFactory.class.isAssignableFrom(clazz)) {