Commit c482dbf5e7c137fe71da2b15eacf65e2ed00fd72

Authored by Jeremy Lynch
Committed by Andrew Kane
1 parent 38f20b29

Add option to customise ignore_above (#773)

* Add option to customise ignore_above

* Update readme

* Remove readme changes
Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
lib/searchkick/index_options.rb
@@ -25,7 +25,7 @@ module Searchkick @@ -25,7 +25,7 @@ module Searchkick
25 } 25 }
26 end 26 end
27 27
28 - keyword_mapping[:ignore_above] = 256 unless below22 28 + keyword_mapping[:ignore_above] = (options[:ignore_above] || 256) unless below22
29 29
30 settings = { 30 settings = {
31 analysis: { 31 analysis: {
@@ -308,7 +308,7 @@ module Searchkick @@ -308,7 +308,7 @@ module Searchkick
308 dynamic_fields["{name}"] = {type: default_type, index: "no"} 308 dynamic_fields["{name}"] = {type: default_type, index: "no"}
309 end 309 end
310 310
311 - dynamic_fields["{name}"][:ignore_above] = 256 unless below22 311 + dynamic_fields["{name}"][:ignore_above] = (options[:ignore_above] || 256) unless below22
312 312
313 unless options[:searchable] 313 unless options[:searchable]
314 if options[:match] && options[:match] != :word 314 if options[:match] && options[:match] != :word