lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Goetz <>
Subject Re: [Bug 8307] - WildcardQuery broken for '?' characters in query
Date Thu, 16 May 2002 21:10:08 GMT
> I have looked into the QueryParser code and the problem appears to be the
> differentiation between a TERM and a WILDTERM. If a term contains a question
> mark it is not treated as a WILDTERM but as a TERM because the question mark
> is a letter that can be part of a TERM. 

This should be addressed in the unit test for the query parser.  Can
you provide me with examples of the queries that are parsed

> Another question concerning the QueryParser. I made another change
> to the QueryParser (QueryParser2.jj) that allows to search for terms
> starting with a wildcard. Is there any reason why Lucene does not
> support this by default?

This was deliberate.  It would be a performance disaster.  

To repeat -- the query parser is syntactic sugar -- it makes it easier
to formulate the most common queries.  But it is exposed to end-users,
who may not know anything about searching.  We chose to restrict this
particlar feature to hand-created Query objects by apps that know what
they're doing.  There is no mandate that says "every query that can be
created with the Query classes should be creatable with the query
parser."  Instead, the idea is to present a nice, simple way of making
queries that end users can understand.  

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

View raw message