forked from hans/Nominatim
older version of Postgres cannot convert jsonb to int
This commit is contained in:
@@ -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,))
|
||||
|
||||
Reference in New Issue
Block a user