Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 28196 invoked from network); 7 Aug 2008 20:30:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Aug 2008 20:30:55 -0000 Received: (qmail 87709 invoked by uid 500); 7 Aug 2008 20:30:49 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 87694 invoked by uid 500); 7 Aug 2008 20:30:49 -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 87673 invoked by uid 99); 7 Aug 2008 20:30:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Aug 2008 13:30:49 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Aug 2008 20:29:52 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1KRC7n-0004DO-HD for users@jackrabbit.apache.org; Thu, 07 Aug 2008 13:30:19 -0700 Message-ID: <18879020.post@talk.nabble.com> Date: Thu, 7 Aug 2008 13:30:19 -0700 (PDT) From: hsp_ To: users@jackrabbit.apache.org Subject: Query result with offset/limit MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: piccinatto@ibest.com.br X-Virus-Checked: Checked by ClamAV on apache.org jackrabbit version is 1.4 (jackrabbit-core - 1.4.5). I would to know if there is a workaround for the situation I will explain: I use searches with result limit and offset but it is working some wrong for my case. Lets suppose the total of nodes that will return with the search: NAME GRANTACCESS OFFSET node1 true 0 node2 false 1 node3 true 2 node4 true 3 node5 false 4 My page must have 2 records, so first I do a count for the search and get size of 3 records (after filtered by my security class invoked automatically by jackrabbit), so I have 2 pages to show to the user. The first page must return 2 records, of course, and the second must return 1 record. In the first search I do set: QueryImpl.setLimit(2); QueryImp.setOffset(0); So, I get the nodes 1 and 3, thats correct. In the second same search (for second page), I do set: QueryImpl.setLimit(2); QueryImp.setOffset(2); This way I pretend to get two records, starting from the record nro 3, which would be only the node4. But, the result I got is node3 (again) and node4, because the offset worked not according to the grantacess (provided by the security class), but according to the sequence of the raw result. Is there some way to my application handle this offset to start in the correct position (counting only the granted nodes and not all of them)? Or maybe is this an issue? Hope this make sense for you. Thanks. Helio. -- View this message in context: http://www.nabble.com/Query-result-with-offset-limit-tp18879020p18879020.html Sent from the Jackrabbit - Users mailing list archive at Nabble.com.