From 1821f68ca0915c0b797efdbae8b2672f9c81985f Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Tue, 31 May 2022 11:23:42 +0200 Subject: [PATCH] exclude addr:inclusion from search --- nominatim/tokenizer/icu_tokenizer.py | 2 +- nominatim/tokenizer/legacy_tokenizer.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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: -- 2.39.5