api
api copied to clipboard
Contracted separable street names working for autocomplete but not search
The address Grolmanstraße 1, 10623, Berlin, Germany
fails for /v1/search
when searching:
Grolmanstr. 1, 10623, Berlin, Germany.
This is an example of a wider bug which effects contracted separable street names.
note: this is not the case for /v1/autocomplete
Examples of different forms which should work for both endpoints:
- Grolmanstraße 1, 10623, Berlin, Germany
- Grolmanstrasse 1, 10623, Berlin, Germany
- Grolmanstr. 1, 10623, Berlin, Germany
- Grolmanstr 1, 10623, Berlin, Germany
- Grolman Straße 1, 10623, Berlin, Germany
- Grolman Strasse 1, 10623, Berlin, Germany
- Grolman Str. 1, 10623, Berlin, Germany
- Grolman Str 1, 10623, Berlin, Germany
Huh weird, I would have thought we handled that back in https://github.com/pelias/model/pull/119.
Looking at the raw response from Elasticsearch, we generate the following alt-names for the given address:
"name": {
"default": [
"1 Grolmanstraße",
"1 Grolman Straße"
]
},
So I can definitely see how that would work for autocomplete, but not search. I'm kinda hesitant to add tons of alt names until we fix https://github.com/pelias/pelias/issues/862 / https://github.com/pelias/openstreetmap/issues/507, but we could at least try adding another one for -str
?