lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Avoiding ParseExceptions
Date Tue, 06 Jun 2006 21:57:06 GMT

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 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 that was fairly safe.


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

View raw message