logo       

Re: Using custom stem analyzer giving mongrel errors: msg#00067

lang.ruby.ferret.general

Subject: Re: Using custom stem analyzer giving mongrel errors

Well after a few hours of playing with it, I finally gave up and decided
to try a different stem analyzer from another post. Specifically:
require 'rubygems'
require 'ferret'

class StemmedAnalyzer < Ferret::Analysis::Analyzer
include Ferret::Analysis
def initialize(stop_words = ENGLISH_STOP_WORDS)
@stop_words = stop_words
end
def token_stream(field, str)

StemFilter.new(StopFilter.new(LowerCaseFilter.new(StandardTokenizer.new(str)),
@stop_words))
end
end

The error seems to have disappeared now. Very strange indeed.

--
Posted via http://www.ruby-forum.com/.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise