Query to find missing property in page hirearchy [Query Builder] AEMasCloud | Community
Skip to main content
Level 2
May 30, 2022
Solved

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

  • May 30, 2022
  • 1 reply
  • 1083 views

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 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by DEBAL_DAS

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

 

1 reply

DEBAL_DAS
DEBAL_DASAccepted solution
New Member
May 30, 2022

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

 

Debal Das, Senior AEM Consultant
Level 2
May 30, 2022

Thank you @debal_das  that really helped 🙂