I'm trying to perform a query on the CRX of a 6.2 Adobe AEM version.
I have to execute a fulltext query on all subnodes of /content/connect/it/supplier/<aNode>/jcr:content/service/legal where <aNode> is a generic node1, node2, node3 (and so on) as you can see in the following picture:
To achive my target I tried using this XPath query (generated using the query builder):
/jcr:root/content/connect/it/supplier//*[jcr:contains(jcr:content/service/legal, "helloWorld")]
but it does not work, it does not retrieve anything. In fact, I have just realized that with the previous query I am able to search for the properties of jcr:content/service/legal node.
Then I tried using somethig like:
/jcr:root/content/connect/it/supplier//*[jcr:contains(jcr:content/service/legal//*/[@attributeName="helloWorld"])]
but this time my query was not right.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Can you try like below:
/jcr:root/content/connect/it/supplier//element(*, nt:unstructured)[(jcr:contains(., 'helloWorld')) ]
/jcr:root/content/connect/it/supplier//element(*, nt:unstructured)[(jcr:contains(service/legal/@attributeName, 'helloWorld')) ]
Example from we retail
/jcr:root/content/we-retail/language-masters//element(*, nt:unstructured)
[
(jcr:contains(., 'Men'))
]
/jcr:root/content/we-retail/language-masters//element(*, nt:unstructured)
[
(jcr:contains(button/@label, 'Men'))
]
Views
Replies
Total Likes
Hi,
Can you try like below:
/jcr:root/content/connect/it/supplier//element(*, nt:unstructured)[(jcr:contains(., 'helloWorld')) ]
/jcr:root/content/connect/it/supplier//element(*, nt:unstructured)[(jcr:contains(service/legal/@attributeName, 'helloWorld')) ]
Example from we retail
/jcr:root/content/we-retail/language-masters//element(*, nt:unstructured)
[
(jcr:contains(., 'Men'))
]
/jcr:root/content/we-retail/language-masters//element(*, nt:unstructured)
[
(jcr:contains(button/@label, 'Men'))
]
Views
Replies
Total Likes
Views
Likes
Replies