Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@apache.org Received: (qmail 89256 invoked from network); 3 Jul 2002 15:42:32 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 3 Jul 2002 15:42:32 -0000 Received: (qmail 22800 invoked by uid 97); 3 Jul 2002 15:42:40 -0000 Delivered-To: qmlist-jakarta-archive-lucene-user@jakarta.apache.org Received: (qmail 22769 invoked by uid 97); 3 Jul 2002 15:42:40 -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 22751 invoked by uid 98); 3 Jul 2002 15:42:39 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: <33656C25F5E7214A9621B7C9C9D93231011B5B86@us10000msx04.na.odcorp.net> From: Philip-Allen To: Lucene Users List Subject: RE: exception with parse & quote Date: Wed, 3 Jul 2002 11:42:08 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Thanks... Any easy way around this problem? Because " in this case means inch and = is not really intended to be searched on.... Is the best way to handle this then to use the analyzer.tokenStream = directly to strip the " before parsing? If so, what is the point of parsing? -----Original Message----- From: Hal=E1csy P=E9ter [mailto:halacsy.peter@axelero.com] Sent: Wednesday, July 03, 2002 11:37 AM To: Lucene Users List Subject: RE: exception with parse & quote because " sign in query means the start of a phrase; for example = "Lucene User" query is not equal to Lucene User. query parser thinks that after a " sign there is an other " ; EOF encountered without any closing " peter > -----Original Message----- > From: a person [mailto:a.person@eudoramail.com] > Sent: Wednesday, July 03, 2002 5:28 PM > To: lucene-user@jakarta.apache.org > Subject: exception with parse & quote >=20 >=20 > All luceners... >=20 > this..... >=20 > String queryStr=3D"9\" Speaker"; > logger.debug("query string...queryStr=3D" + queryStr); > Analyzer analyzer =3D new StandardAnalyzer(); > Query query =3D QueryParser.parse(queryStr, "", analyzer); >=20 >=20 > produces.... >=20 > query string...queryStr=3D9" Speaker > org.apache.lucene.queryParser.TokenMgrError: Lexical error at=20 > line 1, column 11. Encountered: after : "\" Speaker" > at=20 > org.apache.lucene.queryParser.QueryParserTokenManager.getNextT > oken(Unknown Source) > at=20 > org.apache.lucene.queryParser.QueryParser.jj_scan_token(Unknow > n Source) > at=20 > org.apache.lucene.queryParser.QueryParser.jj_3_1(Unknown Source) > at=20 > org.apache.lucene.queryParser.QueryParser.jj_2_1(Unknown Source) > at=20 > org.apache.lucene.queryParser.QueryParser.Clause(Unknown Source) > at=20 > org.apache.lucene.queryParser.QueryParser.Query(Unknown Source) > at=20 > org.apache.lucene.queryParser.QueryParser.parse(Unknown Source) > at=20 > org.apache.lucene.queryParser.QueryParser.parse(Unknown Source) >=20 >=20 > but this works..... >=20 > String queryStr=3D"9 Speaker"; >=20 >=20 >=20 > shouldn't..... >=20 >=20 >=20 > shouldn't this behave the same if I call =20 > analyzer.tokenStream directly (which correctly strips the " out ? >=20 >=20 > thanks for any help.... >=20 >=20 >=20 >=20 >=20 >=20 > Join 18 million Eudora users by signing up for a free Eudora=20 > Web-Mail account at http://www.eudoramail.com >=20 > -- > To unsubscribe, e-mail: =20 > > For additional commands, e-mail:=20 > >=20 >=20 -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: