]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/api/search/legacy_tokenizer.py
housenumber position should hint on direction
[nominatim.git] / nominatim / api / search / legacy_tokenizer.py
index bd17706e5dff7c3fc5fd5f1d37eafe234fd809f1..031f2456c455d108c21e1ea14a048b9f6d396df2 100644 (file)
@@ -209,7 +209,7 @@ class LegacyQueryAnalyzer(AbstractQueryAnalyzer):
                 is_indexed = False
 
         return LegacyToken(penalty=penalty, token=row.word_id,
                 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(),
                            addr_count=1, # not supported
                            lookup_word=lookup_word,
                            word_token=row.word_token.strip(),