jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Kiehl <christ...@sulu3000.de>
Subject Re: query for child property
Date Wed, 15 Aug 2007 14:51:16 GMT
bilobag wrote:
> Thanks for taking the time to test my query.  In
> jcr:contains(cwe:comment/@cwe:body,'banana'), I was under the impression
> that cwe:comment was the nodeType that I wanted to search and not the name
> of the specific child node.  My cwe:comment nodes may all be named
> different.  Is there a way to query the cwe:body property of any child nodes
> of nodeType cwe:comment?  If not, is there a syntax I can use to search all
> child nodes like jcr:contains(*/@cwe:body,'banana')?  Also, does anyone know
> when jackrabbit 1.4 will be released.  Thanks.

Well, the query would probably look like this:

//element(*,cwe:file)[jcr:contains(*[@jcr:primaryType = 
'cwe:comment']/@cwe:body, 'banana')]/rep:excerpt() order by @jcr:score desc

But I'm not sure if this is supported. But you can use

//element(*,cwe:file)[jcr:contains(*/@cwe:body, 'banana')]/rep:excerpt() order 
by @jcr:score desc

as you suggested.

Cheers,
Christoph


Mime
View raw message