Exactly what I decided to do. :) It also comes in handy for doing an ORDER BY node path in the search results, since one cannot order by jcr:path.
For searching on label, I'm planning to save a special non-versionable child node that acts as the label, instead of using JCR's labelling. It makes sense in my case because I don't require arbritrary labelling. I just need a "current" pointer to the node (can be different from the head). So to "make version 1.6 current", I'll copy across version 1.6's properties over to the "current" child node. Thanks, Sunil Marcel Reutegger wrote: > > Hi, > > 2009/2/16 sunil.dmonte <[email protected]>: >> I need to do a property search in the following cases: >> 1) Search current and old versions of nodes in a subtree; >> 2) Search nodes having a given label in a subtree. >> >> In both cases, I can first find matching frozen nodes by doing a >> SELECT...WHERE... on nt:frozenNode. But after that I would need to do >> additional lookups on the jcr:frozenUuid property of *each* frozen node, >> to >> find the main path of the node, version number, label etc. There doesn't >> seem to be a way of getting this information in a single query - it >> appears >> to be an "n+1" kind of problem. Are there any alternatives to this >> approach? > > you could store the path of the versionable node as a property when > you check it in. > that way you can query by that path property in the version storage. > > regards > marcel > > -- View this message in context: http://www.nabble.com/Searching-all-versions-and-searching-by-label-tp22041898p22098636.html Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
