Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 95840 invoked from network); 21 Dec 2004 11:17:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 21 Dec 2004 11:17:18 -0000 Received: (qmail 6936 invoked by uid 500); 21 Dec 2004 11:16:50 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 6907 invoked by uid 500); 21 Dec 2004 11:16:49 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 6881 invoked by uid 99); 21 Dec 2004 11:16:48 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from web21323.mail.yahoo.com (HELO web21323.mail.yahoo.com) (216.136.175.209) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 21 Dec 2004 03:16:45 -0800 Received: (qmail 74878 invoked by uid 60001); 21 Dec 2004 11:10:01 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=bzPKqFeEQgLS43brbH+n7ap/uXk+QpI9ioSwcTqD8S2JGLkYoCyriLLu67L3pZiQGIaiIVOakI3SFUqJGr63Rde7sjYaVrFUHorV5ik4+YWelapK5Nx22eGe+4WeccG9czloCXjUxxtvMSTWw0bL8hLG92ftToaX0+i0lbV/tCE= ; Message-ID: <20041221111001.74871.qmail@web21323.mail.yahoo.com> Received: from [193.226.211.176] by web21323.mail.yahoo.com via HTTP; Tue, 21 Dec 2004 03:10:01 PST Date: Tue, 21 Dec 2004 03:10:01 -0800 (PST) From: Sanyi Subject: Re: Synonyms for AND/OR/NOT operators To: Lucene Users List In-Reply-To: <16839.62296.875645.484722@tucholsky.office.tanto.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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 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