On Thu, Jan 21, 2010 at 6:38 PM, Gadbury <[email protected]> wrote:
>
> 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.

Did you set it in the workspace.xml, or did you start with an entirely
clean repository after changing the repository.xml. Namely, the
repository.xml only functions as a template.

Also note, that respectDocumentOrder has a bad influence on the
performance of queries

Ard

>
> 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