From 097d9b73d26fe9fa7cd07682897ed8ee72930bdc Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Thu, 19 Dec 2019 11:01:54 -0500 Subject: [PATCH] New ngram names work in 6.0 as well --- lib/searchkick/index_options.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/searchkick/index_options.rb b/lib/searchkick/index_options.rb index 2cc76ab..0bf740d 100644 --- a/lib/searchkick/index_options.rb +++ b/lib/searchkick/index_options.rb @@ -13,9 +13,6 @@ module Searchkick index_type = index_type.call if index_type.respond_to?(:call) end - ngram_type = below70 ? "nGram" : "ngram" - edge_ngram_type = below70 ? "edgeNGram" : "edge_ngram" - custom_mapping = options[:mappings] || {} if below70 && custom_mapping.keys.map(&:to_sym).include?(:properties) # add type @@ -129,12 +126,12 @@ module Searchkick max_shingle_size: 5 }, searchkick_edge_ngram: { - type: edge_ngram_type, + type: "edge_ngram", min_gram: 1, max_gram: 50 }, searchkick_ngram: { - type: ngram_type, + type: "ngram", min_gram: 1, max_gram: 50 }, -- libgit2 0.21.0