David Balmain wrote:
> On 10/16/06, Jim Kane <[EMAIL PROTECTED]> wrote:
>> 'parse'
>> exception?
>>
>> Jim
> 
> clean_string isn't perfect. It escapes special characters within
> phrases (except for '<>' and '|' which have special meaning within
> phrases). It also tries to match up quotes and brackets. If it still
> can't parse the query then it will raise an exception unless you set
> :handle_exception to true in which case the exception will be ignored
> and the query will be parsed as a simple boolean query and all special
> characters will be ignored.
> 
> I hope that makes sense. If you have any suggestions I'd be happy to 
> hear them.
> 
> Cheers,
> Dave

OK, the actual flag I needed was :handle_parse_errors as opposed to 
:handle_exception, or :handle_parser_errors (that one's in the RDocs on 
the ferret trac).  Calling acts_as_ferret like so did the trick:
acts_as_ferret({:fields => {:field => {:store => :compressed}}}, 
{:handle_parser_errors => true})

Thanks for pointing  me in the right direction.  I was going to submit a 
patch to the docs but it looks like you've fixed it already in the 
trunk.

Jim

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to