Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 12969 invoked from network); 14 Dec 2005 14:22:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Dec 2005 14:22:51 -0000 Received: (qmail 89335 invoked by uid 500); 14 Dec 2005 14:22:41 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 89091 invoked by uid 500); 14 Dec 2005 14:22:39 -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 88819 invoked by uid 99); 14 Dec 2005 14:22:38 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Dec 2005 06:22:38 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.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, 14 Dec 2005 06:22:36 -0800 Received: by ehatchersolutions.com (Postfix, from userid 504) id EABEC13E202A; Wed, 14 Dec 2005 09:22:14 -0500 (EST) Received: from [128.143.167.108] (d-128-167-108.bootp.Virginia.EDU [128.143.167.108]) by ehatchersolutions.com (Postfix) with ESMTP id E5DF613E2005 for ; Wed, 14 Dec 2005 09:21:55 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Erik Hatcher Subject: Re: Retriving the data from lucene Date: Wed, 14 Dec 2005 09:21:56 -0500 To: java-user@lucene.apache.org X-Mailer: Apple Mail (2.746.2) X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on javelina X-Spam-Level: X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Dec 14, 2005, at 6:52 AM, Ravi wrote: > 1) I want to store all the details of the my data in the lucene and > I want > to retrieve from the lucene than storing in the database and > retrieve that > from database .Is this technique is good or bad or any other > solution to > this type of problem Please suggest me. This is one of those areas where it really depends. It's fine to store information in Lucene, but whether that is best for your scenario really depends on the rest of your architecture. > 2) I have one more problem is I want to retrieve the max 1000 docs > from the > search. How can I solve this problem . Stop iterating Hits after 1000 :) Or use one of the other .search methods that allows you to specify (though this is entering expert- level API area) or use a HitCollector. > 3) I want to display page by page max 100. > a) load all the data at a time and store in temp location and > display 1-100 ,101-200 and so on.... 900-1000. > b) load only first 1-00 and whenever user clicks next 100 I want to > display next hundred by loading or searching again.. The first hit here gives you some best practices: http://www.lucenebook.com/search?query=paging The main idea is simply to re-search for each page, just picking up the Hits iteration at the proper offset. If that is not performant enough, then it'd be time to seek another solution, but I've never had to go there myself. Erik --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org