Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 94080 invoked from network); 9 Jul 2009 13:45:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Jul 2009 13:45:15 -0000 Received: (qmail 32002 invoked by uid 500); 9 Jul 2009 13:45:23 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 31925 invoked by uid 500); 9 Jul 2009 13:45:23 -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 31915 invoked by uid 99); 9 Jul 2009 13:45:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jul 2009 13:45:23 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of erickerickson@gmail.com designates 209.85.221.203 as permitted sender) Received: from [209.85.221.203] (HELO mail-qy0-f203.google.com) (209.85.221.203) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jul 2009 13:45:14 +0000 Received: by qyk41 with SMTP id 41so119356qyk.29 for ; Thu, 09 Jul 2009 06:44:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=Ph0DJZFcHh8levNkoY+JhYGgjV7RpVKH9cheifHv8ow=; b=NPejvra/jGKdvLdpohiah0EeUnRVPB0cNNigfqgreUAeFbv+TFCffAFFGFvUXv46UB iolXM2UZaw63m0I+NDb/nz0oHlu7NbVSxYUdnQ5pDVB/k5gGrkq4xFvo8YFBaseNB+jZ n6LUBF6ZFVO90PqQrAoh8POMpnkPBR7nBrqGQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=q3t7SLDZ3rGK2JI/VBPxf7RErT8a6u6vRwTSvcSJAu+WJtuYJ4nIQRd5GTj1EHmuEy QnCWkznWQfxb6hQa79ZGpyhMxsA1/XcAxDSiNZkntKNAfm6oqzkIRBlp4QuO6cOOcibS vphU9oJdbUvKl80TFI0SPVwKSJWS8O8RgTWTY= MIME-Version: 1.0 Received: by 10.231.36.68 with SMTP id s4mr224471ibd.47.1247147092005; Thu, 09 Jul 2009 06:44:52 -0700 (PDT) In-Reply-To: <24404198.post@talk.nabble.com> References: <24404198.post@talk.nabble.com> Date: Thu, 9 Jul 2009 09:44:51 -0400 Message-ID: <359a92830907090644h1de3b27fv66b328ede3f14826@mail.gmail.com> Subject: Re: Using IN to retrieve data after lucene search. From: Erick Erickson To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=00221504874f66d46a046e460f4e X-Virus-Checked: Checked by ClamAV on apache.org --00221504874f66d46a046e460f4e Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit It depends (tm). How much data are we talking about here?I dislike having to have two data sources for a running app just because it's more complicated, so my first try would be to store all the data in the index and try it. A several Gigabyte index is not a problem at all (depending upon how you use it, that is). But note that storing data doesn't impact searching speed as much as you'd think, indexing and storing are orthogonal, and you only access the stored data when you get the document, not when searching. But none of this matters if you have to go to the database anyway. If you can *completely* satisfy the search by storing the entire table in the index, I'd just try that first. Best Erick On Thu, Jul 9, 2009 at 1:22 AM, Aditya R wrote: > > Hi all, > > I am new to lucene. In my sample application I have used lucene to index my > 17 field db table. I have stored only the primary key of the table in > lucene > index and indexed other 16 fields, without storing them. The primary keys > of > the searched keyword is then retrieved. The primary key string is then > queried in the database like this > 'String quer="from Doctors where id IN "+primaryKeys;' , where > 'primaryKeys' will be something like this (23,32,44,56). > Is this the right way to use lucene? Or do you suggest me to store all the > fields in the lucene index and retrieve them. > > Thanks, > Aditya > -- > View this message in context: > http://www.nabble.com/Using-IN-to-retrieve-data-after-lucene-search.-tp24404198p24404198.html > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > --00221504874f66d46a046e460f4e--