1 Reply Latest reply on Oct 6, 2012 3:04 AM by it2000

    Find Content without Tags

    JasonLax

      Does anyone know how to find content that doesn't have a tag? It would be useful to identify this content so that it can be tagged by moderators.

        • Re: Find Content without Tags
          it2000

          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;