Postbox refs with full address leads to empty search results
What did you search for?
Different cities in germany with a parenthesis in the name.
- "21423 Winsen (Luhe) Bahnhofstraße 2".
https://www.openstreetmap.org/search?query=21423%20Winsen%20(Luhe)%20Bahnhofstra%C3%9Fe%202#map=19/53.36028/10.20633
- "29456 Hitzacker (Elbe) Gelderländer Straße 12"
https://www.openstreetmap.org/search?query=29456%20Hitzacker%20(Elbe)%20Gelderl%C3%A4nder%20Stra%C3%9Fe%2012#map=19/53.36028/10.20633
- "21423 Winsen (Luhe) Friedrich-Lichtenauer-Allee 1"
https://www.openstreetmap.org/search?query=%2721423%20Winsen%20(Luhe)%20Friedrich-Lichtenauer-Allee%201%27#map=19/53.35054/10.20039
What result did you get?
None.
What result did you expect?
- https://www.openstreetmap.org/way/96068117
- https://www.openstreetmap.org/way/277522980
- Multiple, i.e. https://www.openstreetmap.org/way/65085011
Further details
- addr:city of the mentioned result actually contains the full name of the city which is "Winsen (Luhe)".
The result is successful when omitting the parenthesis:
https://www.openstreetmap.org/search?query=%2721423%20Winsen%20Bahnhofstra%C3%9Fe%202%27#map=19/53.36028/10.20633
The search is also successful when putting the house number in front of the street name (which is not a valid way to format an address in germany):
https://www.openstreetmap.org/search?query=%2721423%20Winsen%20(Luhe)%202%20Bahnhofstra%C3%9Fe%27#map=19/53.36028/10.20633
Weirdly searching for housenumber 4 leads to the correct result:
https://www.openstreetmap.org/search?query=%2721423%20Winsen%20(Luhe)%20Bahnhofstra%C3%9Fe%204%27#map=19/53.36010/10.20639
The datasets for housenumbers 2 (https://www.openstreetmap.org/way/96068117) and 4 (https://www.openstreetmap.org/way/96068115) are identical.
-
The region (https://www.openstreetmap.org/relation/1821294) has the name Hitzacker with a name:suffix (Elbe)
-
like 1
Paranthesis have nothing to do with it.
The first issue is easily fixed by placing strategic commas, e.g.: https://nominatim.openstreetmap.org/ui/search.html?q=21423%2C+Winsen+%28Luhe%29+Bahnhofstra%C3%9Fe+2 (For reference, the reason Nominatim is thrown off is the odd ref mapping of postboxes in Winsen(Luhe), e.g. https://www.openstreetmap.org/node/2948710055. In the long run, Nominatim needs to detect those bogus refs and drop them.)
The second issue is a data issue: for Hitzacker, the name with suffix "(Elbe)" is missing. I see it is there on the place node, so #2637 will have fixed the issue already. Just needed a data update.
Thank you for your reply @lonvia!
- Unfortunately I cannot change the way the adress gets searched just now. I'd be happy to set a comma but I don't have access to the source code.
Could you elaborate on the ref problem?
Btw. I found another address that does not get found even though the house exists: '31542 Bad Nenndorf Bahnhofstraße 28'. Do you know why? Strategic comma helps as well but is out of my reach.
- Actually works now
Could you elaborate on the ref problem?
If you don't put commas into your query, Nominatim needs to determine the word boundaries by itself. It does so by looking into its database for all the full names, i.e. all what can be found in name tags in OSM. Normally that works well. '21423' is mapped as a postcode, 'Winsen(Luhe)' the name of the town etc. So the splitting into words is more or less obvious. But when objects are added that put a name combination in one of the name tags (including ref), there is suddenly an explosion of combinations, how the query can be split. Nominatim doesn't go through all of them but for performance reasons gives up before it gets to the right solution. It's a shortcoming in Nominatim and can (and eventually needs) to be improved. Trying to fix that on the data side would be fighting wind mills.
I found another address that does not get found even though the house exists: '31542 Bad Nenndorf Bahnhofstraße 28'.
Similar problem with a bus stop.