X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/0a2d0c3b5c9253e124d387486fdf4f26ccf75572..44da684d1dfc57c085f6544d615374e97d8e96db:/nominatim/api/search/db_searches.py?ds=sidebyside diff --git a/nominatim/api/search/db_searches.py b/nominatim/api/search/db_searches.py index 4d893962..1f7eb009 100644 --- a/nominatim/api/search/db_searches.py +++ b/nominatim/api/search/db_searches.py @@ -271,7 +271,7 @@ class NearSearch(AbstractSearch): """ table = await conn.get_class_table(*category) - t = conn.t.placex.alias('p') + t = conn.t.placex tgeom = conn.t.placex.alias('pgeom') sql = _select_placex(t).where(tgeom.c.place_id.in_(ids))\ @@ -685,7 +685,8 @@ class PlaceSearch(AbstractSearch): if self.qualifiers: place_sql = place_sql.where(self.qualifiers.sql_restrict(thnr)) - numerals = [int(n) for n in self.housenumbers.values if n.isdigit()] + numerals = [int(n) for n in self.housenumbers.values + if n.isdigit() and len(n) < 8] interpol_sql: SaColumn tiger_sql: SaColumn if numerals and \