You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Christophe Lombart <ch...@gmail.com> on 2005/10/07 13:30:41 UTC

Search on subnode properties

Hi all,

Is it possible to search on subnode properties ?
For example, I have a node type "page" which contains several paragraphs
(based on node type "paragraph"). I would like to seach all pages which has
at least one paragraph containing the text "something".
What is the xpath expression for this kind of query ?

If I understand correctly, not all XPath features are supported in JCR - Is
it correct ?

Thanks,
Christophe

Re: Search on subnode properties

Posted by Christophe Lombart <ch...@gmail.com>.
Ok thanks Jukka. This is not urgent. I can wait.

Kind regards,
Christophe

On 10/8/05, Jukka Zitting <ju...@zitting.name> wrote:
>
> Hi,
>
> Christophe Lombart wrote:
> > Is it possible to search on subnode properties ?
> > For example, I have a node type "page" which contains several paragraphs
> > (based on node type "paragraph"). I would like to seach all pages which
> has
> > at least one paragraph containing the text "something".
> > What is the xpath expression for this kind of query ?
>
> At least the jcr:contains() function does not support child node
> queries at the
> moment, so I unfortunately don't think you can yet implement your search
> with
> just one XPath query. I'll post a Jira issue about this, please comment
> or vote
> for it if you want to speed up the process of implementing the missing
> functionality.
>
> BR,
>
> Jukka Zitting
>

Re: Search on subnode properties

Posted by Cédric Damioli <ce...@anyware-tech.com>.
Jukka Zitting a écrit :

> Hi,
>
> I wrote:
>
>> At least the jcr:contains() function does not support child node 
>> queries at the moment, so I unfortunately don't think you can yet
>> implement your search with just one XPath query.
>
>
> Another alternative from "//page[jcr:contains(paragraph,'foo')]" would 
> of course
> be "//page[paragraph[jcr:contains(.,'foo')]]" but I believe Jackrabbit 
> only
> supports the attribute axis within predicates. I think I'll file a 
> separate
> Jira issue on this.
>
> BR,
>
> Jukka Zitting

Another request about queries would be to be able to execute queries on 
the name of a Node : eg. //*[jcr:like(name(.), '%foo%')]
Is it actually possible ?

Regards,
Cédric Damioli


Re: Search on subnode properties

Posted by Jukka Zitting <ju...@zitting.name>.
Hi,

I wrote:
> At least the jcr:contains() function does not support child node 
> queries at the moment, so I unfortunately don't think you can yet
> implement your search with just one XPath query.

Another alternative from "//page[jcr:contains(paragraph,'foo')]" would 
of course
be "//page[paragraph[jcr:contains(.,'foo')]]" but I believe Jackrabbit only
supports the attribute axis within predicates. I think I'll file a separate
Jira issue on this.

BR,

Jukka Zitting

Re: Search on subnode properties

Posted by Jukka Zitting <ju...@zitting.name>.
Hi,

Christophe Lombart wrote:
> Is it possible to search on subnode properties ?
> For example, I have a node type "page" which contains several paragraphs
> (based on node type "paragraph"). I would like to seach all pages which has
> at least one paragraph containing the text "something".
> What is the xpath expression for this kind of query ?

At least the jcr:contains() function does not support child node 
queries at the
moment, so I unfortunately don't think you can yet implement your search with
just one XPath query. I'll post a Jira issue about this, please comment 
or vote
for it if you want to speed up the process of implementing the missing
functionality.

BR,

Jukka Zitting