Skip to content

Commit

Permalink
Match the postcode expected count threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
pawel-wroniszewski committed Oct 31, 2024
1 parent d607f0e commit 4865156
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nominatim_api/search/db_searches.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ def _inner_search_name_cte(self, conn: SearchConnection,
if self.postcodes:
# if a postcode is given, don't search for state or country level objects
sql = sql.where(t.c.address_rank > 9)
if self.expected_count > 10000:
if self.expected_count > 30000:
# Many results expected. Restrict by postcode.
tpc = conn.t.postcode
sql = sql.where(sa.select(tpc.c.postcode)
Expand Down

0 comments on commit 4865156

Please sign in to comment.