mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
minimum counts for tokens should always be 1
to avoid accidental devision by 0.
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user