From c482dbf5e7c137fe71da2b15eacf65e2ed00fd72 Mon Sep 17 00:00:00 2001 From: Jeremy Lynch Date: Mon, 28 Nov 2016 07:10:59 +1000 Subject: [PATCH] Add option to customise ignore_above (#773) --- lib/searchkick/index_options.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/searchkick/index_options.rb b/lib/searchkick/index_options.rb index 5c95895..c7d86b4 100644 --- a/lib/searchkick/index_options.rb +++ b/lib/searchkick/index_options.rb @@ -25,7 +25,7 @@ module Searchkick } end - keyword_mapping[:ignore_above] = 256 unless below22 + keyword_mapping[:ignore_above] = (options[:ignore_above] || 256) unless below22 settings = { analysis: { @@ -308,7 +308,7 @@ module Searchkick 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 -- libgit2 0.21.0