Class: Ferret::Analysis::LetterAnalyzerWithStopFilter
- Defined in:
- lib/picolena/templates/config/initializers/001_load_ferret.rb
Overview
Used for alias_path queries
Instance Method Summary collapse
-
#initialize(stop_words = FULL_ENGLISH_STOP_WORDS, lower = true) ⇒ LetterAnalyzerWithStopFilter
constructor
A new instance of LetterAnalyzerWithStopFilter.
- #token_stream(field, str) ⇒ Object
Constructor Details
#initialize(stop_words = FULL_ENGLISH_STOP_WORDS, lower = true) ⇒ LetterAnalyzerWithStopFilter
Returns a new instance of LetterAnalyzerWithStopFilter.
6 7 8 9 |
# File 'lib/picolena/templates/config/initializers/001_load_ferret.rb', line 6 def initialize(stop_words = FULL_ENGLISH_STOP_WORDS, lower = true) @lower = lower @stop_words = stop_words end |
Instance Method Details
#token_stream(field, str) ⇒ Object
11 12 13 14 |
# File 'lib/picolena/templates/config/initializers/001_load_ferret.rb', line 11 def token_stream(field, str) ts = LetterTokenizer.new(str, @lower) StopFilter.new(ts, @stop_words) end |