Hello,
Writing such a queryparser is really easy if you consider acceptable
to catch "QueryParseException"s
what I usually do in case of such an exception is report a JSF
validation error with some instructions about
query syntax.
Well, Google doesn't show validation exceptions if you mistype
the
query ;) But you get the results you expected anyway. So your query is
"fixed", it it contains a syntax error.
The default query parser already supports AND and OR keywords, and
by
extending it and overriding a simple method you can disable
the similarity symbol "~" if you want to (don't remember the method
name now but can look it up if you need it); this way the default
QueryParser already support all of google's basic syntax (excluding
the advanced fetatures, leaving out stuff like language and website
keywords...).
Yes, you are right, and I suppose writing a simple version which
would
escape any mistyped charaters shouldn't be very hard.
--
Adam