Chris Nokleberg wrote:
I am using the QueryParser with a StandardAnalyzer. I would like to avoid
or auto-correct anything that would lead to a ParseException. For example,
I don't think you can get a parse exception from Google--even if you omit
a closing quote it looks like it just closes it for
On Tue, 06 Jun 2006 14:57:06 -0700, Chris Hostetter wrote:
> I took an approach similar to that, by escaping all of the "special'
> characters except '+', '-', and '"', and then stripping out all quotes if
> there was a non even amount ... this gave me a simplified version of the
> Lucene syntax th
It really depends on what syntax you want to support ... if you just want
basic term matching and do't want to let hte user specify field names, or
boosts or phrases, or ranges, or wildcards -- then just escape the
entirestring, that should make it impossible to get a parse exception.
I took an a
That way madness lies..
I suspect that you'll find that there are a few rules you can apply that
will allow you to "fix" a lot of queries, but... is that really what you
want to do? For instance, a user types
"a and or not b"
Whatever you do, it isn't what the *next* user who types somethin
http://www.aviransplace.com
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Chris Nokleberg
Sent: Tuesday, June 06, 2006 4:25 PM
To: java-user@lucene.apache.org
Subject: Avoiding ParseExceptions
Hi all,
I am using the QueryParser with a StandardAnalyzer. I would like
Hi all,
I am using the QueryParser with a StandardAnalyzer. I would like to avoid
or auto-correct anything that would lead to a ParseException. For example,
I don't think you can get a parse exception from Google--even if you omit
a closing quote it looks like it just closes it for you (please cor