From users-return-3540-apmail-jackrabbit-users-archive=jackrabbit.apache.org@jackrabbit.apache.org Mon Jun 04 15:55:02 2007 Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 85492 invoked from network); 4 Jun 2007 15:55:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Jun 2007 15:55:02 -0000 Received: (qmail 66147 invoked by uid 500); 4 Jun 2007 15:55:03 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 66131 invoked by uid 500); 4 Jun 2007 15:55:03 -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 66122 invoked by uid 99); 4 Jun 2007 15:55:03 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jun 2007 08:55:03 -0700 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [209.85.24.114] (HELO server.nexenhost.com) (209.85.24.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jun 2007 08:54:59 -0700 Received: from 201008146234.user.veloxzone.com.br ([201.8.146.234] helo=xws03) by server.nexenhost.com with esmtpa (Exim 4.63) (envelope-from ) id 1HvEt2-0003y8-Cr for users@jackrabbit.apache.org; Mon, 04 Jun 2007 12:54:29 -0300 From: Sender: "Ronaldo Florence" To: Subject: Re: Re: Paging results Date: Mon, 4 Jun 2007 12:59:01 -0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 thread-index: AcemgPWb3RHMHv9ETbCZ3sMbU+kYEAAP728AAAAhKHA= X-Antivirus: avast! (VPS 000747-0, 04/06/2007), Outbound message X-Antivirus-Status: Clean X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server.nexenhost.com X-AntiAbuse: Original Domain - jackrabbit.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nexen.com.br X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked by ClamAV on apache.org Message-Id: <20070604155459.3C3DD10FB007@herse.apache.org> But, As far as I know the RowIterator uses the NodeIterator in the inside, = so, it really doesn't make much of a difference does it? Since the problem really was, too many nodes brought to memory at = once... Leading to a OutOfMemory exception... Am I right? Or would RowIterator really help too? Thanks Ronaldo -----Mensagem original----- De: Paco Avila [mailto:pavila@git.es] Enviada em: segunda-feira, 4 de junho de 2007 05:18 Para: users@jackrabbit.apache.org Assunto: Re: Paging results El s=E1b, 02-06-2007 a las 11:31 +0200, Marcel Reutegger escribi=F3: > Ronaldo Florence wrote: > > I'm trying to page the results of a Xpath query, but I'm not sure=20 > > how to do this. I used the skip method on the NodeIterator class,=20 > > but I can't bring every node to memory, I need to page the results=20 > > on the query, I have a large amount of data so it's imperative to do = so. > > =20 > > I tried the following query: > > =20 > > //site/Dados/element(*, mtx:content)[position()=3D1 or = position()=3D2 or=20 > > position()=3D3] >=20 > jackrabbit only has limited support for the position() function,=20 > mainly to address same name siblings. >=20 > the skip method is exactly what you should use. the returned=20 > NodeIterator loads the nodes on a lazy basis. which means jackrabbit=20 > will only load nodes that you actually access and none of the skipped ones. You can also use the RowIterator.