]> git.openstreetmap.org Git - nominatim.git/commitdiff
exclude addr:inclusion from search
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 31 May 2022 09:23:42 +0000 (11:23 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Tue, 31 May 2022 12:19:19 +0000 (14:19 +0200)
nominatim/tokenizer/icu_tokenizer.py
nominatim/tokenizer/legacy_tokenizer.py

index bf5544ed0c06064946bef2b48fa9c217a5312c29..4678af66eb08d019b30e38bb8280da108083bd13 100644 (file)
@@ -482,7 +482,7 @@ class LegacyICUNameAnalyzer(AbstractAnalyzer):
                 if not item.suffix:
                     token_info.add_place(self._compute_partial_tokens(item.name))
             elif not item.kind.startswith('_') and not item.suffix and \
-                 item.kind not in ('country', 'full'):
+                 item.kind not in ('country', 'full', 'inclusion'):
                 token_info.add_address_term(item.kind, self._compute_partial_tokens(item.name))
 
 
index 7b78b22a87066370bba513072b0ace30c7b7078a..a292b180b8d5b153496c4641fdd5fc2de139f899 100644 (file)
@@ -475,7 +475,8 @@ class LegacyNameAnalyzer(AbstractAnalyzer):
                 token_info.add_street(self.conn, value)
             elif key == 'place':
                 token_info.add_place(self.conn, value)
-            elif not key.startswith('_') and key not in ('country', 'full'):
+            elif not key.startswith('_') \
+                 and key not in ('country', 'full', 'inclusion'):
                 addr_terms.append((key, value))
 
         if hnrs: