Commit af84197c56ce4af163f3d222474db1a1bd1fd4cb
1 parent
a723391b
Exists in
master
and in
18 other branches
Support more boost_by_distance options
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
lib/searchkick/query.rb
... | ... | @@ -583,7 +583,8 @@ module Searchkick |
583 | 583 | unless attributes[:origin] |
584 | 584 | raise ArgumentError, "boost_by_distance requires :origin" |
585 | 585 | end |
586 | - function_params = attributes.select { |k, _| [:origin, :scale, :offset, :decay].include?(k) } | |
586 | + | |
587 | + function_params = attributes.except(:factor, :function) | |
587 | 588 | function_params[:origin] = location_value(function_params[:origin]) |
588 | 589 | custom_filters << { |
589 | 590 | weight: attributes[:factor] || 1, | ... | ... |