Skip to content

Item is missing when searching with default language and present with any other language setting #640

@git-commit

Description

@git-commit

When trying out photon I stumbled across inconsistencies with the returned items when the language header is missing or the language is set to default.

An example of this behaviour can be observed with these two queries:

https://photon.komoot.io/api/?q=rewe%20worms&lat=8.32932446362749&lon=49.61427555&lang=de
https://photon.komoot.io/api/?q=rewe%20worms&lat=8.32932446362749&lon=49.61427555&lang=default

There seems to be a difference between lang=default and lang={de,fr,en}, where the latter all return the expected top item.
Specifically the top hit of the german language result is missing from the default language (OSM ID: 3760787919).
See the attached diff. Green lines are additional items only present when a language is set.

--- default.json	2022-02-17 17:30:08.494200300 +0100
+++ de.json	2022-02-17 17:30:02.652937500 +0100
@@ -1,173 +1,419 @@
 {
     "features": [
         {
             "geometry": {
                 "coordinates": [
+                    8.347109,
+                    49.6356295
+                ],
+                "type": "Point"
+            },
+            "type": "Feature",
+            "properties": {
+                "osm_id": 3760787919,
+                "country": "Deutschland",
+                "city": "Worms",
+                "countrycode": "DE",
+                "postcode": "67549",
+                "type": "house",
+                "osm_type": "N",
+                "osm_key": "shop",
+                "housenumber": "8",
+                "street": "Bebelstraße",
+                "district": "Innenstadt-West",
+                "osm_value": "supermarket",
+                "name": "Rewe Rodriguez",
+                "state": "Rheinland-Pfalz"
+            }
+        },
+        {
+            "geometry": {
+                "coordinates": [
                     8.1017907,
                     49.739473
                 ],
                 "type": "Point"
             },
             "type": "Feature",
             "properties": {
                 "osm_id": 9263353737,
                 "country": "Deutschland",
                 "city": "Alzey",
                 "countrycode": "DE",
                 "postcode": "55232",
                 "county": "Landkreis Alzey-Worms",
                 "type": "house",
                 "osm_type": "N",
                 "osm_key": "highway",
                 "street": "Wilhelm-Leuschner-Straße",
                 "osm_value": "bus_stop",
                 "name": "REWE Markt",
                 "state": "Rheinland-Pfalz"
             }
         },
         {
             "geometry": {
                 "coordinates": [
+                    8.255338044250623,
+                    49.70327295
+                ],
+                "type": "Point"
+            },
+            "type": "Feature",
+            "properties": {
+                "osm_id": 92716709,
+                "extent": [
+                    8.2548425,
+                    49.7035449,
+                    8.2558336,
+                    49.7030011
+                ],
+                "country": "Deutschland",
+                "city": "Westhofen",
+                "countrycode": "DE",
+                "postcode": "67593",
+                "county": "Landkreis Alzey-Worms",
+                "type": "house",
+                "osm_type": "W",
+                "osm_key": "shop",
+                "housenumber": "2",
+                "street": "An der Brennerei",
+                "osm_value": "supermarket",
+                "name": "REWE",
+                "state": "Rheinland-Pfalz"
+            }
+        },
+        {
+            "geometry": {
+                "coordinates": [
+                    8.32932446362749,
+                    49.61427555
+                ],
+                "type": "Point"
+            },
+            "type": "Feature",
+            "properties": {
+                "osm_id": 263458970,
+                "extent": [
+                    8.329072,
+                    49.614444,
+                    8.3297102,
+                    49.6138524
+                ],
+                "country": "Deutschland",
+                "city": "Worms",
+                "countrycode": "DE",
+                "postcode": "67551",
+                "type": "house",
+                "osm_type": "W",
+                "osm_key": "shop",
+                "housenumber": "90",
+                "street": "Kolpingstraße",
+                "district": "Horchheim",
+                "osm_value": "supermarket",
+                "name": "REWE",
+                "state": "Rheinland-Pfalz"
+            }
+        },
+        {
+            "geometry": {
+                "coordinates": [
+                    8.113043859472903,
+                    49.84437295
+                ],
+                "type": "Point"
+            },
+            "type": "Feature",
+            "properties": {
+                "osm_id": 93122355,
+                "extent": [
+                    8.1126669,
+                    49.8447412,
+                    8.1134208,
+                    49.8440048
+                ],
+                "country": "Deutschland",
+                "city": "Wörrstadt",
+                "countrycode": "DE",
+                "postcode": "55286",
+                "county": "Landkreis Alzey-Worms",
+                "type": "house",
+                "osm_type": "W",
+                "osm_key": "shop",
+                "housenumber": "81",
+                "street": "Friedrich-Ebert-Straße",
+                "osm_value": "supermarket",
+                "name": "REWE",
+                "state": "Rheinland-Pfalz"
+            }
+        },
+        {
+            "geometry": {
+                "coordinates": [
                     8.100618018238372,
                     49.740460999999996
                 ],
                 "type": "Point"
             },
             "type": "Feature",
             "properties": {
                 "osm_id": 329059041,
                 "extent": [
                     8.1003758,
                     49.7406577,
                     8.1008585,
                     49.7402432
                 ],
                 "country": "Deutschland",
                 "city": "Alzey",
                 "countrycode": "DE",
                 "postcode": "55232",
                 "county": "Landkreis Alzey-Worms",
                 "type": "house",
                 "osm_type": "W",
                 "osm_key": "shop",
                 "street": "Wilhelm-Leuschner-Straße",
                 "osm_value": "beverages",
                 "name": "REWE Getränkemarkt",
                 "state": "Rheinland-Pfalz"
             }
         },
         {
             "geometry": {
                 "coordinates": [
+                    8.188491164372667,
+                    49.7776827
+                ],
+                "type": "Point"
+            },
+            "type": "Feature",
+            "properties": {
+                "osm_id": 66941623,
+                "extent": [
+                    8.1879915,
+                    49.7781287,
+                    8.1889299,
+                    49.7774186
+                ],
+                "country": "Deutschland",
+                "city": "Gau-Odernheim",
+                "countrycode": "DE",
+                "postcode": "55239",
+                "county": "Landkreis Alzey-Worms",
+                "type": "house",
+                "osm_type": "W",
+                "osm_key": "man_made",
+                "housenumber": "31",
+                "street": "Bahnstraße",
+                "district": "Gau-Köngernheim",
+                "osm_value": "surveillance",
+                "name": "REWE",
+                "state": "Rheinland-Pfalz"
+            }
+        },
+        {
+            "geometry": {
+                "coordinates": [
+                    8.3845894,
+                    49.7432109
+                ],
+                "type": "Point"
+            },
+            "type": "Feature",
+            "properties": {
+                "osm_id": 7599698606,
+                "country": "Deutschland",
+                "city": "Eich",
+                "countrycode": "DE",
+                "postcode": "67575",
+                "county": "Landkreis Alzey-Worms",
+                "type": "house",
+                "osm_type": "N",
+                "osm_key": "shop",
+                "housenumber": "1",
+                "street": "In der Hochgewann",
+                "osm_value": "supermarket",
+                "name": "Rewe",
+                "state": "Rheinland-Pfalz"
+            }
+        },
+        {
+            "geometry": {
+                "coordinates": [
                     8.3474491,
                     49.6320007
                 ],
                 "type": "Point"
             },
             "type": "Feature",
             "properties": {
                 "osm_id": 5860276188,
                 "country": "Deutschland",
                 "city": "Worms",
                 "countrycode": "DE",
                 "postcode": "67549",
                 "type": "house",
                 "osm_type": "N",
                 "osm_key": "shop",
                 "street": "Alzeyer Straße",
                 "district": "Innenstadt-West",
                 "osm_value": "convenience",
                 "name": "REWE To Go",
                 "state": "Rheinland-Pfalz"
             }
         },
         {
             "geometry": {
                 "coordinates": [
+                    8.188491164372667,
+                    49.7776827
+                ],
+                "type": "Point"
+            },
+            "type": "Feature",
+            "properties": {
+                "osm_id": 66941623,
+                "extent": [
+                    8.1879915,
+                    49.7781287,
+                    8.1889299,
+                    49.7774186
+                ],
+                "country": "Deutschland",
+                "city": "Gau-Odernheim",
+                "countrycode": "DE",
+                "postcode": "55239",
+                "county": "Landkreis Alzey-Worms",
+                "type": "house",
+                "osm_type": "W",
+                "osm_key": "shop",
+                "housenumber": "31",
+                "street": "Bahnstraße",
+                "district": "Gau-Köngernheim",
+                "osm_value": "supermarket",
+                "name": "REWE",
+                "state": "Rheinland-Pfalz"
+            }
+        },
+        {
+            "geometry": {
+                "coordinates": [
+                    8.338724519868514,
+                    49.64937705
+                ],
+                "type": "Point"
+            },
+            "type": "Feature",
+            "properties": {
+                "osm_id": 262350366,
+                "extent": [
+                    8.338198,
+                    49.6495782,
+                    8.3392649,
+                    49.6491648
+                ],
+                "country": "Deutschland",
+                "city": "Worms",
+                "countrycode": "DE",
+                "postcode": "67550",
+                "type": "house",
+                "osm_type": "W",
+                "osm_key": "shop",
+                "housenumber": "3",
+                "street": "Dr.-Carl-Sonnenschein-Straße",
+                "district": "Herrnsheim",
+                "osm_value": "supermarket",
+                "name": "Rewe",
+                "state": "Rheinland-Pfalz"
+            }
+        },
+        {
+            "geometry": {
+                "coordinates": [
                     8.1645288,
                     49.8757692
                 ],
                 "type": "Point"
             },
             "type": "Feature",
             "properties": {
                 "osm_id": 734057691,
                 "country": "Deutschland",
                 "city": "Saulheim",
                 "countrycode": "DE",
                 "postcode": "55291",
                 "county": "Landkreis Alzey-Worms",
                 "type": "house",
                 "osm_type": "N",
                 "osm_key": "shop",
                 "street": "Marie-Curie-Ring",
                 "osm_value": "supermarket",
                 "name": "Rewe",
                 "state": "Rheinland-Pfalz"
             }
         },
         {
             "geometry": {
                 "coordinates": [
                     8.163955394398851,
                     49.87585765
                 ],
                 "type": "Point"
             },
             "type": "Feature",
             "properties": {
                 "osm_id": 59190638,
                 "extent": [
                     8.1636344,
                     49.876129,
                     8.1645499,
                     49.8756643
                 ],
                 "country": "Deutschland",
                 "city": "Saulheim",
                 "countrycode": "DE",
                 "postcode": "55291",
                 "county": "Landkreis Alzey-Worms",
                 "type": "house",
                 "osm_type": "W",
                 "osm_key": "amenity",
                 "street": "Marie-Curie-Ring",
                 "osm_value": "parking",
                 "name": "REWE",
                 "state": "Rheinland-Pfalz"
             }
         },
         {
             "geometry": {
                 "coordinates": [
                     8.101649515275245,
                     49.740010299999994
                 ],
                 "type": "Point"
             },
             "type": "Feature",
             "properties": {
                 "osm_id": 252275813,
                 "extent": [
                     8.1012376,
                     49.7402462,
                     8.1020056,
                     49.7397955
                 ],
                 "country": "Deutschland",
                 "city": "Alzey",
                 "countrycode": "DE",
                 "postcode": "55232",
                 "county": "Landkreis Alzey-Worms",
                 "type": "house",
                 "osm_type": "W",
                 "osm_key": "shop",
                 "street": "Wilhelm-Leuschner-Straße",
                 "osm_value": "supermarket",
                 "name": "REWE",
                 "state": "Rheinland-Pfalz"
             }
         }
     ],
     "type": "FeatureCollection"
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions