Excerpts from John Bachir's message of Wed Jan 17 13:24:48 -0800 2007:
> Is there any somewhat standard way to remove or otherwise handle  
> special or syntax characters  from a user's search, such as a colon?

If you want to allow them the full syntax, just use QueryParser#parse
(and handle the QueryParseException). If you want to disallow anything
special, you could split on whitespace and turn each token into a
TermQuery, then throw them all into a BooleanQuery. 

Anything in between (e.g. allow phrase queries, but disallow everything
else) will be more complicated. But I can't think of many good reasons
to disallow the full syntax in the first place.

-- 
William <[EMAIL PROTECTED]>
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to