Changeset 265
- Timestamp:
- 11/14/07 09:25:14 (1 year ago)
- Files:
-
- trunk/demo/app/models/comment.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/demo/app/models/comment.rb
r264 r265 1 2 class PlainAsciiAnalyzer < ::Ferret::Analysis::Analyzer 3 include ::Ferret::Analysis 4 def token_stream(field, str) 5 StopFilter.new( 6 StandardTokenizer.new(str) , 7 ["fax", "gsm"] 8 ) 9 # raise #<<<----- is never executed when uncommented !! 10 end 11 end 12 13 1 14 class Comment < ActiveRecord::Base 2 15 belongs_to :parent, :class_name => 'Content', :foreign_key => :parent_id … … 21 34 :added => { :index => :untokenized, :store => :yes, :ignore => true } 22 35 }, :ferret => { :analyzer => Ferret::Analysis::StandardAnalyzer.new(['fax', 'gsm', 'the', 'or']) } ) 36 #}, :ferret => { :analyzer => PlainAsciiAnalyzer.new(['fax', 'gsm', 'the', 'or']) } ) 23 37 24 38 # only index the named fields:
