Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there, this is the PR for #1567
I kept in mind what @orangejulius says in #1567 (comment):
I did several tests to find out what would be the best configuration.
Results with population and popularity boost
I started by decreasing population and popularity boosts as I said in my issue. I tried with three values, 8, 10 and 12 and ran acceptance tests (issues are from
autocomplete_acushnet_antiques.json
andautocomplete_focus.json
).With boost decreased to 10 for popularity and population I had 2 improvements, 1 regression and 2 changes.
Improvements
/v1/autocomplete?focus.point.lat=41.652889&focus.point.lon=-70.922898&text=antiq
/v1/autocomplete?focus.point.lat=41.652889&focus.point.lon=-70.922898&text=antique
There is no doubt, this is an improvement
Regressions
/v1/autocomplete?focus.point.lat=40.744131&focus.point.lon=-73.990424&text=San Francisco
This one is very weird,
South San Francisco
took the place ofSan Francisco
...Change
/v1/autocomplete?focus.point.lat=41.05343&focus.point.lon=-73.53873&text=New York
Here the new position of New York City is 42 ! This may be considered as a regression, that's why I will not chose this configuration.
/v1/autocomplete?focus.point.lat=41.05343&focus.point.lon=-73.53873&text=New York, NY
Here New York is loosing one place, but still good enough. At this point I decided to change my mind and increase focus point instead of decreasing population/popularity.
Results with focus point increase weight
So now I want to have the same scale between focus point boosts and population/popularity, so I set the weight of focust point to 20. With this configuration I had 2 improvements, 0 regression 🎉 and 1 change.
Improvements
/v1/autocomplete?focus.point.lat=41.652889&focus.point.lon=-70.922898&text=antiq
/v1/autocomplete?focus.point.lat=41.652889&focus.point.lon=-70.922898&text=antique
There is no doubt, this is still an improvement
Regressions
No regressions ✔️
Change
/v1/autocomplete?focus.point.lat=41.05343&focus.point.lon=-73.53873&text=New York
Here New York is loosing one place, but still good enough.
Resume
So instead of decreasing population and popularity boosts, I chose to increase focus point weight. The overall result seems good and close to current responses.
Results are also better in my initial test with
Vars
(the lang is important here)./v1/autocomplete?lang=fr&focus.point.lat=48.03661925338169&focus.point.lon=6.580299229512&text=vars
📝 TODO: write acceptance test for
Vars
related #1567