]> git.openstreetmap.org Git - nominatim.git/commitdiff
only print non-empty search tables
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 1 Aug 2023 13:29:00 +0000 (15:29 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 2 Aug 2023 07:25:47 +0000 (09:25 +0200)
nominatim/api/search/geocoder.py

index 0ef649d99ab8857924ef7d86bc3aa96865608666..d341b6cd3532f52c8e69f0a3fb93b8cb13f37b6b 100644 (file)
@@ -55,8 +55,9 @@ class ForwardGeocoder:
             num_searches = 0
             for assignment in yield_token_assignments(query):
                 searches.extend(search_builder.build(assignment))
-                log().table_dump('Searches for assignment',
-                                 _dump_searches(searches, query, num_searches))
+                if num_searches < len(searches):
+                    log().table_dump('Searches for assignment',
+                                     _dump_searches(searches, query, num_searches))
                 num_searches = len(searches)
             searches.sort(key=lambda s: s.penalty)