setweight(to_tsvector('english', coalesce(body,'')), 'C') INTO doc
FROM forum_node WHERE id = root_id;
setweight(to_tsvector('english', coalesce(body,'')), 'C') INTO doc
FROM forum_node WHERE id = root_id;
- FOR cv in SELECT setweight(to_tsvector('english', coalesce(body,'')), 'C') FROM forum_node WHERE abs_parent_id = root_id AND deleted_id IS NULL LOOP
+ FOR cv in SELECT setweight(to_tsvector('english', coalesce(body,'')), 'C') FROM forum_node WHERE abs_parent_id = root_id AND (NOT state_string LIKE '%%deleted%%') LOOP