Return to site

AEM QueryBuilder Cheat Sheet

QueryBuilder Debugger UI: http://{hostname}:{port}/libs/cq/search/content/querydebug.html

Query Builder:
1. Find all nodes of a given type
type=dam:Asset

2. Find all nodes under a given path
path=/content/dam/projects


3. Find all nodes under /content/sites where some property contains the string “products”
path=/content/sites
fulltext=products

4.Find all nodes under /content/sites created in the past month
path=/content/sites
1_relativedaterange.property=jcr:created
1__relativedaterange.lowerBound=-1M
1_relativedaterange.upperBound=0

5.Finding pages based on jcr:content properties where property exits or does not exist
path=/content/sites
type=cq:Page
property=@jcr:content/jcr:title
property.operation=exist (or) not

6. Finding pages based on jcr:content properties with exact property value
path=/content/sites
type=cq:Page
property=@jcr:content/jcr:title
property.value=Products

Note: If you are trying to find properties that start with some value then you can use something like 1_property.value=Product% and 1_property.operation=like

7. Searching for multiple properties with AND Condition
type=cq:Page
1_property=@jcr:content/cq:template
1_property.value=/content/site/products
2_property=@jcr:content/pageTitle
2_property.value=true
p.limit=-1

 
8. Searching for a single property with multiple values
type=cq:PageContent
property=jcr:title
property.1_value=Men
property.2_value=Women
p.limit=-1

All Posts
×

Almost done…

We just sent you an email. Please click the link in the email to confirm your subscription!

OKSubscriptions powered by Strikingly