CQ comes with a Query Debugger tool which serves as a front end to its QueryBuilder API. The front end is available at:
/libs/cq/search/content/querydebug.html
See webinar by Adobe AEM engineer Alex Klimetschek, and GEMS sessions 1 and 2 by Adobe’s Thomas Mueller. See detailed blog entry by Ankur Ahlawat here.
You can execute search queries on the JCR (Java Content Repository) using this tool. Search “predicate” reference is available here. For example, to search for all DAM assets in /content/dam/geometrixx, execute the following query:
type=dam:Asset
path=/content/dam/geometrixx
See screenshot below:
Running this search query should produce a result such as follows:
You can execute more complicated search queries as well. For example, to search for all DAM assets in /content/dam which are JPG images that were added since March 10, 2017 and to to sort the results in the descending order, execute the following query:
type=dam:Asset
path=/content/dam
property=jcr:content/metadata/dc:format
property.value=image/jpeg
daterange.property=jcr:content/jcr:lastModified
daterange.lowerBound=2017-03-10
orderby.sort=desc
See YouTube videos by Adobe’s Alex Klimetschek
Other examples:
How many transient workflow jobs for the workflow model “Dam Update Asset” were created on Dec 6, 2019 at 2 pm, and are still waiting to be processed :
type=slingevent:Job
path=/var/eventing/jobs/assigned/9fd97176-c73b-43a0-8a65-917902e9a6ad/com.adobe.granite.workflow.transient.job.var.workflow.models.dam.update_asset/2019/12/6
List all assets shot with a Canon camera:
path=/content/dam
nodename=metadata
property=tiff:Make
property.value=Canon
How many audit events have accumulated:
type=cq:AuditEvent
path=/var/audit
How many unique users have logged in to AEM in the past 12 hours?
A user who has logged in from three different IP addresses (home office, work, mobile phone) will be counted three times.
type=rep:Token
path=/home/users
How many web pages are in the AEM system?
type=cq:Page
path=/content
How many tags have been defined?
type=cq:Tag
path=/etc/tags
How many total users are defined in the AEM system?
type=rep:User
path=/home/users
How many (total) indexes have been defined?
type=oak:QueryIndexDefinition
How many ACLs are in effect?
type=rep:ACL
path=/
How many user groups are defined?
type=rep:Group
path=/home/groups
How many Client Libraries?
type=type=cq:ClientLibraryFolder
path=/etc
No comments:
Post a Comment
If you have any doubts or questions, please let us know.