Commit a7ad5e216b63602bae93b97ebcc90e83600f1eb9
1 parent
5e37501a
Exists in
master
and in
21 other branches
Bump default max expansions for below option
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
lib/searchkick/query.rb
... | ... | @@ -214,7 +214,8 @@ module Searchkick |
214 | 214 | {fuzzy_transpositions: true} |
215 | 215 | end |
216 | 216 | prefix_length = (misspellings.is_a?(Hash) && misspellings[:prefix_length]) || 0 |
217 | - max_expansions = (misspellings.is_a?(Hash) && misspellings[:max_expansions]) || 3 | |
217 | + default_max_expansions = @misspellings_below ? 20 : 3 | |
218 | + max_expansions = (misspellings.is_a?(Hash) && misspellings[:max_expansions]) || default_max_expansions | |
218 | 219 | end |
219 | 220 | |
220 | 221 | fields.each do |field| | ... | ... |