lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dna...@apache.org
Subject svn commit: r178009 - /lucene/java/trunk/src/test/org/apache/lucene/search/TestWildcard.java
Date Mon, 23 May 2005 20:16:55 GMT
Author: dnaber
Date: Mon May 23 13:16:54 2005
New Revision: 178009

URL: http://svn.apache.org/viewcvs?rev=178009&view=rev
Log:
test to show that "*" can be used as the first character, too

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=178009&r1=178008&r2=178009&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 May 23 13:16:54
2005
@@ -27,7 +27,7 @@
 import java.io.IOException;
 
 /**
- * TestWildcard tests the '*' and '?' wildard characters.
+ * TestWildcard tests the '*' and '?' wildcard characters.
  *
  * @author Otis Gospodnetic
  */
@@ -74,7 +74,7 @@
     query7.add(query3, BooleanClause.Occur.SHOULD);
     query7.add(query5, BooleanClause.Occur.SHOULD);
 
-// Queries do not automatically lower-case search terms:
+    // Queries do not automatically lower-case search terms:
     Query query8 = new WildcardQuery(new Term("body", "M*tal*"));
 
     assertMatches(searcher, query1, 1);
@@ -85,6 +85,9 @@
     assertMatches(searcher, query6, 1);
     assertMatches(searcher, query7, 2);
     assertMatches(searcher, query8, 0);
+    assertMatches(searcher, new WildcardQuery(new Term("body", "*tall")), 0);
+    assertMatches(searcher, new WildcardQuery(new Term("body", "*tal")), 1);
+    assertMatches(searcher, new WildcardQuery(new Term("body", "*tal*")), 2);
   }
 
   /**



Mime
View raw message