lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: QueryParser exception on escaped backslash preceding ) character
Date Fri, 12 Aug 2005 16:12:16 GMT

I think you are encountering a "double escape" problem in java literals.
QP is seeing a backslash in front of the ) and waiting for you to finish
the paren grouping.

how are you passing that string to the QP, is it embedded in your java
code?  if so the java compiler is interpreting your \\ and your java  app
is never seeing it.

: Date: Fri, 12 Aug 2005 07:30:19 -0700 (PDT)
: From: Matt Magoffin <apache.org@msqr.us>
: Reply-To: java-user@lucene.apache.org
: To: java-user@lucene.apache.org
: Subject: QueryParser exception on escaped backslash preceding ) character
:
: When I try to parse a query with an escaped backslash character like this
: (using Lucene 1.4.3):
:
: -id:20677 +(addr:Street143 AND zip:\\)
:
: the QueryParser thows an Exception:
:
: Encountered "<EOF>" at line 1, column 289.
: 			Was expecting one of: <AND> ... <OR> ...
: 			<NOT> ... "+" ... "-" ... "(" ... ")" ... "^" ...
: 			<QUOTED> ... <TERM> ...
: 			<PREFIXTERM> ... <WILDTERM> ... "[" ...
: 			"{" ... <NUMBER> ...
:
: However, if I insert a space between the backslash and the parenthesis:
:
: -id:20677 +(addr:Street143 AND zip:\\ )
:
: it works. Is this expected behavior or perhaps a bug in the QueryParser?
:
: -- m@
:
: ---------------------------------------------------------------------
: To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
: For additional commands, e-mail: java-user-help@lucene.apache.org
:



-Hoss


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


Mime
View raw message