more preference for name-only queries in search

This commit is contained in:
Sarah Hoffmann 2023-11-22 23:57:23 +01:00
parent ac5ef64701
commit 195c13ee8a

View 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