Confluence Docs 3.3 : How to Search Confluence for Uses of a Macro
This page last changed on May 08, 2009 by jlargman.
Illegal Search TermsSeveral terms are illegal to use when searching Confluence, like : or {. If you search for just the macro term, you're likely not to get the right search results. For example, searching for 'usage', which is the name of a macro but also a common English word, will not yield an accurate count. Query the DatabaseIf, for example you want to search for the uses of the usage macro, you can search the database:
SELECT * FROM BODYCONTENT WHERE BODY LIKE '%{usage}%' If you want to get the last users or the creators of the pages where the noformat macro is used, you might run: SELECT CREATOR FROM CONTENT WHERE CONTENTID IN (SELECT CONTENTID FROM BODYCONTENT WHERE BODY LIKE '%{noformat}%') GROUP BY CREATOR SELECT LASTMODIFIER FROM CONTENT WHERE CONTENTID IN (SELECT CONTENTID FROM BODYCONTENT WHERE BODY LIKE '%{noformat}%') GROUP BY LASTMODIFIER Logging Uses of a MacroThis information won't tell you how often a macro is invoked - rather how often it appears on pages. For counting how often it's invoked (and measuring the time it takes to invoke it), check Identifying Slow Performing Macros. Counting the Incidents of Invoked LogsYou can then grep the logs like: grep -c "{usage" atlassian-confluence.log |
![]() |
Document generated by Confluence on Jul 09, 2010 01:11 |