Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AEM Query builder search where property 'does not' exist

I need o do a search in AEM query builder and tying to only fetch the tags that have not been moved to a new location.

The only property added to the old tags is the "cq:movedTo" which has the path to the new location.

But when I try to search the tags which don't have this property, I dont get any results:

property=cq:movedTo
property.operation=no

Am I missing something here ? The search is done by a 3rd party and cannot process the list of tags it receive. So I need to fetch ONLY the correct list with this query.

like image 207
Riju Mahna Avatar asked Sep 11 '25 04:09

Riju Mahna


1 Answers

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 containing the property cq:movedTo you can use

property=cq:movedTo
property.operation=exists

If you want all nodes that don't have the property then specify the value as false.

property=cq:movedTo
property.operation=exists
property.value=false

More information on possible values for the property predicate evaluator can be found here.

like image 187
rakhi4110 Avatar answered Sep 14 '25 14:09

rakhi4110