Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 71795 invoked from network); 22 Mar 2010 08:24:22 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 Mar 2010 08:24:22 -0000 Received: (qmail 53713 invoked by uid 500); 22 Mar 2010 08:24:21 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 53598 invoked by uid 500); 22 Mar 2010 08:24:21 -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 53589 invoked by uid 99); 22 Mar 2010 08:24:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Mar 2010 08:24:21 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aklimets@day.com designates 207.126.148.87 as permitted sender) Received: from [207.126.148.87] (HELO eu3sys201aog101.obsmtp.com) (207.126.148.87) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 22 Mar 2010 08:24:12 +0000 Received: from source ([209.85.220.228]) by eu3sys201aob101.postini.com ([207.126.154.11]) with SMTP ID DSNKS6cpF3b2b147vlpMcIjq43c4ZgpbuNCn@postini.com; Mon, 22 Mar 2010 08:23:52 UTC Received: by fxm28 with SMTP id 28so695329fxm.16 for ; Mon, 22 Mar 2010 01:23:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.27.70 with SMTP id h6mr1658066fac.50.1269246231706; Mon, 22 Mar 2010 01:23:51 -0700 (PDT) In-Reply-To: References: Date: Mon, 22 Mar 2010 09:23:51 +0100 Message-ID: Subject: Re: number of results in a query? From: Alexander Klimetschek To: users@jackrabbit.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Mar 19, 2010 at 20:50, Rodrigo Meza wrote: > So, my question is: Is there any way to get the total number (or even > an estimation) of the results returned by a query? Iterate over the result and count yourself. > As far as the javadoc specification of > javax.jcr.RangeIterator.getSize() =A0says, is should exist a method > getNumberRemaining that gives an estimation of the total number of > results, but that method is not there. That sentence in the jcr 2.0 javadocs must be an error as that method does not exist (maybe it was planned but not added to the spec and the docs weren't correctly updated). Regards, Alex --=20 Alexander Klimetschek alexander.klimetschek@day.com