Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 2358 invoked from network); 26 Oct 2009 12:20:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Oct 2009 12:20:49 -0000 Received: (qmail 97320 invoked by uid 500); 26 Oct 2009 12:20:48 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 97280 invoked by uid 500); 26 Oct 2009 12:20:48 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 97161 invoked by uid 99); 26 Oct 2009 12:20:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Oct 2009 12:20:47 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jahia.papez@gmail.com designates 209.85.220.210 as permitted sender) Received: from [209.85.220.210] (HELO mail-fx0-f210.google.com) (209.85.220.210) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Oct 2009 12:20:45 +0000 Received: by fxm6 with SMTP id 6so11276055fxm.43 for ; Mon, 26 Oct 2009 05:20:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=CIhUskq22yiu8iI5VH2/0L57ymmf509X8YOuRRQBslE=; b=SUAYTh7m3fZFCCHEqncT1/hexfJAFja1OQcsX1NR3VTxsZaszPZMmt9FIWVXw7gJVY qKUzfa51f9odut2LsXp7t3S2F6uhHsAMRyfDTpD4e8jkGF5LipXtX1tJ05r0R25nQ+vI cl9n1xRuK80zoTcy579v8GDV5CAhphGE15Gt0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=poLrfku+UWRQWYwItvF7xDA5TPrGbcrOIO+Nlu/wq4dCHP3uPUkushktjGC05b8lxq Wa1JzXxLIPymv8scQe3EzKQDhfm8IjYHYTokOk8jPGemeJkinvsQjwBLvte11ZzvJxgp gpCl1SN8vzQeQ/bW/+UJeUcoGWfPtuYZmjnuk= MIME-Version: 1.0 Received: by 10.204.7.144 with SMTP id d16mr5774491bkd.209.1256559623864; Mon, 26 Oct 2009 05:20:23 -0700 (PDT) In-Reply-To: References: <36ed29800910210101j6d495876y6b6dd7828c61a3a8@mail.gmail.com> Date: Mon, 26 Oct 2009 13:20:23 +0100 Message-ID: <36ed29800910260520s395fbdabw49a9bcd6bc94ce1d@mail.gmail.com> Subject: Re: SQL-2 Child Axis in order by clause From: Benjamin Papez To: users@jackrabbit.apache.org Content-Type: multipart/alternative; boundary=001517588cfa0502360476d596e6 --001517588cfa0502360476d596e6 Content-Type: text/plain; charset=ISO-8859-1 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 > Hi, > > On Wed, Oct 21, 2009 at 10:01, Benjamin Papez > 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 > > *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 > > > --001517588cfa0502360476d596e6--