lib/searchkick/index_options.rb in searchkick-1.4.0 vs lib/searchkick/index_options.rb in searchkick-1.4.1
- old
+ new
@@ -23,11 +23,11 @@
{
type: "keyword"
}
end
- keyword_mapping[:ignore_above] = 256 unless below22
+ keyword_mapping[:ignore_above] = (options[:ignore_above] || 256) unless below22
settings = {
analysis: {
analyzer: {
searchkick_keyword: {
@@ -306,10 +306,10 @@
if options.key?(:filterable)
dynamic_fields["{name}"] = {type: default_type, index: "no"}
end
- dynamic_fields["{name}"][:ignore_above] = 256 unless below22
+ dynamic_fields["{name}"][:ignore_above] = (options[:ignore_above] || 256) unless below22
unless options[:searchable]
if options[:match] && options[:match] != :word
dynamic_fields[options[:match]] = {type: default_type, index: "analyzed", analyzer: "searchkick_#{options[:match]}_index"}
end