X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/e51973f8b1eee034221eed6f91cddf2488020692..3905dd68dd5b261449df7df243c594b25995d8bd:/src/nominatim_api/search/db_search_builder.py?ds=sidebyside diff --git a/src/nominatim_api/search/db_search_builder.py b/src/nominatim_api/search/db_search_builder.py index e29f0b93..6453509e 100644 --- a/src/nominatim_api/search/db_search_builder.py +++ b/src/nominatim_api/search/db_search_builder.py @@ -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',