X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/4315debff588a5aa67840eda07bcc85d265f923b..0278ab7f41bf9bc96a87084c04bfec263c6acc40:/nominatim/api/search/legacy_tokenizer.py?ds=sidebyside diff --git a/nominatim/api/search/legacy_tokenizer.py b/nominatim/api/search/legacy_tokenizer.py index bd17706e..031f2456 100644 --- a/nominatim/api/search/legacy_tokenizer.py +++ b/nominatim/api/search/legacy_tokenizer.py @@ -209,7 +209,7 @@ class LegacyQueryAnalyzer(AbstractQueryAnalyzer): is_indexed = False return LegacyToken(penalty=penalty, token=row.word_id, - count=row.search_name_count or 1, + count=max(1, row.search_name_count or 1), addr_count=1, # not supported lookup_word=lookup_word, word_token=row.word_token.strip(),