Commit 097d9b73d26fe9fa7cd07682897ed8ee72930bdc
1 parent
64b2e069
Exists in
master
and in
15 other branches
New ngram names work in 6.0 as well
Showing
1 changed file
with
2 additions
and
5 deletions
Show diff stats
lib/searchkick/index_options.rb
... | ... | @@ -13,9 +13,6 @@ module Searchkick |
13 | 13 | index_type = index_type.call if index_type.respond_to?(:call) |
14 | 14 | end |
15 | 15 | |
16 | - ngram_type = below70 ? "nGram" : "ngram" | |
17 | - edge_ngram_type = below70 ? "edgeNGram" : "edge_ngram" | |
18 | - | |
19 | 16 | custom_mapping = options[:mappings] || {} |
20 | 17 | if below70 && custom_mapping.keys.map(&:to_sym).include?(:properties) |
21 | 18 | # add type |
... | ... | @@ -129,12 +126,12 @@ module Searchkick |
129 | 126 | max_shingle_size: 5 |
130 | 127 | }, |
131 | 128 | searchkick_edge_ngram: { |
132 | - type: edge_ngram_type, | |
129 | + type: "edge_ngram", | |
133 | 130 | min_gram: 1, |
134 | 131 | max_gram: 50 |
135 | 132 | }, |
136 | 133 | searchkick_ngram: { |
137 | - type: ngram_type, | |
134 | + type: "ngram", | |
138 | 135 | min_gram: 1, |
139 | 136 | max_gram: 50 |
140 | 137 | }, | ... | ... |