Solved
sorting on the basis of multiple properties in Query builder
i want to write query where i need to find pages, and result should be sorted the basic of two properties, 1. rank , 2. cq:lastModified
i want to write query where i need to find pages, and result should be sorted the basic of two properties, 1. rank , 2. cq:lastModified
Hi @mohit3 ,
If you want to sort your result based on multiple property then you can try to implement below:
map.put("1_orderby", "@jcr:content/rank");
map.put("orderby.sort", "desc"); // in case you want it descending
map.put("2_orderby", ""@jcr:content/jcr:lastModified"");
map.put("orderby.sort", "asc"); // in case you want it ascending
You can try to change the sequence based on priority.
-Tarun
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.