]> git.openstreetmap.org Git - nominatim.git/commitdiff
don't even try heavily penalized searches
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 26 Mar 2024 21:00:25 +0000 (22:00 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Tue, 26 Mar 2024 21:00:25 +0000 (22:00 +0100)
nominatim/api/search/geocoder.py

index 711f83833f9408ff980c29f5eeca046b8baa28d6..775606aab755d6f68180e696828115c285a99f11 100644 (file)
@@ -95,7 +95,7 @@ class ForwardGeocoder:
                     prevresult.accuracy = min(prevresult.accuracy, result.accuracy)
                 else:
                     results[rhash] = result
-                min_ranking = min(min_ranking, result.accuracy * 1.2)
+                min_ranking = min(min_ranking, result.accuracy * 1.2, 2.0)
             log().result_dump('Results', ((r.accuracy, r) for r in lookup_results))
             prev_penalty = search.penalty
             if dt.datetime.now() >= end_time: