]> git.openstreetmap.org Git - nominatim.git/commitdiff
older version of Postgres cannot convert jsonb to int
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 26 Jul 2023 15:45:21 +0000 (17:45 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 26 Jul 2023 15:45:21 +0000 (17:45 +0200)
nominatim/tokenizer/icu_tokenizer.py

index 39c1cbc648ca33fe4ecce4ec77421db1de96b1c2..799ff559b94599c43e4f66270f82ec94ac0138cc 100644 (file)
@@ -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,))