lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r833762 - /lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java
Date Sat, 07 Nov 2009 21:10:38 GMT
Author: mikemccand
Date: Sat Nov  7 21:10:38 2009
New Revision: 833762

URL: http://svn.apache.org/viewvc?rev=833762&view=rev
Log:
LUCENE-2042: also print how many terms were searched, when the query is a MTQ

Modified:
    lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java?rev=833762&r1=833761&r2=833762&view=diff
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java
(original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java
Sat Nov  7 21:10:38 2009
@@ -32,6 +32,7 @@
 import org.apache.lucene.document.Fieldable;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.search.TopDocs;
+import org.apache.lucene.search.MultiTermQuery;
 import org.apache.lucene.search.TopFieldCollector;
 import org.apache.lucene.search.ScoreDoc;
 import org.apache.lucene.search.IndexSearcher;
@@ -114,6 +115,9 @@
         final String printHitsField = getRunData().getConfig().get("print.hits.field", null);
         if (printHitsField != null && printHitsField.length() > 0) {
           final IndexReader r = searcher.getIndexReader();
+          if (q instanceof MultiTermQuery) {
+            System.out.println("MultiTermQuery term count = " + ((MultiTermQuery) q).getTotalNumberOfTerms());
+          }
           System.out.println("totalHits = " + hits.totalHits);
           System.out.println("maxDoc()  = " + r.maxDoc());
           System.out.println("numDocs() = " + r.numDocs());



Mime
View raw message