jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ronaldo Florence" <rflore...@nexen.com.br>
Subject RES: Paging results
Date Sat, 02 Jun 2007 20:14:07 GMT
Ok Marcel,

But I didn't know that we had to set resultFetchSize so that It didn't
consume all the server memory... But setting this did the trick...

Thaks again... 

-----Mensagem original-----
De: Marcel Reutegger [mailto:marcel.reutegger@gmx.net] 
Enviada em: sábado, 2 de junho de 2007 06:32
Para: users@jackrabbit.apache.org
Assunto: Re: Paging results

Ronaldo Florence wrote:
> I'm trying to page the results of a Xpath query, but I'm not sure how 
> to do this. I used the skip method on the NodeIterator class, but I 
> can't bring every node to memory, I need to page the results on the 
> query, I have a large amount of data so it's imperative to do so.
> I tried the following query:
> //site/Dados/element(*, mtx:content)[position()=1 or position()=2 or 
> position()=3]

jackrabbit only has limited support for the position() function, mainly to
address same name siblings.

the skip method is exactly what you should use. the returned NodeIterator
loads the nodes on a lazy basis. which means jackrabbit will only load nodes
that you actually access and none of the skipped ones.


View raw message