lib/mongoid_search.rb in mongoid_search-0.3.3 vs lib/mongoid_search.rb in mongoid_search-0.3.4
- old
+ new
@@ -58,9 +58,17 @@
# Minimum word size. Words smaller than it won't be indexed
mattr_accessor :minimum_word_size
@@minimum_word_size = 2
+ # Strip special symbols
+ mattr_accessor :strip_symbols
+ @@strip_symbols = /[._:;'\"`,?|+={}()!@#%^&*<>~\$\-\\\/\[\]]/
+
+ # Strip accents
+ mattr_accessor :strip_accents
+ @@strip_accents = /[^\s\p{Alnum}]/
+
def self.setup
yield self
end
end