On Aug 15, 2005, at 3:05 PM, Monsur Hossain wrote:
We've actually been running into this sort of issue a lot, since we
take a
user generated query from a web page and then push it into a
QueryParser.
In general we've learned that escaping special characters is not
enough to
create a well fo
We've actually been running into this sort of issue a lot, since we take a
user generated query from a web page and then push it into a QueryParser.
In general we've learned that escaping special characters is not enough to
create a well formed query. Since our users aren't running complicated
que
gt; email?
>
> : Date: Fri, 12 Aug 2005 12:09:55 -0700 (PDT)
> : From: Matt Magoffin <[EMAIL PROTECTED]>
> : Reply-To: java-user@lucene.apache.org
> : To: java-user@lucene.apache.org
> : Subject: Re: QueryParser exception on escaped backslash preceding )
> :charact
I can verify that bad things are going on with backslashes and the
query parser in lucene 1.4.3
foo:hi\\ ==> foo:hi\
(foo:hi\\) ==> exception
foo:"hi\\" ==> foo:hi\\
foo:hi\\^3 ==> foo:hi\^3
foo:"hi \\ there" ==> foo:"hi \\ there"
foo:'hi there' ==> foo:'hi
foo:"\"" ==> exception
foo:hi\" ==> f
: Fri, 12 Aug 2005 10:29:41 -0700 (PDT)
: > : From: Matt Magoffin <[EMAIL PROTECTED]>
: > : Reply-To: java-user@lucene.apache.org
: > : To: java-user@lucene.apache.org
: > : Subject: Re: QueryParser exception on escaped backslash preceding )
: > : character
: > :
: > : T
agoffin <[EMAIL PROTECTED]>
> : Reply-To: java-user@lucene.apache.org
> : To: java-user@lucene.apache.org
> : Subject: Re: QueryParser exception on escaped backslash preceding )
> : character
> :
> : The strings are not coming from Java literals, actually, so I didn'
.apache.org
: Subject: Re: QueryParser exception on escaped backslash preceding )
: character
:
: The strings are not coming from Java literals, actually, so I didn't think
: that was the problem.
:
: Any other thoughts?
:
: -- m@
:
: > I think you are encountering a "double escape&q
The strings are not coming from Java literals, actually, so I didn't think
that was the problem.
Any other thoughts?
-- m@
> 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.
>
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 y