Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 89362 invoked from network); 13 Feb 2008 17:52:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Feb 2008 17:52:47 -0000 Received: (qmail 71254 invoked by uid 500); 13 Feb 2008 17:52:34 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 71233 invoked by uid 500); 13 Feb 2008 17:52:34 -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 71222 invoked by uid 99); 13 Feb 2008 17:52:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Feb 2008 09:52:34 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of spring@gmx.eu designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 13 Feb 2008 17:51:49 +0000 Received: (qmail invoked by alias); 13 Feb 2008 17:52:09 -0000 Received: from e178085049.adsl.alicedsl.de (EHLO msrvcn04) [85.178.85.49] by mail.gmx.net (mp017) with SMTP; 13 Feb 2008 18:52:09 +0100 X-Authenticated: #2635966 X-Provags-ID: V01U2FsdGVkX19WjLlNfH1WCEAycbgxMtslG3Oh59ayPjCrV5XhIs IrO11t58L6A8VH From: To: References: <614886DDE7054DB0A3B84D1042E7E604@msrvcn04> <47B32C4A.4010408@propylon.com> Subject: RE: design: merging resultset from RDBMS with lucene search results Date: Wed, 13 Feb 2008 18:52:25 +0100 Message-ID: <9CA3C0CD6DF34287AAC27A09FBCF6C6B@msrvcn04> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4133 In-Reply-To: <47B32C4A.4010408@propylon.com> Thread-Index: AchuaBPsdDmIoiawSImzK9h0ka1HqQAAJCSg X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org The metadata is quite offen altered and there are millions of documents. Also document access is secured by complex sql statements which lucene might not support. So this is not an option I think. > -----Original Message----- > From: John Byrne [mailto:john.byrne@propylon.com] > Sent: Mittwoch, 13. Februar 2008 18:44 > To: java-user@lucene.apache.org > Subject: Re: design: merging resultset from RDBMS with lucene > search results > > Hi, > > You might consider avoiding this problem altogether, by simply adding > the meta data to your Lucene index. Lucene can handle untokenized > fields, which is ideal for meta data. It might not be as quick as the > RDB, but you could perhaps optimize by only searching in the RDB when > you only need to search meta data, and using Lucene when you > need both. > > Regards, > JB > > spring@gmx.eu wrote: > > Hi, > > > > I have the following scenario: > > > > RDBMS which contains the metadata for documents (ID, > customer number, > > doctype etc.). > > Now I want to add fulltext search support. > > > > So I will index the documents content in lucene and add the > documents ID as > > a stored field in lucene. > > > > Now somebody wants to search like this: customer number > 1234 AND content > > "foo bar". > > > > So I go to lucene, search for content:"foo bar" and get > back a hitlist > > containing the documents IDs. > > > > Now - how to merge these Ids with the resultset of the > RDBM's search for > > customer number 1234? > > > > 1) select ... from ... where customer=1234 and ID in > (). > > > > or > > > > 2) select ... from ... where customer=1234 and them join > both resultsets in > > the application. > > > > or > > > > 3) no idea :) > > > > What is best practice here? > > > > Thank you. > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > > For additional commands, e-mail: java-user-help@lucene.apache.org > > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org