Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 44055 invoked from network); 7 Sep 2005 16:10:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Sep 2005 16:10:05 -0000 Received: (qmail 60437 invoked by uid 500); 7 Sep 2005 16:09:59 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 60418 invoked by uid 500); 7 Sep 2005 16:09:59 -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 Delivered-To: moderator for java-user@lucene.apache.org Received: (qmail 34755 invoked by uid 99); 7 Sep 2005 15:57:47 -0000 X-ASF-Spam-Status: No, hits=0.3 required=10.0 tests=HTML_10_20,HTML_MESSAGE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of haipengdu@gmail.com designates 64.233.162.200 as permitted sender) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=lF9JrgMvyRmZge8h1FAYLDJCkDOjJDraw08uAd7kXBq27Eggx9gmpRF+qUQCfZocYvKtBiZeBm7VlWiuxkvaGpObyVy+fOtWQu3T0f1qa96Dk4raj88ifFwXdRi1jwnDMAUW26W2JlFuPlU+FdLoOBJ3AOqm6pSIs8K7TqVLXz4= Message-ID: Date: Wed, 7 Sep 2005 09:57:45 -0600 From: haipeng du To: java-user@lucene.apache.org Subject: limit lucene result Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_692_20283251.1126108665299" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_692_20283251.1126108665299 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline The reason that I want to limit returned result is that I do not want to get out of memory problem. I index lucene with 3 million documents. Sometimes, searching will return millions of fields back to me. I just want to get the first 100, for example , to show them to user. Even, I use search(query,filter,topDocs), I believe it still return all results back. So how could I limit the lucene returning? --=20 Haipeng Du Software Engineer Comphealth,=20 Salt Lake City ------=_Part_692_20283251.1126108665299--