I'm using the custom stem analyzer:

require 'rubygems'
require 'ferret'
include Ferret
module Ferret::Analysis
 class FerretAnalyzer
  def initialize(stop_words = FULL_ENGLISH_STOP_WORDS)
      @stop_words = stop_words
  end
   def token_stream(field, text)
     
StemFilter.new(StopFilter.new(LowerCaseFilter.new(StandardTokenizer.new(text)),
@stop_words))
   end
 end
end

and I'm simply setting the :analyzer option in AAF.

However, I get odd behavior.  The first search that I do will go through
and display the proper results, but any subsequent request starts to
produce odd behavior.  For example when you are redirected, mongrel does
not redirect the browser but instead displays the message 'You are being
redirected'.  Here is the error produced in the Mongrel logs:

Thu Dec 07 17:49:06 PST 2006: Error calling Dispatcher.dispatch
#<NameError: cannot remove Object::QueryParser>
/Users/raymond/Rails/cart/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:416:in
`remove_const'
/Users/raymond/Rails/cart/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:416:in
`remove_constant'
/Users/raymond/Rails/cart/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:270:in
`remove_unloadable_constants!'
/Users/raymond/Rails/cart/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:270:in
`remove_unloadable_constants!'
/Users/raymond/Rails/cart/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:73:in
`clear'
/Users/raymond/Rails/cart/config/../vendor/rails/railties/lib/dispatcher.rb:60:in
`reset_application!'
/Users/raymond/Rails/cart/config/../vendor/rails/railties/lib/dispatcher.rb:116:in
`reset_after_dispatch'
/Users/raymond/Rails/cart/config/../vendor/rails/railties/lib/dispatcher.rb:51:in
`dispatch'
/Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/rails.rb:84:in
`process'
/Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/1.8/sync.rb:229:in
`synchronize'
/Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/rails.rb:83:in
`process'
/Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb:580:in
`process_client'
/Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb:579:in
`process_client'
/Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb:686:in
`run'
/Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb:686:in
`run'
/Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel.rb:673:in
`run'
/Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/configurator.rb:267:in
`run'
/Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/configurator.rb:266:in
`run'
/Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails:127:in
`run'
/Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/command.rb:211:in
`run'
/Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails:231
/Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/i386/bin/mongrel_rails:18

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

Reply via email to