lib/mongoid_search/util.rb in mongoid_search-0.3.2 vs lib/mongoid_search/util.rb in mongoid_search-0.3.3

- old
+ new

@@ -40,10 +40,10 @@ mb_chars. normalize(:kd). downcase. to_s. gsub(/[._:;'"`,?|+={}()!@#%^&*<>~\$\-\\\/\[\]]/, ' '). # strip punctuation - gsub(/[^[:alnum:]\s]/,''). # strip accents + gsub(/[^\s\p{Alnum}]/,''). # strip accents gsub(/[#{ligatures.keys.join("")}]/) {|c| ligatures[c]}. split(' '). reject { |word| word.size < Mongoid::Search.minimum_word_size } text = text.reject { |word| ignore_list.include?(word) } unless ignore_list.blank? text = text.map(&stem_proc) if stem_keywords