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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
SOLVED

Query to find missing property in page hirearchy [Query Builder] AEMasCloud

Avatar

Level 2

Hi Team,
I need help to write a query in query builder to find the missing property.

 

For example we have a 100 number of pages under home page [/content/project/us/en/home]. and we are setting a property pageType under every page property for exmaple setting pageType and storing under [/content/nexxus/gb/en/home/jcr:content] {pageType [String] somevalue}.

 

We have to write a query to find the pages in which we don't have or missing pageType property.

 

Thanks

@kautuk_sahni  @Vijayalakshmi_S  @arunpatidar  @Theo_Pendle 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

We need to use below predicate -

property.operation=notcheck if property does not exists

https://github.com/paulrohrbeck/aem-links/blob/master/querybuilder_cheatsheet.md

 

Let's assume I want to identify pages those doesn't have cq:lastReplicationAction property and here is the query -

 

path=/content/we-retail/language-masters/en
type=cq:Page
1_property=jcr:content/cq:lastReplicationAction
1_property.operation=not
p.limit=-1

 

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

We need to use below predicate -

property.operation=notcheck if property does not exists

https://github.com/paulrohrbeck/aem-links/blob/master/querybuilder_cheatsheet.md

 

Let's assume I want to identify pages those doesn't have cq:lastReplicationAction property and here is the query -

 

path=/content/we-retail/language-masters/en
type=cq:Page
1_property=jcr:content/cq:lastReplicationAction
1_property.operation=not
p.limit=-1