From 2171b385519841af0e175d88e51741c5322fba25 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Tue, 1 Aug 2023 15:29:00 +0200 Subject: [PATCH] only print non-empty search tables --- nominatim/api/search/geocoder.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nominatim/api/search/geocoder.py b/nominatim/api/search/geocoder.py index 0ef649d9..d341b6cd 100644 --- a/nominatim/api/search/geocoder.py +++ b/nominatim/api/search/geocoder.py @@ -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) -- 2.39.5