jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ard Schrijvers <a.schrijv...@onehippo.com>
Subject Re: xpath query question
Date Mon, 19 Jul 2010 07:55:18 GMT

take a look at


Specifically at the aggregates. That should give you enough pointers I think

Regards Ard

On Sat, Jul 17, 2010 at 9:18 PM, ChadDavis <chadmichaeldavis@gmail.com> wrote:
> I'm not having success implementing an xpath that can do the
> following.  I'm implementing a CMS.  Let's say that I have some node
> types of my:document and my:folder.  Here are the contents of a given
> folder:
> +chadsFolder(my:folder)
>    -docOne(my:document)
>    -docTwo(my:document)        //has a binary child node, of the
> nt:file variety, as per the specification
>    +innerFolder(my:folder)
>          -docThree(my:document)
> I do NOT want my search to be recursive.  And I want it to be a full
> text search that will hit any of the direct child documents of
> "chadsFolder", as well as any binaries associated with them, but not
> anything inside of nested folders.
> Currently, I build two separate queries and then combine their results
> at a higher level.  Here are my two xpath queries.
> A)  /jcr:root/chadsFolder/element(*,my:document)[jcr:contains(.,'searchTerm')]
> B)  /jcr:root/chadsFolder/element(*,my:document)//element(*,nt:resource)[jcr:contains(.,'searchTerm')]
> Query A hit's my documents, query B hits the binaries attached to
> those documents.  Is there anything in XPath, that's implemented in
> Jackrabbit 2.1, that would allow me to combine these two queries?

View raw message