I have the following node structure. I am having issues running an xpath
query that searches for a cwe:comment property and returns a cwe:file node.
I have read through the forum, but can't figure out if this functionality is
supported in version 1.3.1.
nodetypes:
[cwe:file] > nt:hierarchyNode, mix:referenceable , mix:versionable
orderable
- cwe:filename (string) mandatory
- cwe:filesize (long)
+ jcr:content (nt:resource) primary mandatory
+ * (cwe:comment) = cwe:comment ignore multiple
[cwe:comment] > nt:hierarchyNode, mix:referenceable
- cwe:body (string) mandatory
- cwe:createdUser (string) mandatory
- cwe:createdDate (date) mandatory
query 1:
//element(*,cwe:file)[jcr:contains(jcr:content/@jcr:mimeType,
'application/msword')]/rep:excerpt() order by @jcr:score desc
query 2:
//element(*,cwe:file)[jcr:contains(cwe:comment/@cwe:body,
'banana')]/rep:excerpt() order by @jcr:score desc
results:
Both queries run without any errors. The first query returns the correct
results, however the second query does not return any results and I know
there is at least 1 matching result. What is the big difference between
these 2 queries. I have already re-indexed all nodes to make sure the
indexes were correct. I understand that searching child properties is
supported in version 1.4, but I don't know when that will be released.
Please let me know what you think. Thanks.
--
View this message in context:
http://www.nabble.com/query-for-child-property-tf4262707.html#a12130957
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.