lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: *term search
Date Wed, 08 Sep 2004 11:16:11 GMT

.. and here is the way to do it:
(See attached file: SUPPOR~1.RAR)

                      Erik Hatcher                                                       
                      <erik@ehatchersol        To:       "Lucene Users List"          
            >               <>
                                               cc:       (bcc: Iouli Golovatyi/X/GP/Novartis)
                      08.09.2004 12:46         Subject:  Re: *term search                
                      Please respond to                                                  
                      "Lucene Users            Category:       |-------------------------|
                      List"                                    | ( ) Action needed       |
                                                               | ( ) Decision needed     |
                                                               | ( ) General Information |

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.


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

View raw message