skip lookup with full names when there are none

This commit is contained in:
Sarah Hoffmann
2023-12-01 12:11:58 +01:00
parent d60a45715a
commit 8a2c6067a2

View File

@@ -223,6 +223,7 @@ class SearchBuilder:
# Partial term to frequent. Try looking up by rare full names first. # Partial term to frequent. Try looking up by rare full names first.
name_fulls = self.query.get_tokens(name, TokenType.WORD) name_fulls = self.query.get_tokens(name, TokenType.WORD)
if name_fulls:
fulls_count = sum(t.count for t in name_fulls) fulls_count = sum(t.count for t in name_fulls)
# At this point drop unindexed partials from the address. # At this point drop unindexed partials from the address.
# This might yield wrong results, nothing we can do about that. # This might yield wrong results, nothing we can do about that.