]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/api/results.py
Merge pull request #3347 from lonvia/tweak-boundary-imports
[nominatim.git] / nominatim / api / results.py
index 829008fb3ec316a09a753b39cb720404b1c8d98b..fa861bf3fafbe0a90d736e19491bf83c0cd317e6 100644 (file)
@@ -233,7 +233,7 @@ class BaseResult:
             of the value or an artificial value computed from the place's
             search rank.
         """
-        return self.importance or (0.7500001 - (self.rank_search/40.0))
+        return self.importance or (0.40001 - (self.rank_search/75.0))
 
 
     def localize(self, locales: Locales) -> None:
@@ -590,7 +590,7 @@ async def complete_address_details(conn: SearchConnection, results: List[BaseRes
         return
 
     ltab = sa.func.JsonArrayEach(sa.type_coerce(lookup_ids, sa.JSON))\
-             .table_valued(sa.column('value', type_=sa.JSON)) # type: ignore[no-untyped-call]
+             .table_valued(sa.column('value', type_=sa.JSON))
 
     t = conn.t.placex
     taddr = conn.t.addressline
@@ -653,7 +653,7 @@ async def complete_address_details(conn: SearchConnection, results: List[BaseRes
     parent_lookup_ids = list(filter(lambda e: e['pid'] != e['lid'], lookup_ids))
     if parent_lookup_ids:
         ltab = sa.func.JsonArrayEach(sa.type_coerce(parent_lookup_ids, sa.JSON))\
-                 .table_valued(sa.column('value', type_=sa.JSON)) # type: ignore[no-untyped-call]
+                 .table_valued(sa.column('value', type_=sa.JSON))
         sql = sa.select(ltab.c.value['pid'].as_integer().label('src_place_id'),
                         t.c.place_id, t.c.osm_type, t.c.osm_id, t.c.name,
                         t.c.class_, t.c.type, t.c.extratags,