Highlighted

AEM 6.3 xpath query issue

harishv99010453

22-04-2018

Hello Team -

I have an issue with xpath query in 6.3, while upgrading from 6.0.

Issue -

Using below query we are trying to fetch the list of pages that has the string "searchword" with in the page title, tags related to page, description of the page and within a component (a textarea component which has the prop as htmldump). As highlighted in the query we are doing a search for the keywork with the field name of the component. This all works good in 6.0 but not in 6.3.

jcr:root/content/myproj/MyStore/en_US/services//element(*, cq:Page)[(jcr:contains(jcr:content/@jcr:title, 'searchword') or jcr:contains(jcr:content/@cq:tags, 'searchword') or jcr:contains(jcr:content/@jcr:description, 'searchword') or jcr:contains(jcr:content/@htmldump, 'searchword'))] order by @jcr:score descending

It works, when I give the full path jcr:content/par/textarea/@htmldump, which is not an ideal solution considering there can be multiple components of the same type in a page.

Is this issue something with oak version in 6.3 ?

Any inputs / solution would be highly appreciated.