Jackrabbit normally (AFAIK in the default config) does a lazy resolving of the query result nodes, so all the nodes you don't ask for (which happens in hte JsonQueryServlet by using the offset and rows params), won't be fetched.
Regards, Alex On Wed, Nov 12, 2008 at 2:45 PM, 付 尧 <[EMAIL PROTECTED]> wrote: > Hi Delacretaz, > > Thanks for you message. > > I see the code of the JsonQuerySevlet, but in my opinion the way it > supported paginate doesn't seems right. > > It fetch all the result and skip the result before the offset. > > That should done by the query, and Jackrabbit has done it(though jcr didn't > standardize it). > > I also need the total result count to calculate the total page number too. > > Why sling didn't use Jackrabbit's paginate query support? > ----- > Jack > > > > 在 2008-11-12,下午9:37, Bertrand Delacretaz 写道: > >> Hi Jack, >> >> On Wed, Nov 12, 2008 at 2:31 PM, 付 尧 <[EMAIL PROTECTED]> wrote: >>> >>> ...But when I turn to JsonQueryServlet. I found it didn't use it at >>> all.... >> >> JsonQueryServlet does support result set pagination, with the "offset" >> and "rows" parameters. >> >> So for example ...query.json?offset=2&rows=5 will return up to 5 >> items, skipping the first 2 of the result set. >> >> -Bertrand > > -- Alexander Klimetschek [EMAIL PROTECTED]
