Open orangejulius opened 6 years ago
Nice, glad to see there's some progress on this! Here are some issues we hear about often from our customers (maybe this will help in your tests):
Birmingham
is problematic for US and UK customers, as they obviously prefer to see their country's city.93277
is another search. Both US and Finland have this postal code.
The
scale
parameter to ourcenter_point
calculations used when users pass afocus.point
parameter differs on search and autocomplete:Both changes date back to 2015, and there's no immediately obvious reason why they are at those particular values, let alone different values.
Relevant Elasticsearch documentation: The Closer, The Better
Additionally, we should consider carefully if the
linear
decay function is what we want. As it stands, no focus boosting is applied to results at a distance over 2x thescale
parameter, so 100km for search, and 500km for autocomplete.It might make sense to switch to the
exponential
decay function, which would allow even very far away results to be compared by distance. A particularly relevant use case here is for postal codes. There are often duplicate postal codes in different places of the world, so even a slight score difference based on distance would allow us to properly order postal code results from different countries.Also worth noting, this may have overlap with #1205