jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: Querying doesn't work !
Date Tue, 01 Mar 2005 10:02:20 GMT
Hi Stephane,

All the queries work on my checkout. Are you using old index data with 
the newly checkout code. because jackrabbit is not yet final, there 
might be changes in the code that are not compatible with the index data 
from previous changes.

did you try to delete the index and then start jackrabbit? This will 
recreate the index.

If that does not help, could you please create a jira bug and attach the 
workspace directory (the one with the workspace.xml in it)?
http://issues.apache.org/jira/browse/JCR
thanks

btw. the XPath query /MyRootNode will never return any results because 
the root node of the virtual xml document is always a jcr:root element.
see also: public final draft jcr spec section 6.6.3.3

cheers
  marcel

Dupont, Stephane wrote:
> Hi,
> 
> I would like to make a simple search that return me all nodes which have
> the nt:unstructured primaryType, but the result is always empty :
> 
>     QueryManager qm = session.getWorkspace().getQueryManager();
>     Query query = qm.createQuery("SELECT * FROM nt:unstructured",
> Query.SQL);
>     QueryResult result = query.execute();
> 
> My content (dump of the root node) :
>     /
>     /jcr:primaryType=rep:root
>     /jcr:system
>     /jcr:system/jcr:primaryType=rep:system
>     /jcr:system/jcr:versionStorage
>     /jcr:system/jcr:versionStorage/jcr:primaryType=rep:versionStorage
>     /jcr:system/jcr:versionStorage/jcr:mixinTypes=
>     /MyRootNode
>     /MyRootNode/jcr:primaryType=nt:unstructured
> 
> --> The result is empty.
> 
> I tried also with nt: base ("SELECT * FROM nt:base"), but
> unsuccessfully.
> Idem when i specify a XPath query : //MyRootNode or /MyRootNode
> 
> But initially, the query was something like this :
> "SELECT * FROM nt:unstructured WHERE jcr:path LIKE '/MyRootNode'"
> 
> What's wrong ? Any idea ?
> 
> Thanks
> Stephane
> 
> PS : i use the latest svn checkout (this morning).
> 
> 

Mime
View raw message