Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
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