X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/4315debff588a5aa67840eda07bcc85d265f923b..f923304eead3cb9e9cfad8f41c33df1fdc1a16fd:/nominatim/api/search/icu_tokenizer.py diff --git a/nominatim/api/search/icu_tokenizer.py b/nominatim/api/search/icu_tokenizer.py index 05ec7690..eb90c122 100644 --- a/nominatim/api/search/icu_tokenizer.py +++ b/nominatim/api/search/icu_tokenizer.py @@ -122,10 +122,10 @@ class ICUToken(qmod.Token): else: lookup_word = row.word_token - return ICUToken(penalty=penalty, token=row.word_id, count=count, + return ICUToken(penalty=penalty, token=row.word_id, count=max(1, count), lookup_word=lookup_word, is_indexed=True, word_token=row.word_token, info=row.info, - addr_count=addr_count) + addr_count=max(1, addr_count))