api icon indicating copy to clipboard operation
api copied to clipboard

Contracted separable street names working for autocomplete but not search

Open missinglink opened this issue 2 years ago • 1 comments

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

missinglink avatar Sep 20 '21 18:09 missinglink

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?

orangejulius avatar Sep 20 '21 18:09 orangejulius