lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: *term search
Date Wed, 08 Sep 2004 10:46:10 GMT
On Sep 8, 2004, at 6:26 AM, sergiu gordea wrote:
> I want to discuss a little problem, lucene doesn't support *Term like 
> queries.

First of all, this is untrue.  WildcardQuery itself most definitely 
supports wildcards at the beginning.

> I would like to use "*schreiben".

The dilemma you've encountered is that QueryParser prevents queries 
that begin with a wildcard.

> So my question is if there is a simple solution for implementing the 
> funtionality mentioned above.
> Maybe subclassing one class and overwriting some methods will sufice.

It will require more than that in this case.  You will need to create a 
custom parser that allows the grammar you'd like.  Feel free to use the 
JavaCC source code to QueryParser as a basis of your customizations.

	Erik


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


Mime
View raw message