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

Queries with not exists condition

Avatar

Level 4

Hi,

 

Is there any query available for not exists condition.

We need to find list of pages whose cq:lastModified property is not available.

I tried with  below but it seems not proper.

 

path=/content/hr/stock/ubs
1_property=@jcr:content/cq:lastModified
1_property.operation=not exists
p.limit= -1

1 Accepted Solution

Avatar

Correct answer by
Level 5

Try this:

path=/content/hr/stock/ubs
1_property=@jcr:content/cq:lastModified
1_property.operation=exists
1_property.value=false
p.limit= -1

 

property.operation can take one of the following values while using the property predicate evaluator.

  1. equals for an exact match.
  2. unequals
  3. like partial matching
  4. not for no match
  5. exists for existence match

In your case to search for all nodes where  the property `@jcr:content/cq:lastModified` doesn't exist.

 

 

 

View solution in original post

2 Replies

Avatar

Correct answer by
Level 5

Try this:

path=/content/hr/stock/ubs
1_property=@jcr:content/cq:lastModified
1_property.operation=exists
1_property.value=false
p.limit= -1

 

property.operation can take one of the following values while using the property predicate evaluator.

  1. equals for an exact match.
  2. unequals
  3. like partial matching
  4. not for no match
  5. exists for existence match

In your case to search for all nodes where  the property `@jcr:content/cq:lastModified` doesn't exist.

 

 

 

Avatar

Level 4

Thank you so much.

A slight change to get proper result.

We have to add type=cq:Page to get proper result.

 

path=/content/hr/stock/ubs
type=cq:Page
1_property=@jcr:content/cq:lastModified
1_property.operation=exists
1_property.value=false
p.limit= -1