mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gsing...@apache.org
Subject svn commit: r787993 - /lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/Driver.java
Date Wed, 24 Jun 2009 12:25:12 GMT
Author: gsingers
Date: Wed Jun 24 12:25:11 2009
New Revision: 787993

URL: http://svn.apache.org/viewvc?rev=787993&view=rev
Log:
was ignoring maxDocs

Modified:
    lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/Driver.java

Modified: lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/Driver.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/Driver.java?rev=787993&r1=787992&r2=787993&view=diff
==============================================================================
--- lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/Driver.java (original)
+++ lucene/mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/Driver.java Wed
Jun 24 12:25:11 2009
@@ -126,9 +126,9 @@
       if (cmdLine.hasOption(inputOpt)) {//Lucene case
         File file = new File(cmdLine.getValue(inputOpt).toString());
         if (file.exists() && file.isDirectory()) {
-          int maxDocs = Integer.MAX_VALUE;
+          long maxDocs = Long.MAX_VALUE;
           if (cmdLine.hasOption(maxOpt)) {
-            maxDocs = Integer.parseInt(cmdLine.getValue(maxOpt).toString());
+            maxDocs = Long.parseLong(cmdLine.getValue(maxOpt).toString());
           }
           if (maxDocs < 0) {
             throw new IllegalArgumentException("maxDocs must be >= 0");
@@ -187,7 +187,7 @@
             vectorWriter = getSeqFileWriter(outFile);
           }
 
-          vectorWriter.write(iteratable);
+          vectorWriter.write(iteratable, maxDocs);
           vectorWriter.close();
 
           String delimiter = cmdLine.hasOption(delimiterOpt) ? cmdLine.getValue(delimiterOpt).toString()
: "\t";



Mime
View raw message