From: Sarah Hoffmann Date: Tue, 31 May 2022 09:23:42 +0000 (+0200) Subject: exclude addr:inclusion from search X-Git-Tag: v4.1.0~35^2 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/1821f68ca0915c0b797efdbae8b2672f9c81985f exclude addr:inclusion from search --- diff --git a/nominatim/tokenizer/icu_tokenizer.py b/nominatim/tokenizer/icu_tokenizer.py index bf5544ed..4678af66 100644 --- a/nominatim/tokenizer/icu_tokenizer.py +++ b/nominatim/tokenizer/icu_tokenizer.py @@ -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)) diff --git a/nominatim/tokenizer/legacy_tokenizer.py b/nominatim/tokenizer/legacy_tokenizer.py index 7b78b22a..a292b180 100644 --- a/nominatim/tokenizer/legacy_tokenizer.py +++ b/nominatim/tokenizer/legacy_tokenizer.py @@ -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: