adjust testcase due to bugfix in WildcardQuery

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@329860 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bernhard Messer 2005-10-31 17:06:29 +00:00
parent 34e42624f6
commit 3ece4bf4f6
1 changed files with 7 additions and 4 deletions

View File

@ -29,6 +29,7 @@ import java.io.IOException;
/**
* TestWildcard tests the '*' and '?' wildcard characters.
*
* @version $Id$
* @author Otis Gospodnetic
*/
public class TestWildcard
@ -105,12 +106,14 @@ public class TestWildcard
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"));
Query query6 = new WildcardQuery(new Term("body", "meta??"));
assertMatches(searcher, query1, 1);
assertMatches(searcher, query2, 2);
assertMatches(searcher, query3, 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)