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: Executing query on sub node?
Date Thu, 15 May 2008 10:36:04 GMT
Hello,

> Hi,
> 
> I was just wondering if it was possible to execute a query on 
> a paricular subnode? 
> 
> For example my structure is JCR_Root/categoryX/languageX/data1/..
> 
> I know the category and language nodes, so I want to execute 
> the query on the set of data child nodes, but in my code it 
> seems I can only execute the query on the whole JCR_root e.g.
> 
> QueryManager qMgr = session.getWorkspace().getQueryManager();
> QueryResult result = qMgr.createQuery(xpathQuery, Query.XPATH 
> ).execute();
>

Just embed the path info in the xpathQuery, so start the xpath with
/jcr:root/categoryX/languageX/data1

-Ard
 
> then I need to iterate through the results to find the 
> relevant data nodes.
> 
> Is there a better way to implement a more fine tuned search? 
> And if so would this be more efficient?
> 
> Thanks,
> David.
> --
> View this message in context: 
> http://www.nabble.com/Executing-query-on-sub-node--tp17249967p
> 17249967.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
> 
> 

Mime
View raw message