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 Bertrand VENZAL <be...@cirso.fr> on 2005/01/21 10:58:05 UTC

How works *

Hi,

I wondered how lucene implement the * character, I know that is working 
but when I look at the Query Object, it doesn t seem to appear somewhere, 
does someone know how is it implemented ?

thanks 

Re: How works *

Posted by Miles Barr <mi...@runtime-collective.com>.
On Fri, 2005-01-21 at 10:58 +0100, Bertrand VENZAL wrote:
> I wondered how lucene implement the * character, I know that is working 
> but when I look at the Query Object, it doesn t seem to appear somewhere, 
> does someone know how is it implemented ?

Take a look at the PrefixQuery and WildcardQuery. 

PrefixQuery works by finding all terms beginning with the query then
constructing a boolean query of them. I assume WildcardQuery works in a
similar way.

If you have several terms or a short prefix (e.g. a*) you might need to
increase the maximum number of clauses allowed in a boolean query
because the number of terms might exceed the default (i.e. 1024).
 
-- 
Miles Barr <mi...@runtime-collective.com>
Runtime Collective Ltd.

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