lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <>
Subject Re: QueryParser syntax French Operator
Date Tue, 03 Oct 2006 21:35:31 GMT
Oh wouldn't we all. I want this too. Unfortunately, it's an elusive 
beast at best. As I am sure you know, JavaCC generates code based on the 
grammar and so it is very hard to alter the grammar after JavaCC'ing it. 
If you relax the 'add' part then you might be able to do something with This holds an int for each string in the 
grammar which indexes into a String array...check it out and you will 
see what I mean. So replacing may be as easy as modifying the 'and' and 
'or' and whatnot in that String array. You might make a conditional 
build file that includes the correct or 
something. I have not explored this too deeply so if you find something 
better or this is a dead end, please let me know.

- Mark

Patrick Turcotte wrote:
> Hi,
> Is there a way to add / replace the text for the boolean operators used
> by the query parser?
> We would like to replace (or even better, add), "AND", "OR" and "NOT" by
> "ET", "OU" and "SAUF".
> Is there a way to configure the QueryParser to do it?
> We know we could always modify QueryParser.jj to add them to the list,
> but we'd rather like not to have to recompile/rejar each time there is a
> new version of Lucene.
> Thanks

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

View raw message