X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/b8385fc52de32231e64789cfbf56a246b18b38d8..c164efc5b886020be5594faa887e999d01cf4541:/nominatim/api/search/db_search_builder.py diff --git a/nominatim/api/search/db_search_builder.py b/nominatim/api/search/db_search_builder.py index 03e78d45..66e7efaf 100644 --- a/nominatim/api/search/db_search_builder.py +++ b/nominatim/api/search/db_search_builder.py @@ -206,7 +206,7 @@ class SearchBuilder: partials_indexed = all(t.is_indexed for t in name_partials) \ and all(t.is_indexed for t in addr_partials) - exp_count = min(t.count for t in name_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: yield penalty, exp_count, dbf.lookup_by_names(name_tokens, addr_tokens)