Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 38169 invoked from network); 21 Feb 2007 22:43:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Feb 2007 22:43:42 -0000 Received: (qmail 43513 invoked by uid 500); 21 Feb 2007 22:43:39 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 43479 invoked by uid 500); 21 Feb 2007 22:43:38 -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 43426 invoked by uid 99); 21 Feb 2007 22:43:38 -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 14:43:38 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [169.229.70.167] (HELO rescomp.berkeley.edu) (169.229.70.167) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Feb 2007 14:43:26 -0800 Received: by rescomp.berkeley.edu (Postfix, from userid 1007) id A55B85B772; Wed, 21 Feb 2007 14:43:05 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by rescomp.berkeley.edu (Postfix) with ESMTP id 9D45F7F403 for ; Wed, 21 Feb 2007 14:43:05 -0800 (PST) Date: Wed, 21 Feb 2007 14:43:05 -0800 (PST) From: Chris Hostetter To: java-user@lucene.apache.org Subject: Re: Returning only a small set of results In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org : A question about efficiency and the internal workings of the Hits class. : When we make a call to IndexSearcher's search method thus: : : Hits hits = searcher.Search(query); : : Do we actually, physically get back all the results of the query even if : there are 20 million results or for efficiency do we physically get back the Hits class fetches back the first N result documents (where N is 100 i think) and then it fetches more and more as needed if you ask for more. generally speaking Hits works fine for simple pagination applications, but if you are intented on walking deep down the list of ordred results, i would avoid it. -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org