jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ChadDavis <chadmichaelda...@gmail.com>
Subject xpath query question
Date Sat, 17 Jul 2010 19:18:18 GMT
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


    -docTwo(my:document)        //has a binary child node, of the
nt:file variety, as per the specification


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