On Thu, Dec 07, 2006 at 06:27:13AM +0100, Raymond O'connor wrote:
> Well, you bring up another question I had. I was using a similar line
> as yours above to call the stem analyzer and I always would get a parse
> error. I even get a parse error when I paste your line in. I'm pretty
> new to ruby, and I'm sure its something obvious but I can't get rid of
> the parse error without removing the hash ticks such as
> acts_as_ferret :fields => ["id", "name", "body"], :analyzer =>
> MyFunkyStemAnalyzer
> When I do that, AAF never seems to call my analyzer. So I ended up
> editing the AAF code and setting the analyzer option inside there and it
> worked except I get the whole problem I stated above.
correct syntax would be:
acts_as_ferret( { :fields => [:id, :name, :body] },
:analyzer => MyFunkyStemAnalyzer.new)
curly brackets are needed for the first options hash only, but may be
placed around the second one (where the analyzer option belongs), too.
the important thing to get over the parse error is to use () around the
whole argument list.
sorry, I think I forgot these subtle things when posing code in the past
myself.
Jens
--
webit! Gesellschaft für neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer [EMAIL PROTECTED]
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk