From b383d9ace1f948f99b6e3418ed1afc4d8eeb61e9 Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Sun, 14 Oct 2018 10:04:19 -0400 Subject: [PATCH] fix(autocomplete focus.point): Use 50km scale parameter The `scale` parameter controls how quickly scores decrease from the maximum as the distance from the `center_point` to the record in question increases. Set this to 50km, which is the same as search. Connects https://github.com/pelias/api/issues/1206 --- query/autocomplete_defaults.js | 2 +- test/unit/fixture/autocomplete_linguistic_focus.js | 2 +- test/unit/fixture/autocomplete_linguistic_focus_null_island.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/query/autocomplete_defaults.js b/query/autocomplete_defaults.js index e6364173..cddf94d7 100644 --- a/query/autocomplete_defaults.js +++ b/query/autocomplete_defaults.js @@ -28,7 +28,7 @@ module.exports = _.merge({}, peliasQuery.defaults, { 'focus:function': 'exp', 'focus:offset': '0km', - 'focus:scale': '250km', + 'focus:scale': '50km', 'focus:decay': 0.5, 'focus:weight': 15, diff --git a/test/unit/fixture/autocomplete_linguistic_focus.js b/test/unit/fixture/autocomplete_linguistic_focus.js index 4dd54d7c..9908d0b2 100644 --- a/test/unit/fixture/autocomplete_linguistic_focus.js +++ b/test/unit/fixture/autocomplete_linguistic_focus.js @@ -39,7 +39,7 @@ module.exports = { 'lon': -82.50622 }, 'offset': '0km', - 'scale': '250km', + 'scale': '50km', 'decay': 0.5 } }, diff --git a/test/unit/fixture/autocomplete_linguistic_focus_null_island.js b/test/unit/fixture/autocomplete_linguistic_focus_null_island.js index c623d272..43a90694 100644 --- a/test/unit/fixture/autocomplete_linguistic_focus_null_island.js +++ b/test/unit/fixture/autocomplete_linguistic_focus_null_island.js @@ -39,7 +39,7 @@ module.exports = { 'lon': 0 }, 'offset': '0km', - 'scale': '250km', + 'scale': '50km', 'decay': 0.5 } },