lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From busc...@apache.org
Subject svn commit: r596000 - /lucene/java/trunk/contrib/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java
Date Sat, 17 Nov 2007 20:19:17 GMT
Author: buschmi
Date: Sat Nov 17 12:19:17 2007
New Revision: 596000

URL: http://svn.apache.org/viewvc?rev=596000&view=rev
Log:
Disable verbose standard output in MemoryIndexTest by default.

Modified:
    lucene/java/trunk/contrib/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java

Modified: lucene/java/trunk/contrib/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java?rev=596000&r1=595999&r2=596000&view=diff
==============================================================================
--- lucene/java/trunk/contrib/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java
(original)
+++ lucene/java/trunk/contrib/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java
Sat Nov 17 12:19:17 2007
@@ -202,6 +202,8 @@
   private Analyzer analyzer;
   private boolean fastMode = false;
   
+  private final boolean verbose = false;
+  
   private static final String FIELD_NAME = "content";
 
   /** Runs the tests and/or benchmark */
@@ -295,7 +297,7 @@
           bytes += file.length();
           String text = toString(new FileInputStream(file), null);
           Document doc = createDocument(text);
-          System.out.println("\n*********** FILE=" + file);
+          if (verbose) System.out.println("\n*********** FILE=" + file);
           
           for (int q=0; q < queries.length; q++) {
             try {
@@ -314,7 +316,7 @@
                 if (useRAMIndex && measureIndexing) ramind = createRAMIndex(doc);
                 if (useRAMIndex) score2 = query(ramind, query);
                 if (useMemIndex && useRAMIndex) {
-                  System.out.println("diff="+ (score1-score2) + ", query=" + queries[q] +
", s1=" + score1 + ", s2=" + score2);
+                  if (verbose) System.out.println("diff="+ (score1-score2) + ", query=" +
queries[q] + ", s1=" + score1 + ", s2=" + score2);
                   if (score1 != score2 || score1 < 0.0f || score2 < 0.0f || score1
> 1.0f || score2 > 1.0f) {
                     throw new IllegalStateException("BUG DETECTED:" + (i*(q+1)) + " at query="
+ queries[q] + ", file=" + file + ", anal=" + analyzer);
                   }



Mime
View raw message