mirror of https://github.com/apache/lucene.git
LUCENE-1086: DocMakers setup for the "docs.dir" property fails when passing an absolute path.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@603856 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
73f9e7ebc0
commit
b7e167ac8d
|
@ -4,6 +4,10 @@ The Benchmark contrib package contains code for benchmarking Lucene in a variety
|
|||
|
||||
$Id:$
|
||||
|
||||
12/13/07
|
||||
LUCENE-1086: DocMakers setup for the "docs.dir" property
|
||||
fixed to properly handle absolute paths. (Shai Erera via Doron Cohen)
|
||||
|
||||
9/18/07
|
||||
LUCENE-941: infinite loop for alg: {[AddDoc(4000)]: 4} : *
|
||||
ResetInputsTask fixed to work also after exhaustion.
|
||||
|
|
|
@ -141,7 +141,10 @@ public class DirDocMaker extends BasicDocMaker {
|
|||
public void setConfig(Config config) {
|
||||
super.setConfig(config);
|
||||
String d = config.get("docs.dir", "dir-out");
|
||||
dataDir = new File(new File("work"), d);
|
||||
dataDir = new File(d);
|
||||
if (!dataDir.isAbsolute()) {
|
||||
dataDir = new File(new File("work"), d);
|
||||
}
|
||||
|
||||
inputFiles = new Iterator(dataDir);
|
||||
|
||||
|
|
|
@ -52,7 +52,10 @@ public class ReutersDocMaker extends BasicDocMaker {
|
|||
super.setConfig(config);
|
||||
File workDir = new File(config.get("work.dir","work"));
|
||||
String d = config.get("docs.dir","reuters-out");
|
||||
dataDir = new File(workDir,d);
|
||||
dataDir = new File(d);
|
||||
if (!dataDir.isAbsolute()) {
|
||||
dataDir = new File(workDir, d);
|
||||
}
|
||||
|
||||
collectFiles(dataDir,inputFiles);
|
||||
if (inputFiles.size()==0) {
|
||||
|
|
|
@ -68,7 +68,10 @@ public class TrecDocMaker extends BasicDocMaker {
|
|||
super.setConfig(config);
|
||||
File workDir = new File(config.get("work.dir","work"));
|
||||
String d = config.get("docs.dir","trec");
|
||||
dataDir = new File(workDir,d);
|
||||
dataDir = new File(d);
|
||||
if (!dataDir.isAbsolute()) {
|
||||
dataDir = new File(workDir, d);
|
||||
}
|
||||
collectFiles(dataDir,inputFiles);
|
||||
if (inputFiles.size()==0) {
|
||||
throw new RuntimeException("No txt files in dataDir: "+dataDir.getAbsolutePath());
|
||||
|
|
Loading…
Reference in New Issue