remove lookup by address only

There are too many lookups where the address is very frequent,
even when many address parts are present.
This commit is contained in:
Sarah Hoffmann
2023-08-06 19:20:10 +02:00
parent 8d9b5e4775
commit 78648f1faf
2 changed files with 1 additions and 22 deletions

View File

@@ -212,13 +212,6 @@ class SearchBuilder:
exp_count = min(exp_count, min(t.count for t in addr_partials)) \
if addr_partials else exp_count
if exp_count < 1000 and len(addr_tokens) > 3 and partials_indexed:
# Lookup by address partials and restrict results through name terms.
# Give this a small penalty because lookups in the address index are
# more expensive
yield penalty + exp_count/5000, exp_count,\
dbf.lookup_by_addr(name_tokens, addr_tokens)
return
# Partial term to frequent. Try looking up by rare full names first.
name_fulls = self.query.get_tokens(name, TokenType.WORD)