You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Otis Gospodnetic <ot...@yahoo.com> on 2003/04/16 08:15:23 UTC

Re: Wildcard Queries

No, I don't think this is intentional.  Sounds like a bug.  We should
probably add a unit test for WildcardTermEnum that shows this bug and
then fix it to get the test to pass.

Otis

--- Morus Walter <mo...@tanto-xipolis.de> wrote:
> Hi,
> 
> is it intentional that '?' matches exactly one character within
> wildcard terms but one or zero characters at the end of wildcard
> terms?
> 
> That is:
> r?? matches r ra rab ...
> whereas
> r?b matches rab rbb ... and not rb
> 
> The AFAIK common definition of '*' and '?' (e.g. in unix glob
> pattern) is
> to match exactly one character for '?' independent of it's position.
> 
> I think lucenes behavior comes from WildcarTermEnum.java line 157
> where WILDCARD_CHAR and WILDCARD_STRING are ignored at the end of the
> pattern, if the strings matched so far.
> 
> greetings
> 	Morus
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 


__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org