From general-return-779-apmail-lucene-general-archive=lucene.apache.org@lucene.apache.org Mon Jul 21 20:06:05 2008 Return-Path: Delivered-To: apmail-lucene-general-archive@www.apache.org Received: (qmail 76961 invoked from network); 21 Jul 2008 20:06:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Jul 2008 20:06:04 -0000 Received: (qmail 97123 invoked by uid 500); 21 Jul 2008 20:06:02 -0000 Delivered-To: apmail-lucene-general-archive@lucene.apache.org Received: (qmail 97096 invoked by uid 500); 21 Jul 2008 20:06:02 -0000 Mailing-List: contact general-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: general@lucene.apache.org Delivered-To: mailing list general@lucene.apache.org Received: (qmail 97085 invoked by uid 99); 21 Jul 2008 20:06:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Jul 2008 13:06:02 -0700 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [128.230.108.46] (HELO SUEXCL-02.ad.syr.edu) (128.230.108.46) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Jul 2008 20:05:08 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: lucene query parser syntax "escape =" Date: Mon, 21 Jul 2008 16:02:47 -0400 Message-ID: <9294E20AED46934EA459020706463F94C59C22@SUEXCL-02.ad.syr.edu> In-Reply-To: <20531.58673.qm@web51704.mail.re2.yahoo.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: lucene query parser syntax "escape =" Thread-Index: Acjq3ghU2L8yxZgxTSOpIoSePI2fnwAjW8Wg From: "Steven A Rowe" To: , X-Virus-Checked: Checked by ClamAV on apache.org Hi cw, Which analyzer are you using? For queries like 'location=3D-1' you = might try WhitespaceAnalyzer, since it won't throw out the '=3D', like = StandardAnalyzer will. See for info = about QueryParser syntax and metacharacter escaping. For escaping QueryParser's metacharacters (like '-'), you could use the = static QueryParser.escape() method: = . Steve On 07/20/2008 at 11:00 PM, cw wrote: > The "-" or prohibit operator excludes documents that contain > the term after the "-" symbol. >=20 > so how to search for "-" >=20 > --- On Sun, 7/20/08, cw wrote: > From: cw > Subject: lucene query parser syntax "escape =3D" > To: general@lucene.apache.org > Date: Sunday, July 20, 2008, 12:59 PM >=20 > i have a field that indexed called > . i can see the field and it's data using "luke"=A0 > . > =A0 > the content is like below::: > =A0 > sadf > > > # > #Sun Jul 20 22:34:07 SGT 2008 > photographerContact=3D > tasterContact=3D > foodType=3D-1 > profileType=3D-1 > payment=3D-1 > location=3D-1 >=20 > =A0 > =A0 > How to use query parser to search for this summary field content=A0for > "location=3D-1" .=A0 from what i know i cannot use " =3D"=A0 for > query. how to escape "=3D"=A0 ? > =A0 > i tried something like this 'location=3D-1'=A0 but failed > =A0 > =A0 >=20 >=20 >=20 > =20