mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-11 21:34:06 +00:00
always use lookup when requested
Doesn't seem to cause any issues in production.
This commit is contained in:
@@ -264,16 +264,9 @@ class SearchBuilder:
|
|||||||
address lookups will use the index, when the occurrences are not
|
address lookups will use the index, when the occurrences are not
|
||||||
too many.
|
too many.
|
||||||
"""
|
"""
|
||||||
# At this point drop unindexed partials from the address.
|
|
||||||
# This might yield wrong results, nothing we can do about that.
|
|
||||||
if use_lookup:
|
if use_lookup:
|
||||||
addr_restrict_tokens = []
|
addr_restrict_tokens = []
|
||||||
addr_lookup_tokens = []
|
addr_lookup_tokens = [t.token for t in addr_partials]
|
||||||
for t in addr_partials:
|
|
||||||
if t.addr_count > 20000:
|
|
||||||
addr_restrict_tokens.append(t.token)
|
|
||||||
else:
|
|
||||||
addr_lookup_tokens.append(t.token)
|
|
||||||
else:
|
else:
|
||||||
addr_restrict_tokens = [t.token for t in addr_partials]
|
addr_restrict_tokens = [t.token for t in addr_partials]
|
||||||
addr_lookup_tokens = []
|
addr_lookup_tokens = []
|
||||||
|
|||||||
Reference in New Issue
Block a user