]> git.openstreetmap.org Git - nominatim.git/blobdiff - src/nominatim_api/search/db_search_builder.py
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / src / nominatim_api / search / db_search_builder.py
index 4987f156e9b9a6e134e56a48dafade15729165ab..c63803d21b6d10935c3cdc9f758caed48d91c308 100644 (file)
@@ -227,7 +227,7 @@ class SearchBuilder:
 
         # To catch remaining results, lookup by name and address
         # We only do this if there is a reasonable number of results expected.
-        exp_count = exp_count / (2**len(addr_tokens)) if addr_tokens else exp_count
+        exp_count /= 2**len(addr_tokens)
         if exp_count < 10000 and addr_count < 20000:
             penalty += 0.35 * max(1 if name_fulls else 0.1,
                                   5 - len(name_partials) - len(addr_tokens))