lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BOUDOT Christian <c.bou...@intrasoft.lu>
Subject RE: free text search with numbers
Date Mon, 04 Jul 2005 15:38:22 GMT
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:erik@ehatchersolutions.com] 
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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message