AEM query builder , not equals condition | Community
Skip to main content
March 6, 2020
Solved

AEM query builder , not equals condition

  • March 6, 2020
  • 1 reply
  • 5817 views

I wanted to query all the pages with below conditions

  1. should be activated pages
  2. a property(flag) should be set to false
  3. should exclude 3 templates (template a, template  b, template c)

I tried the below query for first 2 conditions, but how to include the third condition?

type=cq:PageContent
path=/content/retail
1_property=flag
1_property.value=false
2_property=cq:lastReplicationAction
2_property.value=Activate
property.and
p.limit=-1
p.hits=full

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 arunpatidar

Try with below query

 

type=cq:PageContent
path=/content/retail
1_property=flag
1_property.value=false
2_property=cq:lastReplicationAction
2_property.value=Activate
property.and
group.property=cq:template
group.property.1_value=value1
group.property.2_value=value2
group.property.3_value=value3
group.property.operation=unequals
group.property.or
p.limit=-1
p.hits=full

1 reply

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
March 6, 2020

Try with below query

 

type=cq:PageContent
path=/content/retail
1_property=flag
1_property.value=false
2_property=cq:lastReplicationAction
2_property.value=Activate
property.and
group.property=cq:template
group.property.1_value=value1
group.property.2_value=value2
group.property.3_value=value3
group.property.operation=unequals
group.property.or
p.limit=-1
p.hits=full

Arun Patidar
AnnzRozAuthor
March 10, 2020
Thanks, this worked 🙂