lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: QueryParser syntax French Operator
Date Sun, 08 Oct 2006 03:44:47 GMT
Hi Patrick,

If I were trying to do this, I'd modify QueryParser.jj to construct the grammar for boolean
operators based on something like Locale (or LANG env. variable?).  I'd try adding code a
la:
en_AND = AND
en_OR = OR
en_NOT = NOT
fr_AND = ET
fr_OR = OU
fr_NOT = SAUF

And then:
if (locale is 'fr')
 // construct the grammar with fr_*
...

Something like that.

Otis

----- Original Message ----
From: Patrick Turcotte <patrick.turcotte@usherbrooke.ca>
To: java-user@lucene.apache.org
Sent: Tuesday, October 3, 2006 11:15:56 AM
Subject: QueryParser syntax French Operator

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

-- 
Patrick Turcotte



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





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


Mime
View raw message