Jens Kraemer <[EMAIL PROTECTED]> writes:
> On Thu, Nov 15, 2007 at 12:24:25AM +0100, Hongli Lai wrote:
>> Alain Ravet wrote:
>> > class Country < ActiveRecord::Base
>> > acts_as_ferret(
>> > :fields => [:name] ,
>> > :remote => true,
>> > :ferret => {:analyzer => Test2Analyzer.new([]) }
>> > )
>> > end
>>
>> Try this:
>>
>> acts_as_ferret({ :fields => [:name], :remote => true },
>> { :analyzer => Test2Analyzer.new([]) })
>
> this won't help, these are both valid ways to call acts_as_ferret. The
> :ferret syntax is the preferred one, however.
Just for information, I was using an old or bad syntax for aaf.
I was using acts_as_ferret :fields [], :analyzer => MyAnalyzer.new
and it wasn't working. (A raise in initialize of MyAnalyzer was raising
but not in token_stream)
I'm now using :ferret => {:analyzer => MyAnalyzer} and it works as
expected.
--
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk