Hello Marcel, thanks for your reply. You asked me if ordering on child axis works without the join and that RelPathScoreDocComparator only works when using a relative path in the order by. I have tried to use a relative path, but I was getting syntax errors in SQL-2.
Could you tell me the right SQL-2 syntax for my query using a relative path in the order by ? And how can I make the same fulltext search select on web_templates:pressContainer and its jnt:transalation child node without join? I also only want to get one result even if there is a match in the pressContainer and the child node. Thanks for your help. Regards, Benjamin 2009/10/26 Marcel Reutegger <[email protected]> > Hi, > > On Wed, Oct 21, 2009 at 10:01, Benjamin Papez <[email protected]> > wrote: > > Hello, > > > > I am using Jackrabbit 2.0 alpha10 and I am testing the following SQL-2 > > query: > > > > select press.* from [web_templates:pressContainer] as press inner join > > [jnt:translation] as translation on ischildnode(translation, press) where > > contains(press.*, '${searchTerm}') or contains(translation.*, > > '${searchTerm}') order by translation.[jcr:title_en] desc > > > > but the ordering does not work. > > does it work without the join? > > otherwise please file a jira issue and provide steps how to reproduce > the issue. thanks. > > > Debugging the SimpleScoreDocComparator I see > > that the values for comparing are null all the time. Looking at > > *JCR-800<http://issues.apache.org/jira/browse/JCR-800> > > *I assume that RelPathScoreDocComparator should be used instead. > > that one is only used when there is a relative path in the order by > clause with more than one segment. otherwise the > SimpleScoreDocComparator is used. > > regards > marcel > > > Does this > > already work with SQL-2 queries or do I have to change the query in order > to > > make it work ? > > > > Regards, > > Benjamin > > >
