From a97bfaf26cbe74325d825c132ce4718bc84c37e5 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Wed, 31 Jul 2024 14:54:55 +0200 Subject: [PATCH] fix postcode lookup with legacy tokenizer --- src/nominatim_api/search/legacy_tokenizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nominatim_api/search/legacy_tokenizer.py b/src/nominatim_api/search/legacy_tokenizer.py index 68cbd712..c7b10119 100644 --- a/src/nominatim_api/search/legacy_tokenizer.py +++ b/src/nominatim_api/search/legacy_tokenizer.py @@ -193,7 +193,7 @@ class LegacyQueryAnalyzer(AbstractQueryAnalyzer): lookup_word = row.word_token[1:] elif rowclass == 'place' and row.type == 'postcode': ttype = qmod.TokenType.POSTCODE - lookup_word = row.word_token[1:] + lookup_word = row.word else: ttype = qmod.TokenType.NEAR_ITEM if row.operator in ('in', 'near')\ else qmod.TokenType.QUALIFIER -- 2.39.5