Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 33014 invoked from network); 21 Feb 2007 14:59:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Feb 2007 14:59:06 -0000 Received: (qmail 45916 invoked by uid 500); 21 Feb 2007 14:59:06 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 45875 invoked by uid 500); 21 Feb 2007 14:59:06 -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 45864 invoked by uid 99); 21 Feb 2007 14:59:06 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Feb 2007 06:59:06 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [69.55.225.129] (HELO ehatchersolutions.com) (69.55.225.129) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Feb 2007 06:58:54 -0800 Received: by ehatchersolutions.com (Postfix, from userid 504) id 0A18530EFC18; Wed, 21 Feb 2007 07:58:33 -0700 (MST) X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on javelina X-Spam-Level: Received: from [128.143.193.79] (d-128-193-79.bootp.Virginia.EDU [128.143.193.79]) by ehatchersolutions.com (Postfix) with ESMTP id 53F0030EFC16 for ; Wed, 21 Feb 2007 07:58:30 -0700 (MST) Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <359a92830702210507i3e91ffcfu9249bd9df74dc41f@mail.gmail.com> References: <359a92830702210507i3e91ffcfu9249bd9df74dc41f@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <367092FE-DA32-489D-86B6-5C9A209B8D51@ehatchersolutions.com> Content-Transfer-Encoding: 7bit From: Erik Hatcher Subject: Re: pagination Date: Wed, 21 Feb 2007 09:58:25 -0500 To: java-user@lucene.apache.org X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.1.1 I'll add that in a web application that using Hits to page through results is perfectly acceptable. Going to these other APIs is a bit more complicated and often unnecessary. Don't prematurely optimize! :) Erik On Feb 21, 2007, at 8:07 AM, Erick Erickson wrote: > See TopDocs, HitCollector, etc. Don't iterate through a Hits > objects to get > docs beyond, say, 100 since it's designed to efficiently return the > first > 100 documents but re-executes the queries each 100 or so times you > advance > to the next document. > > Erick > > On 2/21/07, Kainth, Sachin wrote: >> >> Hello, >> >> I was wondering if Lucene provides any mechanism which helps in >> pagination. In other words is there a way to return the first 10 >> of 500 >> results and then the next 10 and so on. >> >> Cheers >> >> >> This email and any attached files are confidential and copyright >> protected. If you are not the addressee, any dissemination of this >> communication is strictly prohibited. Unless otherwise expressly >> agreed in >> writing, nothing stated in this communication shall be legally >> binding. >> >> The ultimate parent company of the Atkins Group is WS Atkins >> plc. Registered in England No. 1885586. Registered Office >> Woodcote Grove, >> Ashley Road, Epsom, Surrey KT18 5BW. >> >> Consider the environment. Please don't print this e-mail unless >> you really >> need to. >> --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org