XPath query ignoring the (sort by @jcr:score )
5.6.1 upgraded to 6.1 environment.
We have the following XPath generated by QueryBuilder (some node names changed):
/jcr:root/content/company1/application1/en//element(*, cq:Page)[(jcr:content/@cq:template = '/apps/company1/templates/application1/exceptionpage' or jcr:content/@cq:template = '/apps/company1/templates/application1/manualpage' or jcr:content/@cq:template = '/apps/company1/templates/application1/guidelinepage' or jcr:content/@cq:template = '/apps/company1/templates/application1/formpage' or jcr:content/@cq:template = '/apps/company1/templates/application1/bulletinpage' or jcr:content/@cq:template = '/apps/company1/templates/application1/realstatepraticespage') and jcr:content/st-documentNode/@docExist = 'true' and (jcr:contains(jcr:content/st-documentNode/documentName, 'ALTA') or jcr:contains(., 'ALTA'))] order by @jcr:score descending
When the query is executed in AEM 6.1 CRX DE, it appears that the sort order does not have any effect on the order of returned records (nodes). Even when order by clause removed, the query produces records in the same order.
In the same query, executed in 5.6.1, change in the order by clause actually results in change of the result set records (nodes) order.
Any Ideas where I might be doing wrong?
Regards,
-N