Expand my Community achievements bar.

SOLVED

AEM Query with multiple nodes with same name in parallel

Avatar

Level 2

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  @pulkitn @Nitin_laad @nitesh_kumar @Pulkit_Jain_ 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@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.

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@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.

Avatar

Community Advisor
path=/content/we-retail
type=cq:Page
orderby=@jcr:content/root/container/book/version/abc
orderby.sort=desc
p.limit=-1


Arun Patidar