]> git.openstreetmap.org Git - nominatim.git/commitdiff
always use lookup when requested
authorSarah Hoffmann <lonvia@denofr.de>
Mon, 31 Mar 2025 09:15:26 +0000 (11:15 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Mon, 31 Mar 2025 09:38:21 +0000 (11:38 +0200)
Doesn't seem to cause any issues in production.

src/nominatim_api/search/db_search_builder.py

index 1e94495871604219b4d1135466ed43e9375e1d21..4dcaf14dc3b89c9a4f9845c19a1314b47dcf4864 100644 (file)
@@ -264,16 +264,9 @@ class SearchBuilder:
             address lookups will use the index, when the occurrences are not
             too many.
         """
             address lookups will use the index, when the occurrences are not
             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:
             addr_restrict_tokens = []
         if use_lookup:
             addr_restrict_tokens = []
-            addr_lookup_tokens = []
-            for t in addr_partials:
-                if t.addr_count > 20000:
-                    addr_restrict_tokens.append(t.token)
-                else:
-                    addr_lookup_tokens.append(t.token)
+            addr_lookup_tokens = [t.token for t in addr_partials]
         else:
             addr_restrict_tokens = [t.token for t in addr_partials]
             addr_lookup_tokens = []
         else:
             addr_restrict_tokens = [t.token for t in addr_partials]
             addr_lookup_tokens = []