Backend: Increase location search radius to from 5 to 7
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
parent
63d8aedfbe
commit
492a9839ff
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue