Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 12728 invoked from network); 21 Dec 2004 11:41:19 -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:41:19 -0000 Received: (qmail 62867 invoked by uid 500); 21 Dec 2004 11:40:27 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 62820 invoked by uid 500); 21 Dec 2004 11:40:26 -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 62769 invoked by uid 99); 21 Dec 2004 11:40:24 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from mail.tanto.de (HELO mail.tanto.de) (213.61.178.43) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 21 Dec 2004 03:40:21 -0800 Received: from localhost (localhost [127.0.0.1]) by mail.tanto.de (Postfix) with ESMTP id 7FF3823BEA for ; Tue, 21 Dec 2004 12:41:09 +0100 (CET) Received: from mail.tanto.de ([127.0.0.1]) by localhost (mail.tanto.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 12540-05 for ; Tue, 21 Dec 2004 12:41:09 +0100 (CET) Received: from tucholsky.office.tanto.de (unknown [10.0.1.4]) by mail.tanto.de (Postfix) with ESMTP id 6349B23BC8 for ; Tue, 21 Dec 2004 12:41:09 +0100 (CET) Received: from tucholsky.office.tanto.de (morus@localhost [127.0.0.1]) by tucholsky.office.tanto.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id iBLBeBmA022581 for ; Tue, 21 Dec 2004 12:40:11 +0100 Received: (from morus@localhost) by tucholsky.office.tanto.de (8.12.3/8.12.3/Debian-6.6) id iBLBeBos022577; Tue, 21 Dec 2004 12:40:11 +0100 From: Morus Walter MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <16840.2971.658555.160305@tucholsky.office.tanto.de> Date: Tue, 21 Dec 2004 12:40:11 +0100 To: "Lucene Users List" Subject: Re: Synonyms for AND/OR/NOT operators In-Reply-To: <20041221111001.74871.qmail@web21323.mail.yahoo.com> References: <16839.62296.875645.484722@tucholsky.office.tanto.de> <20041221111001.74871.qmail@web21323.mail.yahoo.com> X-Mailer: VM 7.03 under 21.4 (patch 6) "Common Lisp" XEmacs Lucid X-Virus-Scanned: by amavisd-new at mail.tanto.de Q&A postmaster@tanto.de X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Sanyi writes: > 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 tamperin= g with Lucene's source code. >=20 Apart from knowing how to compile lucene (including the javacc code generation) you should only need to change TOKEN : { | | to TOKEN : { " | "&&") > | " | "||") > | " | "!") > in jakarta-lucene/src/java/org/apache/lucene/queryParser/QueryParser.jj= Replacing the operators before query might be hard to do, if you want to handle cases like =BB"a AND b" OR c=AB, which is a query for a=20 phrase "a AND b" or the token c, correctly. Morus --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org