lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dor...@apache.org
Subject svn commit: r603856 - in /lucene/java/trunk/contrib/benchmark: ./ src/java/org/apache/lucene/benchmark/byTask/feeds/
Date Thu, 13 Dec 2007 08:58:53 GMT
Author: doronc
Date: Thu Dec 13 00:58:52 2007
New Revision: 603856

URL: http://svn.apache.org/viewvc?rev=603856&view=rev
Log:
LUCENE-1086: DocMakers setup for the "docs.dir" property fails when passing an absolute path.

Modified:
    lucene/java/trunk/contrib/benchmark/CHANGES.txt
    lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DirDocMaker.java
    lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ReutersDocMaker.java
    lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecDocMaker.java

Modified: lucene/java/trunk/contrib/benchmark/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/CHANGES.txt?rev=603856&r1=603855&r2=603856&view=diff
==============================================================================
--- lucene/java/trunk/contrib/benchmark/CHANGES.txt (original)
+++ lucene/java/trunk/contrib/benchmark/CHANGES.txt Thu Dec 13 00:58:52 2007
@@ -4,6 +4,10 @@
 
 $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.

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DirDocMaker.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DirDocMaker.java?rev=603856&r1=603855&r2=603856&view=diff
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DirDocMaker.java
(original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DirDocMaker.java
Thu Dec 13 00:58:52 2007
@@ -141,7 +141,10 @@
   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);
 

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ReutersDocMaker.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ReutersDocMaker.java?rev=603856&r1=603855&r2=603856&view=diff
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ReutersDocMaker.java
(original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ReutersDocMaker.java
Thu Dec 13 00:58:52 2007
@@ -52,7 +52,10 @@
     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) {

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecDocMaker.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecDocMaker.java?rev=603856&r1=603855&r2=603856&view=diff
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecDocMaker.java
(original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecDocMaker.java
Thu Dec 13 00:58:52 2007
@@ -68,7 +68,10 @@
     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());



Mime
View raw message