Solution -
Go to this path: http://localhost:4502/libs/cq/search/content/querydebug.html
This tool is used to perform search queries on JCR
For Example - Search all assets under /content/dam folder
Use the below query : type= dam:Asset
path=/content/dam
Similarly we can perform the below Search.
Builder API Queries
How many ACL are in effect under /content/dam
Use the below query : type= rep:ACL
path = /content/dam
As shown in the screenshot
Builder API Queries
How many ACL are in effect under /content/dam
Use the below query : type= rep:ACL
path = /content/dam
As shown in the screenshot
How many web pages are there in the System
Use the below query type=cq: page
path=/content
How many components under the root node or specific path
Use the below query for specific path type=cq: component
path=/apps/we-retail-screens/components
Or
Use the below query for root path type=cq:component
path=/content
Some Different Types of cq types as follows and path can be anything based on the need you can choose the path
type=cq:Tag
path=/etc/tags
How many total users are defined in the AEM
type=rep:User
path=/home/users
How many (total) indexes have been defined
type=oak:QueryIndexDefinition
How many user groups are defined
type=rep:Grouppath=/home/groups
List all assets shot with a Canon camera:
path=/content/dam
nodename=metadata
property=tiff:Make
property.value=Canon
Use the below query type=cq: page
path=/content
How many components under the root node or specific path
Use the below query for specific path type=cq: component
path=/apps/we-retail-screens/components
Or
Use the below query for root path type=cq:component
path=/content
Some Different Types of cq types as follows and path can be anything based on the need you can choose the path
- sling:OsgiConfig
- cq:WidgetCollection
- cq:Widget
- cq:WorkflowData
- oak:Unstructured
- cq:ClientLibraryFolder
- sling:Mapping
- cq:Page
- cq:PageContent
- cq:WorkflowModel
- cq:WorkflowLauncher
- rep:Restrictions
- nt:folder
- cq:Payload
- cq:TabPanel
- rep:DenyACE
- rep:GrantACE
- cq:Panel
- sling:OrderedFolder
- rep:ACL
- nt:unstructured
- sling:Folder
- cq:LiveSyncAction
- cq:Tag
- nt:file
- cq:Dialog
- granite:Task
- dam:Asset
- cq:WorkItem
- cq:WorkflowNode
- cq:Workflow
- vlt:PackageDefinition
- nt:resource
- dam:AssetContent
- cq:WorkflowTransition
type=cq:Tag
path=/etc/tags
How many total users are defined in the AEM
type=rep:User
path=/home/users
How many (total) indexes have been defined
type=oak:QueryIndexDefinition
How many user groups are defined
type=rep:Grouppath=/home/groups
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
Search for all DAM assets in /content/dam which are JPG images that were added since March 10, 2018 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=2018-03-10
orderby.sort=desc
Find jar files and order them, newest first
http://localhost:4502/bin/querybuilder.json?type=nt:file&nodename=*.jar&orderby=@jcr:content/jcr:lastModified&orderby.sort=desc
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
Search for all DAM assets in /content/dam which are JPG images that were added since March 10, 2018 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=2018-03-10
orderby.sort=desc
Find jar files and order them, newest first
http://localhost:4502/bin/querybuilder.json?type=nt:file&nodename=*.jar&orderby=@jcr:content/jcr:lastModified&orderby.sort=desc
type=nt:file
nodename=*.jar
orderby=@jcr:content/jcr:lastModified
orderby.sort=desc
Find all pages and order them by last modified
http://localhost:4502/bin/querybuilder.json?type=cq:Page&orderby=@jcr:content/cq:lastModified
type=cq:Page
orderby=@jcr:content/cq:lastModified
nodename=*.jar
orderby=@jcr:content/jcr:lastModified
orderby.sort=desc
Find all pages and order them by last modified
http://localhost:4502/bin/querybuilder.json?type=cq:Page&orderby=@jcr:content/cq:lastModified
type=cq:Page
orderby=@jcr:content/cq:lastModified
Find all pages and order them by last modified, but descending
http://localhost:4502/bin/querybuilder.json?type=cq:Page&orderby=@jcr:content/cq:lastModified&orderby.sort=desc
type=cq:Page
orderby=@jcr:content/cq:lastModified
orderby.sort=desc
http://localhost:4502/bin/querybuilder.json?type=cq:Page&orderby=@jcr:content/cq:lastModified&orderby.sort=desc
type=cq:Page
orderby=@jcr:content/cq:lastModified
orderby.sort=desc
Fulltext search, ordered by score
http://localhost:4502/bin/querybuilder.json?fulltext=Management&orderby=@jcr:score&orderby.sort=desc
fulltext=Management
orderby=@jcr:score
orderby.sort=desc
Fulltext search for Women in the path :/content/screen
http://localhost:4502/bin/querybuilder.json?fulltext=Management&orderby=@jcr:score&orderby.sort=desc
fulltext=Management
orderby=@jcr:score
orderby.sort=desc
Fulltext search for Women in the path :/content/screen
fulltext=women
orderby=@jcr:content
path=/content/screens
Search for pages tagged with a certain tag
http://localhost:4502/bin/querybuilder.json?type=cq:Page&tagid=marketing:interest/product&tagid.property=jcr:content/cq:tags
type=cq:Page
tagid=marketing:interest/product
tagid.property=jcr:content/cq:tags
Advantages of Query Builder:
Query Builder is easy to read and write
No need to hard code time range in it
orderby=@jcr:content
path=/content/screens
Search for pages tagged with a certain tag
http://localhost:4502/bin/querybuilder.json?type=cq:Page&tagid=marketing:interest/product&tagid.property=jcr:content/cq:tags
type=cq:Page
tagid=marketing:interest/product
tagid.property=jcr:content/cq:tags
Advantages of Query Builder:
Query Builder is easy to read and write
No need to hard code time range in it
No comments:
Post a Comment
If you have any doubts or questions, please let us know.