@tyler Fixed the query 2 hours ago and it has been crunching away. At least the infinite disk usage growth is gone now and it seems to report proper statistics.
Here's the query, if you are interested:
WITH cte AS ( SELECT data->>'actor' AS actor, data->>'content' AS content FROM objects ) SELECT arr.word, SUM( (SELECT count(*) FROM regexp_matches(cte.content, '[[:<:]]' || arr.word || '[[:>:]]', 'gi') ) ) AS total_occurrences, cte.actor AS actor FROM cte CROSS JOIN unnest(ARRAY['jew', 'jews', 'jewish']) AS arr(word) GROUP BY arr.word, cte.actor ORDER BY arr.word, total_occurrences DESC;