Hi Christian,
That syntax is not entirely correct.
Search in the mailing list for "*term" or suffix queries
a few months ago I submitted the correct grammar that enables
suffix queries.
Best,
Sergiu
BOUDOT Christian wrote:
I have found in the QueryParser.jj those lines of comments:
// OG: to support prefix queries:
// http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12137
// Change from:
// | <WILDTERM: <_TERM_START_CHAR>
// (<_TERM_CHAR> | ( [ "*", "?" ] ))* >
// To:
//
// | <WILDTERM: (<_TERM_CHAR> | ( [ "*", "?" ] ))* >
So as indicated I changed my line to the second option but it didn't solve
the problem I still getting the lexical error. Do I have to do something
special to this .jj file or is it read when the QueryParser.java file is
compiled?
Cheers
Chris
-----Original Message-----
From: Erik Hatcher [mailto:[EMAIL PROTECTED]
Sent: 04 July 2005 16:15
To: java-user@lucene.apache.org
Subject: Re: free text search with numbers
On Jul 4, 2005, at 9:02 AM, BOUDOT Christian wrote:
Hi,
I modified the analyzer (it is now vegetarian and won't eat numbers
anymore
:-) but I have hit a new problem. The parser won't accept a keyword
to start
with a wildcard character. (*/12/2003) Any hints to solve this new
issue?
This is by-design "issue" with QueryParser (to avoid WildcardQuery's
from being created that run through every term in the index). It is
the way the grammar has been defined. You would need to build your
own QueryParser to change this behavior. The relevant QueryParser
grammar piece is this (from QueryParser.jj):
| <WILDTERM: <_TERM_START_CHAR>
(<_TERM_CHAR> | ( [ "*", "?" ] ))* >
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]