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

Optional housenumber has greater weight than optional postcode in search #2771

Open
lonvia opened this issue Jul 19, 2022 · 5 comments
Open
Milestone

Comments

@lonvia
Copy link
Member

lonvia commented Jul 19, 2022

this seems to happen regularly when the correct address isn't available on house number granularity.

E.g.
https://nominatim.openstreetmap.org/ui/search.html?street=Mainstra%C3%9Fe+8&city=Bamberg&country=Deutschland&postalcode=96052 (list of results with correct street on first position)
https://nominatim.openstreetmap.org/ui/search.html?street=Mainstra%C3%9Fe+8&city=Bamberg&country=Deutschland&postalcode=96052&limit=1 (any Mainstraße 8 with wrong postal code and city)

after mapping the house number, this would work (verifiable with house number 10 instead of 8). I've faced some further examples with many 100km deviation.


Wouldn't it be possible to provide a query which retrieves all results from the database but the api only returns the best result (also in regard to reliability)?

Of course I could just change my code to always query for the whole list and just keep the first entry - but this seems to be a common pitfall a lot of people will discover (or they'll never discover and work with the wrong results instead ;))

Originally posted by @PhilHamm in #882 (comment)

@lonvia
Copy link
Member Author

lonvia commented Jul 19, 2022

The desired results doesn't show up because there are quite a few Mainstrasse 8 in the 'Landkreis Bamberg'. The initial search on search_name prioritizes these results. We probably need an ordering that produces a match score that takes all factors (is there a housenumber? How close is the postcode? How many exact matches are there?) into account and produces a single number from them.

@PhilHamm
Copy link

Thanks @lonvia for creating the ticket!

In case it helps: here's another example which shows that the first list entry could also result in a different county 125km away from the actual address.

https://nominatim.openstreetmap.org/ui/search.html?street=Heinrich-Hertz-Stra%C3%9Fe+6&city=Schleswig&country=Deutschland&postalcode=24837
https://nominatim.openstreetmap.org/ui/search.html?street=Heinrich-Hertz-Stra%C3%9Fe+6&city=Schleswig&country=Deutschland&postalcode=24837&limit=1

@karlvr

This comment was marked as off-topic.

@karlvr

This comment was marked as off-topic.

@lonvia

This comment was marked as off-topic.

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

No branches or pull requests

3 participants