Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 34676 invoked from network); 14 Apr 2009 16:13:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Apr 2009 16:13:35 -0000 Received: (qmail 21884 invoked by uid 500); 14 Apr 2009 16:13:33 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 21800 invoked by uid 500); 14 Apr 2009 16:13:32 -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 21790 invoked by uid 99); 14 Apr 2009 16:13:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Apr 2009 16:13:32 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Apr 2009 16:13:24 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1LtlFv-0003Yf-Ox for java-user@lucene.apache.org; Tue, 14 Apr 2009 09:13:03 -0700 Message-ID: <23042596.post@talk.nabble.com> Date: Tue, 14 Apr 2009 09:13:03 -0700 (PDT) From: Sam Hough To: java-user@lucene.apache.org Subject: Re: Self Join Query In-Reply-To: <359a92830801080704l403ad5dfhc884c92288009093@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: sam@redspr.com References: <1199794981.3156.79.camel@localhost.localdomain> <359a92830801080704l403ad5dfhc884c92288009093@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Bit late joining in but since this is the first Google hit for "site:www.nabble.com joins lucene" thought it was reasonable place to add this note: In my application "joins" also start to seem appealing. Almost all my use cases fit very nicely within what Lucene does apart from a "nice to have" ad hoc query tool. Here it becomes difficult to "join" the result of queries. I think the source of this difficulty is that while you can very efficiently get the two lists of document numbers for matching As and Bs (to use the original posters example) there is no, obvious, quick way to join the two. Since document numbers change it would be painful to maintain an external index. I started my application years ago before any real full text searching in postgres etc. Now I'm a bit addicted to how light and fast Lucene on its own is. Erick Erickson wrote: > > It's often a mistake to try to force Lucene to act like a database. Is it > possible to just use the database for the join portion and Lucene > for the text search? > > Otherwise I agree with Developer Developer. You need to provide > a higher level idea of *what* it is you're trying to accomplish to get > good suggestions. > > Best > Erick > > On Jan 8, 2008 7:23 AM, sachin wrote: > >> >> I need to write lucene query something similar to SQL self joins. >> >> My current implementation is very primitive. I fire first query, get the >> results, based on the result of first query I fire second query and then >> merge the results from both the queries. The whole processing is very >> expensive. Doing this is very easy with SQL query as we need to just >> write self join query and database do the rest for you. >> >> What is the best way of implementing the above functionality in lucene? >> >> Regards >> Sachin >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >> For additional commands, e-mail: java-user-help@lucene.apache.org >> >> > > -- View this message in context: http://www.nabble.com/Self-Join-Query-tp14688526p23042596.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