lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r834011 - /lucene/java/trunk/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java
Date Mon, 09 Nov 2009 10:40:46 GMT
Author: mikemccand
Date: Mon Nov  9 10:40:46 2009
New Revision: 834011

URL: http://svn.apache.org/viewvc?rev=834011&view=rev
Log:
fix bug that causes false positive failure in the test

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

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java?rev=834011&r1=834010&r2=834011&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java Mon
Nov  9 10:40:46 2009
@@ -84,7 +84,8 @@
     searcher = new IndexSearcher(directory, true);
 
     String qtxt = "one";
-    for (int i = 0; i < docText.length; i++) {
+    // start from 1, so that the 0th doc never matches
+    for (int i = 1; i < docText.length; i++) {
       qtxt += ' ' + docText[i]; // large query so that search will be longer
     }
     QueryParser queryParser = new QueryParser(Version.LUCENE_CURRENT, FIELD_NAME, new WhitespaceAnalyzer());



Mime
View raw message