-
-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible focus point query improvements #1205
Comments
orangejulius
added a commit
to pelias/acceptance-tests
that referenced
this issue
May 14, 2019
They all seem to be connected to popularity or focus points. Perhaps related to pelias/api#1205
orangejulius
added a commit
to pelias/acceptance-tests
that referenced
this issue
May 14, 2019
They all seem to be connected to popularity or focus points. Perhaps related to pelias/api#1205
orangejulius
added a commit
to pelias/acceptance-tests
that referenced
this issue
May 14, 2019
They all seem to be connected to popularity or focus points. Perhaps related to pelias/api#1205
orangejulius
changed the title
Possible autocomplete focus point query improvements
Possible focus point query improvements
May 4, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
The way we calculate focus point bias today is by adding together scores for text match quality and distance from the focus point. Due to the way Elasticsearch calculates scores, these values are often of completely different magnitudes. This can result in one of two problems:
Details
A rough outline of our current autocomplete query structure when using a focus point is as follows:
comments represent placeholders for complicated query logic
Elasticsearch offers guidance that scores from different queries generally cannot be compared.
While the clauses are composed into a single query, for the purposes of scoring, we can also treat the sub-clauses as their own query. I believe this leads to incorrect results.
Potential solution
Instead, I think it would be valuable (and much simpler) if the
function_score
query wrapped all the text matching query clauses. For example, something like this:The primary change is that the focus point function score has been brought to the top level, and the
boost_mode
has been changed tomultiply
.Examples
At the moment, I don't have any "off the shelf" examples that I believe come down entirely to this issue, but will update the issue if I find any. When I've observed this, it has been during development while tweaking other parameters, so hard to duplicate.
At the moment, I think pelias/pelias#862 and pelias/pelias#849 are generally masking cases where this will become an issue after solving them. We should probably look at those first.
The text was updated successfully, but these errors were encountered: