Hi there Amit,
You can sort the entries by their property: "jcr:created".
The query for this (you can e.g. check in the debugger) would be:
path=/content/mysite/ type=cq:Page orderby=@jcr:content/jcr:created orderby.sort=desc
Or if you want it in java code:
Map map = new HashMap(); map.put("path", "/content/mysite"); map.put("type", "cq:Page"); map.put("orderby", "@jcr:content/jcr:created"); map.put("orderby.sort", "desc"); Query query = builder.createQuery(PredicateGroup.create(map), session); SearchResult result = query.getResult();
Hope that will help you
/Johan