lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bmes...@apache.org
Subject svn commit: r329860 - /lucene/java/trunk/src/test/org/apache/lucene/search/TestWildcard.java
Date Mon, 31 Oct 2005 17:06:33 GMT
Author: bmesser
Date: Mon Oct 31 09:06:29 2005
New Revision: 329860

URL: http://svn.apache.org/viewcvs?rev=329860&view=rev
Log:
adjust testcase due to bugfix in WildcardQuery

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

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestWildcard.java
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/src/test/org/apache/lucene/search/TestWildcard.java?rev=329860&r1=329859&r2=329860&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestWildcard.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestWildcard.java Mon Oct 31 09:06:29
2005
@@ -29,6 +29,7 @@
 /**
  * TestWildcard tests the '*' and '?' wildcard characters.
  *
+ * @version $Id$
  * @author Otis Gospodnetic
  */
 public class TestWildcard
@@ -105,12 +106,14 @@
     Query query3 = new WildcardQuery(new Term("body", "metals?"));
     Query query4 = new WildcardQuery(new Term("body", "m?t?ls"));
     Query query5 = new WildcardQuery(new Term("body", "M?t?ls"));
-
-    assertMatches(searcher, query1, 1);
-    assertMatches(searcher, query2, 2);
-    assertMatches(searcher, query3, 1);
+    Query query6 = new WildcardQuery(new Term("body", "meta??"));
+    
+    assertMatches(searcher, query1, 1); 
+    assertMatches(searcher, query2, 1);
+    assertMatches(searcher, query3, 0);
     assertMatches(searcher, query4, 3);
     assertMatches(searcher, query5, 0);
+    assertMatches(searcher, query6, 1); // Query: 'meta??' matches 'metals' not 'metal'
   }
 
   private RAMDirectory getIndexStore(String field, String[] contents)



Mime
View raw message