Just some comments, maybe a #sql_guru can create a statement which returns the relevant IDs using a join without creating too much database load. These SQL statements should access the right tables, anyhow one must process the output to get the relevant documents. (E.g. merge and sort both outputs and filter the unique IDs and create then HTML links)
-- get all documents select INTERNALDOCID from JIVEDOCVERSION where state='published' ORDER BY INTERNALDOCID ASC; -- get all document with tags - OBJECTID=BODYID for OBJECTID=102 select distinct OBJECTID from JIVEOBJECTTAG where OBJECTTYPE=102 ORDER BY OBJECTID ASC;
For messages this should work, anyhow I did not really test it.
-- get all threads, also deleted or rejected ones select MESSAGEID from JIVEMESSAGE; -- get all threads with tags - OBJECTID=MESSAGEID for OBJECTTYPE=1 select OBJECTID from JIVEOBJECTTAG where OBJECTTYPE=1;