Skip to content
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

Confidence seems to be calculated incorectly #1488

Closed
hannojg opened this issue Sep 10, 2020 · 3 comments
Closed

Confidence seems to be calculated incorectly #1488

hannojg opened this issue Sep 10, 2020 · 3 comments
Labels

Comments

@hannojg
Copy link

hannojg commented Sep 10, 2020

Describe the bug
We are searching for a venue with a focus point. The focus point is the city. The venue is a restaurant chain, so it has branches in many cities. We expect, that the restaurant at the focus point is the first result with the confidence of one. However, the first result is of a venue in a completely different city with confidence being 1.

Steps to Reproduce

  1. Run this query: https://pelias.github.io/compare/#/v1/search?layers=venue&focus.point.lat=53.867646&focus.point.lon=10.690266&text=Losteria
  2. The focus point is the city "Lübeck"
  3. You can see that the first result is the Losteria, Mannheim (very far away from the focused city "Lübeck") with a confidence of 1.

Expected behaviour
"Losteria, Lübeck" is the first entry with a confidence of 1 as the focal point is more close to this place than the other.

Environment (please complete the following information):

  • OS: Linux
  • Docker version 19.03.12, build 48a66213fe
  • docker-compose version 1.26.0, build d4451659
  • pelias api version: from git, commit 9c068de
  • pelias

Pastebin/Screenshots
Screenshot 2020-09-10 at 13 20 06

@hannojg hannojg added the bug label Sep 10, 2020
@missinglink
Copy link
Member

Hmm.. this is working correctly for autocomplete but not for search, it seems the only real difference in the scoring algorithm is the weight which is substantially more for autocomplete.

Screenshot 2020-09-10 at 14 19 00

cc/ @orangejulius should we consider increasing the weight for /v1/search?

thanks for the test case @hannojg

@missinglink
Copy link
Member

This is the relevant config variable, you can change it and restart the server: https://github.com/pelias/api/blob/master/query/search_defaults.js#L34

If you're running inside Docker it's a little trickier, you'll need to copy the file to your local machine, make the change and then bind mount it over the copy inside the container.

An example of such a 'bind mount' can be found here: https://github.com/pelias/docker/blob/master/projects/portland-metro/docker-compose.yml#L17

The location of that file inside the container is /home/pelias/query/search_defaults.js

@orangejulius
Copy link
Member

Hi folks!
This actually looks like a duplicate of pelias/openstreetmap#507: the restaurant from Mannheim has an alt_name: Losteria tag in OSM, so it gets a scoring boost for matching the text input twice.

Over in that issue I discussed the idea of doing some very basic work to detect near-duplicate alt-names like this, as a bit of a stopgap until we can implement the real fix of improving our alt-name system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants