AEM Query with multiple nodes with same name in parallel | Community
Skip to main content
February 12, 2023
Solved

AEM Query with multiple nodes with same name in parallel

  • February 12, 2023
  • 2 replies
  • 851 views

I need to query to sort some pages under a particular hierarchy based on some child node property as below:

 

parent_path

----------------page1

------------------------jcr:content

--------------------------------------root

-------------------------------------------container

-------------------------------------------------------book

---------------------------------------------------------------version* [property -> "abc"]

-------------------------------------------------------book

---------------------------------------------------------------version* [property -> "abc"]

----------------page2

------------------------jcr:content

--------------------------------------root

-------------------------------------------container

-------------------------------------------------------book

---------------------------------------------------------------version* [property -> "abc"]

-------------------------------------------------------book

---------------------------------------------------------------version* [property -> "abc"]

 

I need to sort pages based on 1st book version property "abc" highlighted as bold.

 

I am using the below query which is not working.

 

path=parent_path
type=cq:Page
orderBy=@jcr:content/root/container/book/version/abc
orderby.sort=desc
p.limit=-1

 

 

Please help me to construct the query.

 

@arunpatidar  @punagpal @nitin_laad @nitesh_kumar-1 @pulkit_jain_ 

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 Shashi_Mulugu

@s-k-agarwal can you check your query one more time, I see a typo/case sensitive issue here.. pls confirm. 

 

 

 

It should be orderly nor orderBy.

 

 

 

Let me if it is still not working.

2 replies

Shashi_Mulugu
Community Advisor
Shashi_MuluguCommunity AdvisorAccepted solution
Community Advisor
February 13, 2023

@s-k-agarwal can you check your query one more time, I see a typo/case sensitive issue here.. pls confirm. 

 

 

 

It should be orderly nor orderBy.

 

 

 

Let me if it is still not working.

arunpatidar
Community Advisor
Community Advisor
February 13, 2023
path=/content/we-retail type=cq:Page orderby=@jcr:content/root/container/book/version/abc orderby.sort=desc p.limit=-1
Arun Patidar