From 8cba65809c509151165ae4dcc8c180711fd71470 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Wed, 26 Jul 2023 17:45:21 +0200 Subject: [PATCH] older version of Postgres cannot convert jsonb to int --- nominatim/tokenizer/icu_tokenizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nominatim/tokenizer/icu_tokenizer.py b/nominatim/tokenizer/icu_tokenizer.py index 39c1cbc6..799ff559 100644 --- a/nominatim/tokenizer/icu_tokenizer.py +++ b/nominatim/tokenizer/icu_tokenizer.py @@ -188,7 +188,7 @@ class ICUTokenizer(AbstractTokenizer): in the database. """ with conn.cursor() as cur: - cur.execute("""SELECT word, sum((info->'count')::int) as count + cur.execute("""SELECT word, sum((info->>'count')::int) as count FROM word WHERE type = 'W' GROUP BY word ORDER BY count DESC LIMIT %s""", (num,)) -- 2.45.1