Commit 53913d11c246259af0f67e2a81be4148f3e1cb18
1 parent
931fe972
Exists in
master
and in
19 other branches
Style cleanup [skip ci]
Showing
3 changed files
with
4 additions
and
3 deletions
Show diff stats
CHANGELOG.md
lib/searchkick/query.rb
... | ... | @@ -551,7 +551,7 @@ module Searchkick |
551 | 551 | function_params = attributes.select { |k, _| [:origin, :scale, :offset, :decay].include?(k) } |
552 | 552 | function_params[:origin] = location_value(function_params[:origin]) |
553 | 553 | custom_filters << { |
554 | - :weight => attributes[:factor] || 1, | |
554 | + weight: attributes[:factor] || 1, | |
555 | 555 | attributes[:function] => { |
556 | 556 | field => function_params |
557 | 557 | } | ... | ... |
test/boost_test.rb
... | ... | @@ -198,8 +198,8 @@ class BoostTest < Minitest::Test |
198 | 198 | {name: "San Marino", latitude: 43.9333, longitude: 12.4667, found_rate: 0.2} |
199 | 199 | ] |
200 | 200 | |
201 | - assert_order "san", ["San Antonio","San Francisco", "San Marino"], boost_by: {found_rate: {factor: 100}},boost_by_distance: {location: {origin: [37, -122], scale: "1000mi"}} | |
202 | - assert_order "san", ["San Francisco", "San Antonio", "San Marino"], boost_by: {found_rate: {factor: 100}} , boost_by_distance: {location: {origin: [37, -122], scale: "1000mi", factor: 100}} | |
201 | + assert_order "san", ["San Antonio","San Francisco", "San Marino"], boost_by: {found_rate: {factor: 100}}, boost_by_distance: {location: {origin: [37, -122], scale: "1000mi"}} | |
202 | + assert_order "san", ["San Francisco", "San Antonio", "San Marino"], boost_by: {found_rate: {factor: 100}}, boost_by_distance: {location: {origin: [37, -122], scale: "1000mi", factor: 100}} | |
203 | 203 | end |
204 | 204 | |
205 | 205 | def test_boost_by_indices | ... | ... |