]> git.openstreetmap.org Git - nominatim.git/commitdiff
increase threshold for full name searches
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 14 Jul 2023 19:03:42 +0000 (21:03 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Mon, 17 Jul 2023 14:27:25 +0000 (16:27 +0200)
They still should be preferrred over expensive partial name searches.

nominatim/api/search/db_search_builder.py

index f485de0914a0fce3348f01fe8adce65e214c034e..794012b072f3302279faf803a8fe9565b0cceed4 100644 (file)
@@ -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: