Expand my Community achievements bar.

SOLVED

Correct usage of fulltext and relPath in Query Builder? Or, what is the difference between @jcr:content/cq:tags, jcr:content/cq:tags, and jcr:content/@cq:tags?

Avatar

Level 5

When referencing the AEM Query Builder Cheat Sheet, I am noticing that the fulltext relPath is referencing `jcr:content/@cq:tags`.  However, on the same page, there are references to `jcr:content/cq:tags`, and I feel like I've seen `@jcr:content/cq:tags` in other places.

 

What is the correct usage here?  How do you know where the @ needs to go inside of the query?

 

Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

hi @dylanmccurry ,

The placement of the "@" symbol in the query depends on whether the property being referenced is a node or an attribute of a node. If it is an attribute, then the "@" symbol should be placed before the property name. If it is a sub-node, then the property name should be referenced directly.

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

hi @dylanmccurry ,

The placement of the "@" symbol in the query depends on whether the property being referenced is a node or an attribute of a node. If it is an attribute, then the "@" symbol should be placed before the property name. If it is a sub-node, then the property name should be referenced directly.