Hi!

I wanted to build my own custom Analyzer like so:

   class Analyzer < Ferret::Analysis::Analyzer

     include Ferret::Analysis

     def initialize(stop_words = ENGLISH_STOP_WORDS)
       @stop_words = stop_words
     end

     def token_stream(field, string)
       StopFilter.new(LetterTokenizer.new(string, true), @stop_words)
     end

   end

As one can easily spot, I essentially want a LetterAnalyzer with stop  
word filtering. However, using that analyzer (for indexing) results  
in a segmentation fault.

   /opt/local/lib/ruby/gems/1.8/gems/ferret-0.10.13/lib/ferret/ 
index.rb:281: [BUG] Segmentation fault
   ruby 1.8.5 (2006-08-25) [powerpc-darwin8.8.0]

This is admittedly a rather naive implementation which is  
extrapolated from those I found in the docs. So what am I missing here?

Cheers,
Andy
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to