Expand my Community achievements bar.

How to reference parent or ancestor's property in query builder

Avatar

Level 2

In Query Builder, you can refer to a node's child's property via */@jcr:title or its descendant's property via */*/@jcr:title.

So you can create a search for a node, where the node has a given property and its child has a given property

Ex:

type=cq:Page

property=*/@jcr:title

value=Great Title

This will return the cq:Page node, where it's child node's jcr:title equal to Great Title

However, I am looking for a way to refer to parent's property or ancestor's property. How do I do that? and can I refer to parent node in fulltext.relPath?

I tried the following

type=cq:PageContent

property=../@jcr:title

value=Great Title

1 Reply