lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrzej Bialecki>
Subject Re: [PATCH]multiple wildcards ? at the end of search pattern return incorrect hits
Date Wed, 10 Nov 2004 20:56:18 GMT
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 (

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message