From a8de040b29e18a9bf916e65a12b293b708b9f5cd Mon Sep 17 00:00:00 2001 From: Zarino Zappia Date: Tue, 25 Feb 2020 14:59:49 +0000 Subject: Optional logging of unsuccessful location searches If a SQLite file exists at `../data/analytics.sqlite` with a table named `location_searches_with_no_results`, then a row will be created for each /around search that returns no results. Could come in useful for anybody running an instance and looking to better understand how well their geocoder is performing. --- perllib/FixMyStreet/Geocode/Zurich.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'perllib/FixMyStreet/Geocode/Zurich.pm') diff --git a/perllib/FixMyStreet/Geocode/Zurich.pm b/perllib/FixMyStreet/Geocode/Zurich.pm index 0b85ab7b2..b0c0b528e 100644 --- a/perllib/FixMyStreet/Geocode/Zurich.pm +++ b/perllib/FixMyStreet/Geocode/Zurich.pm @@ -97,6 +97,7 @@ sub string { my $cache_dir = path(FixMyStreet->config('GEO_CACHE'), 'zurich')->absolute(FixMyStreet->path_to()); my $cache_file = $cache_dir->child(md5_hex($s)); my $result; + $c->stash->{geocoder_url} = $s; if (-s $cache_file && -M $cache_file <= 7 && !FixMyStreet->config('STAGING_SITE')) { $result = retrieve($cache_file); } else { -- cgit v1.2.3