You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 ;))
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.
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.
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)
The text was updated successfully, but these errors were encountered: