jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randy_simon <randy_si...@hotmail.com>
Subject Order by child node?
Date Tue, 27 Feb 2007 01:23:30 GMT

The following query works just fine.

/jcr:root//root//element(*, my:Node)[jcr:contains(*/@jcr:text,
'*1168883211131testSearchWithOrdering*')] order by @cx:created descending

It finds the correct nodes and returns the results ordered by created date
in descending order.  However, the way my data model is designed is that the
title value of a node is stored in a jcr:NaturalText child node named
my:title.  Therefore, I was hoping that the following statement would allow
me to order the results by title.

/jcr:root//root//element(*, my:Node)[jcr:contains(*/@jcr:text,
'*1168883211131testSearchWithOrdering*')] order by my:title/@jcr:text

Unfortunately, this does not seem to order the results as expected.  If this
is not possible, then that’s fine and I can just sort the results on my end
for this case.  Before I do that I just want to ensure that this is not
supported by Jackrabbit.

Thanks in advance.
View this message in context: http://www.nabble.com/Order-by-child-node--tf3297465.html#a9173243
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

View raw message