make housenumber search work with non-indexed partials

This commit is contained in:
Sarah Hoffmann
2024-07-31 14:09:35 +02:00
parent 2048009600
commit cfe5284f64
2 changed files with 9 additions and 3 deletions

View File

@@ -167,7 +167,12 @@ class SearchBuilder:
expected_count = sum(t.count for t in hnrs)
partials = {t.token: t.addr_count for trange in address
for t in self.query.get_partials_list(trange)}
for t in self.query.get_partials_list(trange)
if t.is_indexed}
if not partials:
# can happen when none of the partials is indexed
return
if expected_count < 8000:
sdata.lookups.append(dbf.FieldLookup('nameaddress_vector',