lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r922528 - in /lucene/java/trunk/src/test/org/apache/lucene/search: TestNumericRangeQuery32.java TestNumericRangeQuery64.java
Date Sat, 13 Mar 2010 11:10:28 GMT
Author: uschindler
Date: Sat Mar 13 11:10:28 2010
New Revision: 922528

URL: http://svn.apache.org/viewvc?rev=922528&view=rev
Log:
As a first use of previous commit remove verbosity from NRT tests. To show the term statistics
use -Dtests.verbose=true.

Modified:
    lucene/java/trunk/src/test/org/apache/lucene/search/TestNumericRangeQuery32.java
    lucene/java/trunk/src/test/org/apache/lucene/search/TestNumericRangeQuery64.java

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestNumericRangeQuery32.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestNumericRangeQuery32.java?rev=922528&r1=922527&r2=922528&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestNumericRangeQuery32.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestNumericRangeQuery32.java Sat Mar
13 11:10:28 2010
@@ -138,7 +138,7 @@ public class TestNumericRangeQuery32 ext
         default:
           return;
       }
-      System.out.println("Found "+terms+" distinct terms in range for field '"+field+"'"+type+".");
+      if (VERBOSE) System.out.println("Found "+terms+" distinct terms in range for field
'"+field+"'"+type+".");
       ScoreDoc[] sd = topDocs.scoreDocs;
       assertNotNull(sd);
       assertEquals("Score doc count"+type, count, sd.length );
@@ -196,7 +196,7 @@ public class TestNumericRangeQuery32 ext
     int upper=(count-1)*distance + (distance/3) + startOffset;
     NumericRangeQuery<Integer> q=NumericRangeQuery.newIntRange(field, precisionStep,
null, upper, true, true);
     TopDocs topDocs = searcher.search(q, null, noDocs, Sort.INDEXORDER);
-    System.out.println("Found "+q.getTotalNumberOfTerms()+" distinct terms in left open range
for field '"+field+"'.");
+    if (VERBOSE) System.out.println("Found "+q.getTotalNumberOfTerms()+" distinct terms in
left open range for field '"+field+"'.");
     ScoreDoc[] sd = topDocs.scoreDocs;
     assertNotNull(sd);
     assertEquals("Score doc count", count, sd.length );
@@ -237,7 +237,7 @@ public class TestNumericRangeQuery32 ext
     int lower=(count-1)*distance + (distance/3) +startOffset;
     NumericRangeQuery<Integer> q=NumericRangeQuery.newIntRange(field, precisionStep,
lower, null, true, true);
     TopDocs topDocs = searcher.search(q, null, noDocs, Sort.INDEXORDER);
-    System.out.println("Found "+q.getTotalNumberOfTerms()+" distinct terms in right open
range for field '"+field+"'.");
+    if (VERBOSE) System.out.println("Found "+q.getTotalNumberOfTerms()+" distinct terms in
right open range for field '"+field+"'.");
     ScoreDoc[] sd = topDocs.scoreDocs;
     assertNotNull(sd);
     assertEquals("Score doc count", noDocs-count, sd.length );
@@ -368,7 +368,7 @@ public class TestNumericRangeQuery32 ext
     }
     if (precisionStep == Integer.MAX_VALUE) {
       assertEquals("Total number of terms should be equal for unlimited precStep", termCountT,
termCountC);
-    } else {
+    } else if (VERBOSE) {
       System.out.println("Average number of terms during random search on '" + field + "':");
       System.out.println(" Trie query: " + (((double)termCountT)/(10*4)));
       System.out.println(" Classical query: " + (((double)termCountC)/(10*4)));
@@ -564,7 +564,7 @@ public class TestNumericRangeQuery32 ext
         } else break;
       } while (termEnum.next());
       assertFalse(termEnum.next());
-      System.out.println("TermEnum on 'field4' for range [" + lower + "," + upper + "] contained
" + count + " terms.");
+      if (VERBOSE) System.out.println("TermEnum on 'field4' for range [" + lower + "," +
upper + "] contained " + count + " terms.");
     } finally {
       termEnum.close();
     }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestNumericRangeQuery64.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestNumericRangeQuery64.java?rev=922528&r1=922527&r2=922528&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestNumericRangeQuery64.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestNumericRangeQuery64.java Sat Mar
13 11:10:28 2010
@@ -141,7 +141,7 @@ public class TestNumericRangeQuery64 ext
         default:
           return;
       }
-      System.out.println("Found "+terms+" distinct terms in range for field '"+field+"'"+type+".");
+      if (VERBOSE) System.out.println("Found "+terms+" distinct terms in range for field
'"+field+"'"+type+".");
       ScoreDoc[] sd = topDocs.scoreDocs;
       assertNotNull(sd);
       assertEquals("Score doc count"+type, count, sd.length );
@@ -204,7 +204,7 @@ public class TestNumericRangeQuery64 ext
     long upper=(count-1)*distance + (distance/3) + startOffset;
     NumericRangeQuery<Long> q=NumericRangeQuery.newLongRange(field, precisionStep,
null, upper, true, true);
     TopDocs topDocs = searcher.search(q, null, noDocs, Sort.INDEXORDER);
-    System.out.println("Found "+q.getTotalNumberOfTerms()+" distinct terms in left open range
for field '"+field+"'.");
+    if (VERBOSE) System.out.println("Found "+q.getTotalNumberOfTerms()+" distinct terms in
left open range for field '"+field+"'.");
     ScoreDoc[] sd = topDocs.scoreDocs;
     assertNotNull(sd);
     assertEquals("Score doc count", count, sd.length );
@@ -250,7 +250,7 @@ public class TestNumericRangeQuery64 ext
     long lower=(count-1)*distance + (distance/3) +startOffset;
     NumericRangeQuery<Long> q=NumericRangeQuery.newLongRange(field, precisionStep,
lower, null, true, true);
     TopDocs topDocs = searcher.search(q, null, noDocs, Sort.INDEXORDER);
-    System.out.println("Found "+q.getTotalNumberOfTerms()+" distinct terms in right open
range for field '"+field+"'.");
+    if (VERBOSE) System.out.println("Found "+q.getTotalNumberOfTerms()+" distinct terms in
right open range for field '"+field+"'.");
     ScoreDoc[] sd = topDocs.scoreDocs;
     assertNotNull(sd);
     assertEquals("Score doc count", noDocs-count, sd.length );
@@ -386,7 +386,7 @@ public class TestNumericRangeQuery64 ext
     }
     if (precisionStep == Integer.MAX_VALUE) {
       assertEquals("Total number of terms should be equal for unlimited precStep", termCountT,
termCountC);
-    } else {
+    } else if (VERBOSE) {
       System.out.println("Average number of terms during random search on '" + field + "':");
       System.out.println(" Trie query: " + (((double)termCountT)/(10*4)));
       System.out.println(" Classical query: " + (((double)termCountC)/(10*4)));



Mime
View raw message