lib/searchkick/index_options.rb in searchkick-3.1.0 vs lib/searchkick/index_options.rb in searchkick-3.1.1

- old
+ new

@@ -223,9 +223,21 @@ max_ngram_diff: 49, max_shingle_diff: 4 } end + if options[:case_sensitive] + settings[:analysis][:analyzer].each do |_, analyzer| + analyzer[:filter].delete("lowercase") + end + end + + if options[:stem] == false + settings[:analysis][:analyzer].each do |_, analyzer| + analyzer[:filter].delete("searchkick_stemmer") + end + end + settings = settings.symbolize_keys.deep_merge((options[:settings] || {}).symbolize_keys) # synonyms synonyms = options[:synonyms] || []