From abb4fa6113f0ef4b4b8595223b4df0075bcc0278 Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Thu, 17 Nov 2016 17:22:04 -0500 Subject: [PATCH] Adjust autocomplete focus boost This lowers the autocomplete focus boost from 40 to 15. The idea is that, because the boost for population is 20, the focus can't possibly override a popular city, but it can come close. On our default dev build, no acceptance tests fail but the san francisco autocomplete test now passes! It's not clear if this fixes WOF venue issues yet, since the latest build there failed :( --- 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 2800141b..34f396ae 100644 --- a/query/autocomplete_defaults.js +++ b/query/autocomplete_defaults.js @@ -31,7 +31,7 @@ module.exports = _.merge({}, peliasQuery.defaults, { 'focus:offset': '0km', 'focus:scale': '250km', 'focus:decay': 0.5, - 'focus:weight': 40, + 'focus:weight': 15, 'function_score:score_mode': 'avg', 'function_score:boost_mode': 'replace', diff --git a/test/unit/fixture/autocomplete_linguistic_focus.js b/test/unit/fixture/autocomplete_linguistic_focus.js index 07c741d7..d6aa0aa7 100644 --- a/test/unit/fixture/autocomplete_linguistic_focus.js +++ b/test/unit/fixture/autocomplete_linguistic_focus.js @@ -44,7 +44,7 @@ module.exports = { 'decay': 0.5 } }, - 'weight': 40 + 'weight': 15 }], 'score_mode': 'avg', 'boost_mode': 'replace', diff --git a/test/unit/fixture/autocomplete_linguistic_focus_null_island.js b/test/unit/fixture/autocomplete_linguistic_focus_null_island.js index b0761f40..8dd3f1e6 100644 --- a/test/unit/fixture/autocomplete_linguistic_focus_null_island.js +++ b/test/unit/fixture/autocomplete_linguistic_focus_null_island.js @@ -44,7 +44,7 @@ module.exports = { 'decay': 0.5 } }, - 'weight': 40 + 'weight': 15 }], 'score_mode': 'avg', 'boost_mode': 'replace',