From 492a9839ff254e0cceb67f91691a9cab24f068d5 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Fri, 17 Jan 2020 02:41:35 +0100 Subject: [PATCH] Backend: Increase location search radius to from 5 to 7 Signed-off-by: Michael Mayer --- internal/query/geo.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/query/geo.go b/internal/query/geo.go index e81bfa731..81541786c 100644 --- a/internal/query/geo.go +++ b/internal/query/geo.go @@ -49,10 +49,10 @@ func (s *Repo) Geo(f form.GeoSearch) (results []GeoResult, err error) { } if f.S2 != "" { - s2Min, s2Max := s2.Range(f.S2, 5) + s2Min, s2Max := s2.Range(f.S2, 7) q = q.Where("photos.location_id BETWEEN ? AND ?", s2Min, s2Max) } else if f.Olc != "" { - s2Min, s2Max := s2.Range(pluscode.S2(f.Olc), 5) + s2Min, s2Max := s2.Range(pluscode.S2(f.Olc), 7) q = q.Where("photos.location_id BETWEEN ? AND ?", s2Min, s2Max) } else { // Inaccurate distance search, but probably 'good enough' for now