lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sanyi <need4...@yahoo.com>
Subject Re: Synonyms for AND/OR/NOT operators
Date Tue, 21 Dec 2004 11:10:01 GMT
Well, I guess I'd better recognize and replace the operator synonyms to their original format
before passing them to QueryParser. I don't feel comfortable tampering with Lucene's source
code.

Anyway, thanx for the answers.

Sanyi

--- Morus Walter <morus.walter@tanto.de> wrote:

> Erik Hatcher writes:
> > On Dec 21, 2004, at 3:04 AM, Sanyi wrote:
> > > What is the simplest way to add synonyms for AND/OR/NOT operators?
> > > I'd like to support two sets of operator words, so people can use 
> > > either the original english
> > > operators and my custom ones for our local language.
> > 
> > There are two options that I know of: 1) add synonyms during indexing 
> > and 2) add synonyms during querying.  Generally this would be done 
> > using a custom analyzer.
> 
> I guess you missunderstood the question.
> 
> I think he want's to know how to create a query parser understanding 
> something like 'a UND b' as well as 'a AND b' to support localized 
> operator names (german in this case).
> 
> AFAIK that can only be done by copying query parsers javacc-source and
> adding the operators there.
> Shouldn't be difficult, though it's a bit ugly since it implies code
> duplication. And there will be no way of choosing the operators dynamically
> at runtime. One will need to have different query parsers for different
> languages.
> 
> Morus
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 



		
__________________________________ 
Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 
http://mobile.yahoo.com/maildemo 

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


Mime
View raw message