Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C57E39F7F for ; Wed, 21 Mar 2012 14:18:55 +0000 (UTC) Received: (qmail 6239 invoked by uid 500); 21 Mar 2012 14:18:53 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 6162 invoked by uid 500); 21 Mar 2012 14:18:52 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 6152 invoked by uid 99); 21 Mar 2012 14:18:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Mar 2012 14:18:52 +0000 X-ASF-Spam-Status: No, hits=-0.3 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_HI,SPF_PASS,TO_NO_BRKTS_DIRECT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [130.11.10.9] (HELO gsvaresm04.er.usgs.gov) (130.11.10.9) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Mar 2012 14:18:46 +0000 To: java-user@lucene.apache.org MIME-Version: 1.0 Subject: Breaking up a query results based upon ROWNUM or something similar? X-KeepSent: 0F8A3F24:6F940E61-852579C8:004E23DF; type=4; name=$KeepSent X-Mailer: Lotus Notes Release 8.5.2FP2 March 23, 2011 Message-ID: From: Doug Kunzman Date: Wed, 21 Mar 2012 10:18:25 -0400 X-MIMETrack: Serialize by Router on gsvaresm04/SERVER/USGS/DOI(Release 8.5.2FP2HF661 | September 20, 2011) at 03/21/2012 10:18:45, Serialize complete at 03/21/2012 10:18:45 Content-Type: multipart/alternative; boundary="=_alternative 004E97A3852579C8_=" X-Virus-Checked: Checked by ClamAV on apache.org --=_alternative 004E97A3852579C8_= Content-Type: text/plain; charset="US-ASCII" I'm new to lucene and have searched the archives and FAQ for an answer on how to do something and have found no information. Our server is running SOLR and is running out of memory when returning large result sets. I was curious if anyone there would know how to break up a query so that returns only a first the 10000 results, and then the next 10000 results, from query that would normally return a 100000? Something like this in Oracle speech... select * from ( select a.*, ROWNUM rnum from ( ) a where ROWNUM <= :MAX_ROW_TO_FETCH ) where rnum >= :MIN_ROW_TO_FETCH; thanks, Doug --=_alternative 004E97A3852579C8_=--