do not restrict by viewbox when housenumber or postcode is available

Fixes #3274.
This commit is contained in:
Sarah Hoffmann
2024-01-06 16:53:48 +01:00
parent f03ec3ea12
commit 7eb04f67e2

View File

@@ -663,7 +663,7 @@ class PlaceSearch(AbstractSearch):
sql = sql.where(tsearch.c.centroid
.intersects(VIEWBOX_PARAM,
use_index=details.viewbox.area < 0.2))
elif self.expected_count >= 10000:
elif not self.postcodes and not self.housenumbers and self.expected_count >= 10000:
sql = sql.where(tsearch.c.centroid
.intersects(VIEWBOX2_PARAM,
use_index=details.viewbox.area < 0.5))