From: Sarah Hoffmann Date: Fri, 18 Feb 2022 22:24:50 +0000 (+0100) Subject: fix linting issue X-Git-Tag: v4.1.0~75^2~1 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/92bc3cd0a771bc35bd9573d3881d2733fe848de0 fix linting issue --- diff --git a/nominatim/tokenizer/icu_tokenizer.py b/nominatim/tokenizer/icu_tokenizer.py index b20b32d9..f5c66bc0 100644 --- a/nominatim/tokenizer/icu_tokenizer.py +++ b/nominatim/tokenizer/icu_tokenizer.py @@ -119,7 +119,8 @@ class LegacyICUTokenizer(AbstractTokenizer): if not conn.table_exists('search_name'): return with conn.cursor(name="hnr_counter") as cur: - cur.execute("""SELECT DISTINCT word_id, coalesce(info->>'lookup', word_token) FROM word + cur.execute("""SELECT DISTINCT word_id, coalesce(info->>'lookup', word_token) + FROM word WHERE type = 'H' AND NOT EXISTS(SELECT * FROM search_name WHERE ARRAY[word.word_id] && name_vector)