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
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.
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?