Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

QueryBuilder API: Query if a specific property exists?

Avatar

Level 5

I want to query in AEM and get all those records where a specific value exists:

 

type=cq:tag
path=/content/cq:tags/home
p.limit=12
p.offset=0
p.hits=selective
p.properties=jcr:title jcr:title.es

 

Here I want to query only those tags where `jcr:title.es` exists. How can I write the query for the same?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @spidey1405,

You can use exists operation:

So your query could look like this:

type=cq:tag
path=/content/cq:tags/home
p.limit=12
p.offset=0
p.hits=selective
p.properties=jcr:title jcr:title.es
property=jcr:title.es
property.operation=exists

 

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @spidey1405,

You can use exists operation:

So your query could look like this:

type=cq:tag
path=/content/cq:tags/home
p.limit=12
p.offset=0
p.hits=selective
p.properties=jcr:title jcr:title.es
property=jcr:title.es
property.operation=exists