Erik Hatcher wrote:
Xiaozheng,
I tried your patch locally by adding a test case to testQuestionmark of TestWildcardQuery:
Query query6 = new WildcardQuery(new Term("body", "metal??")); assertMatches(searcher, query6, 0);
I was not able to get it to work properly, as this test case failed after adding your patch. Could you enhance this test case to include the bug you're fixing so that we can show that your implementation works properly? I'd commit it if I can get this test case to pass :)
I just wanted to note that this patch redefines the usual meaning of '?' wildcard, which means "exactly one or zero characters" - and that is the way it's working now. I'm not sure if this change is good, it is certainly surprising...
What the original poster wanted is commonly known as '.' wildcard, which means "exactly one character".
-- Best regards, Andrzej Bialecki
------------------------------------------------- Software Architect, System Integration Specialist CEN/ISSS EC Workshop, ECIMF project chair EU FP6 E-Commerce Expert/Evaluator ------------------------------------------------- FreeBSD developer (http://www.freebsd.org)
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]