Hi I'm still having trouble with this. Probably something stupid but
here goes.
I'm using ferret version 0.13 and aaf.
I created this file in my app/models directory
require 'ferret'
include Ferret
module Ferret::Analysis
class MyAnalyzer
def token_stream(field, text)
StemFilter.new(StandardTokenizer.new(text))
end
end
end
naming it my_analyzer.rb as directed.
and then in my ferret model i have the following declarion.
acts_as_ferret :fields=> ['short_description'],:analyzer =>
Ferret::Analysis::MyAnalyzer.new
I tried to rebuild my index but it crashes out with the following error:
>> VoObject.rebuild_index
NameError: uninitialized constant MyAnalyzer
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in
`const_missing'
from script/../config/../config/../app/models/vo_object.rb:14
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:in
`load'
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:56:in
`require_or_load'
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:in
`depend_on'
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in
`require_dependency'
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:98:in
`const_missing'
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in
`const_missing'
from (irb):11
>>
Nasty eh?
Any idea what is going on here? Why can't my VoObject model see the new
analyzer?
Thanks again.
> You're welcome. And may I kindly ask you to use a valid email address
> and perhaps your real name for future posts?
I used to post with a valid email address. But then the number of spam
messages i recieved went from 1 or 2 a week to 50-60 a day. Ruby Forum
used to print the email addresses on the page. Heres a comprimise.
Regards
Caspar
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk