lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Nokleberg <>
Subject Avoiding ParseExceptions
Date Tue, 06 Jun 2006 20:24:53 GMT
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 correct me
if you know otherwise).

Does anyone have suggestions on how to accomplish this? I imagine it could
require a mix of techniques:
- pre-processing the input string (e.g. I currently escape colons)
- catching generated exceptions and using the exception info to correct
  the string and retry the query
- a modified QueryParser?

The next step is probably to compile a list of all the ways a
ParseException can be generated, but I figured I should ask if this idea
has any merit first.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message