X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/6f68c2d805c3fdc903fa3d46093bd1376be3e636..0278ab7f41bf9bc96a87084c04bfec263c6acc40:/nominatim/api/search/legacy_tokenizer.py 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(),