]> git.openstreetmap.org Git - nominatim.git/commitdiff
more preference for name-only queries in search
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 22 Nov 2023 22:57:23 +0000 (23:57 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 22 Nov 2023 22:57:23 +0000 (23:57 +0100)
nominatim/api/search/db_search_builder.py

index 66e7efaf7f729dec8fdc8f0f889295b6ed8a6f67..905b5c621cfe8cd99e28ec0bf13a2a5c9bff392a 100644 (file)
@@ -208,7 +208,7 @@ class SearchBuilder:
                            and all(t.is_indexed for t in addr_partials)
         exp_count = min(t.count for t in name_partials) / (2**(len(name_partials) - 1))
 
-        if (len(name_partials) > 3 or exp_count < 3000) and partials_indexed:
+        if (len(name_partials) > 3 or exp_count < 8000) and partials_indexed:
             yield penalty, exp_count, dbf.lookup_by_names(name_tokens, addr_tokens)
             return