Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 67258 invoked from network); 16 Feb 2007 13:38:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Feb 2007 13:38:45 -0000 Received: (qmail 32046 invoked by uid 500); 16 Feb 2007 13:38:52 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 31765 invoked by uid 500); 16 Feb 2007 13:38:52 -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 31756 invoked by uid 99); 16 Feb 2007 13:38:52 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Feb 2007 05:38:52 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of marcel.reutegger@gmx.net designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 16 Feb 2007 05:38:42 -0800 Received: (qmail invoked by alias); 16 Feb 2007 13:38:21 -0000 X-Provags-ID: V01U2FsdGVkX18/mkFl0NM/QmVXms4Ti3rLuxqwceTy43gZ5InJuO Pwtg== Message-ID: <45D5B3C0.1000000@gmx.net> Date: Fri, 16 Feb 2007 14:38:08 +0100 From: Marcel Reutegger User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: users@jackrabbit.apache.org Subject: Re: Why these two queries don't return the same? References: <1171622403.10018.18.camel@antares> In-Reply-To: <1171622403.10018.18.camel@antares> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org Paco Avila wrote: > I think this two queries are "equivalents" because both search in the > node content, but the results are differents: > > //element(*,okm:document)/@jcr:path[jcr:contains(okm:content,'apache')] > order by @jcr:score descending > > //element(*,okm:resource)/@jcr:path[jcr:contains(.,'apache')] order by > @jcr:score descending The queries actually look malformed. Shouldn't it read: //element(*,okm:document)[jcr:contains(okm:content,'apache')] order by @jcr:score descending and //element(*,okm:resource)[jcr:contains(.,'apache')] order by @jcr:score descending ? But even then, the nodes in the query result will be different because of the element() node test. the first query will return okm:document nodes, whereas the second query will return okm:resource nodes. regards marcel