From: Sarah Hoffmann Date: Fri, 14 Jul 2023 19:03:42 +0000 (+0200) Subject: increase threshold for full name searches X-Git-Tag: v4.3.0~51^2~9 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/8a36ed4f6ff5d16ddfd7fab7dc92b5a409b2cf5b increase threshold for full name searches They still should be preferrred over expensive partial name searches. --- diff --git a/nominatim/api/search/db_search_builder.py b/nominatim/api/search/db_search_builder.py index f485de09..794012b0 100644 --- a/nominatim/api/search/db_search_builder.py +++ b/nominatim/api/search/db_search_builder.py @@ -220,7 +220,7 @@ class SearchBuilder: # Partial term to frequent. Try looking up by rare full names first. name_fulls = self.query.get_tokens(name, TokenType.WORD) - rare_names = list(filter(lambda t: t.count < 1000, name_fulls)) + rare_names = list(filter(lambda t: t.count < 10000, name_fulls)) # At this point drop unindexed partials from the address. # This might yield wrong results, nothing we can do about that. if not partials_indexed: