Querybuilder.json: Orderby works only for some properties
We have som issues sorting results from querybuilder.json (AEM 6.2). We want to be able to sort data on different properties, specified by the user (i.e. path, lastModified, title++).
Ordering data by "path" and "title" works fine:
querybuilder.json?path=%2Fcontent&type=cq%3APage&p.hits=selective&p.properties=jcr%3Apath%20jcr%3Atitle%20cq%3AlastModified&p.limit=-1&orderby=path&orderby.sort=asc
Ordering data by jcr:content properties does not work (list in random order), i.e. cq:lastModified:
querybuilder.json?path=%2Fcontent&type=cq%3APage&p.hits=selective&p.properties=jcr%3Apath%20jcr%3Atitle%20cq%3AlastModified&p.limit=-1&orderby=@jcr%3Acontent%2Fcq%3AlastModified&orderby.sort=asc
(Same as documented in QueryBuilder-api https://docs.adobe.com/docs/en/aem/6-2/develop/search/querybuilder-api.html#Sample Queries)
Trying different variations on specifying orderby doesnt help:
querybuilder.json?path=%2Fcontent%2Fsites%2Fsb1%2Fnb%2Fsmn%2Fprivat%2Fforsikring&type=cq%3APageContent&p.hits=selective&p.properties=jcr:title%20cq:lastModified&p.limit=10&orderby=jcr:content%2Fcq%3AlastModified&orderby.sort=asc (Without "@", fails)
querybuilder.json?path=%2Fcontent%2Fsites%2Fsb1%2Fnb%2Fsmn%2Fprivat%2Fforsikring&type=cq%3APageContent&p.hits=selective&p.properties=jcr:title%20cq:lastModified&p.limit=10&orderby=cq%3AlastModified&orderby.sort=asc (Without "@jcr:content", fails)
Same issue if we try to order by i.e cq:lastRolledout, jcr:created.
Anyone experienced same issue?
Best regards
Henrik Heiestad