X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/26ee6b6dde8d27107f8d536778b42546c51419be..1f0e1bec0ee66df7641e53c6b55e84d7eb88cec2:/nominatim/api/reverse.py diff --git a/nominatim/api/reverse.py b/nominatim/api/reverse.py index 1c9cd4c1..42fe8f36 100644 --- a/nominatim/api/reverse.py +++ b/nominatim/api/reverse.py @@ -500,7 +500,8 @@ class ReverseGeocoder: .where(t.c.rank_address == 4)\ .where(t.c.rank_search == 4)\ .where(t.c.linked_place_id == None)\ - .order_by('distance') + .order_by('distance')\ + .limit(1) sql = self._add_geometry_columns(sql, t.c.geometry)