I think i fixed this. I did three things
- changed my custom analyser to inherit from Ferret::Analysis::Analyzer
- ditched the downcase! line
- instead of doing downcase!, I added LowerCaseFilter.new(filter) to my
chain
module Ferret::Analysis
class StemmingAnalyzer < Ferret::Analysis::Analyzer
def token_stream(field, text)
RAILS_DEFAULT_LOGGER.debug "SEARCHING, field = #{field.inspect},
text = #{text.inspect}"
tokenizer = StandardTokenizer.new(text)
filter = StemFilter.new(tokenizer)
low_filter = LowerCaseFilter.new(filter)
low_filter
end
end
end
After calling ferret_update on the resource, i can now get it with
'vocal' or 'Vocal'.
I'd still welcome any further advice on this, in case i'm not doing
something right.
thanks, max
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk