jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas Dufour" <nrduf...@gmail.com>
Subject Re: RES: Paging results
Date Tue, 12 Jun 2007 17:29:19 GMT
I have used a simple way to do pagination.

I have first defined how many items is a page, so let's say 50.

Then I do my query with no special parameters.

Then I use this wonderful method of NodeIterator : skip !

skip(page*nb_element_per_page)

and then retrieve the elements after and limit them to 50 and you're set.


Nicolas


On 6/11/07, Marcel Reutegger <marcel.reutegger@gmx.net> wrote:
>
> Ronaldo Florence wrote:
> > 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?
>
> correct.
>
> > 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?
>
> no, that doesn't help. as you mentioned already, the underlying
> implementation
> is the same for RowIterator as well as for NodeIterator.
>
> regards
>   marcel
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message