jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jop Zinkweg - Initworks B.V." <zink...@initworks.com>
Subject File search order by jcr:content properties
Date Wed, 29 Oct 2008 10:16:07 GMT
Hi,

We're currently developing a web application which (will) use Jackrabbit 
to store all of its correspondence.

What I'm trying to do is to search through a subtree containing files, 
and return these in a specific order based on a property in the 
jcr:content subnode.

For testing purposes I'm using the search page in jackrabbit-webapp.

My XPath query looks like:
stmt = "jcr:root/people//element(*, nt:file)[jcr:contains(jcr:content, 
'" + q + "')]/rep:excerpt(.) order by @jcr:content/bos:date ascending"

The query works fine, returning the nodes I'm expecting, but I can't get 
the ordery by to work.

Is ordering by subnode properties in any way supported?
I suspect this is not the case, since a node might have more than one 
subnode of the same name?

My next step would be to retrieve jcr:content nodes, since 99% of my 
search options relate to the jcr:content properties, and access the 
parent node in java, but I'm hoping there's a better solution.

(I know subpath lookups are a bad idea performance wise, it's something 
that'll be changed later on)

Regards,

Jop Zinkweg
Initworks B.V.

Mime
View raw message