Hi all,

I have a categories tree as follows:

http://n4.nabble.com/file/n1049969/categories%2Btree.png 

In my categories dao, I execute the following code:

        QueryManager queryManager = jcrSession.getWorkspace().getQueryManager();
        Query query = queryManager.createQuery("//element(*, atl:category)",
Query.XPATH);
        QueryResult queryResult = query.execute();
        NodeIterator nodeIterator = queryResult.getNodes();

nodeIterator does contain all categories in the tree, but they appear to be
in the same 'random' order when I loop through the iterator (see text in red
for order and name attribute).  The order does not appear to follow date
created, alphabetical, or hierachical order.  Ideally, the order of nodes
would heirachical (as in the image above, from top to bottom).

I tried setting the respectDocumentOrder param of the SearchIndex in the
reposiotry.xml (configuration) file but it made no difference to the order
returned.

Any ideas?  Thanks for reading.

Kind regards,

James

-- 
View this message in context: 
http://n4.nabble.com/Executing-Search-Query-NodeIterator-Order-tp1049969p1049969.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Reply via email to