Return-Path: Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: (qmail 1727 invoked from network); 28 May 2010 18:36:18 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 May 2010 18:36:18 -0000 Received: (qmail 80362 invoked by uid 500); 28 May 2010 18:36:16 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 80324 invoked by uid 500); 28 May 2010 18:36:16 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 80315 invoked by uid 99); 28 May 2010 18:36:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 May 2010 18:36:16 +0000 X-ASF-Spam-Status: No, hits=3.5 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of erickerickson@gmail.com designates 209.85.160.176 as permitted sender) Received: from [209.85.160.176] (HELO mail-gy0-f176.google.com) (209.85.160.176) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 May 2010 18:36:09 +0000 Received: by gyf1 with SMTP id 1so1523655gyf.35 for ; Fri, 28 May 2010 11:35:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=8eKwcwuw3MbguZExHrbpGaoegoGF4KtJOb4FFOasRgQ=; b=NMtVafjEWfWLNxkcJAom2vsDk3cEPV7HRC6G5uNf0FqdFafn1iPCJdxiULEoYdsPtO /9smG290EIuQo0Y2BkVq2GsbmvR6ps7NF1GdDq/aHWUwOBNjLsRbx0kWP6pbnjWpAdfS ptuFT9Q9jmFXSGYx6C/BxwsL7J0FfwqGqJ5yw= 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=hyBlzJ4SesG6Vp140W8FJhmccltSggA/85/rrExftXbgTBNNkS155FKnXOceo6UBHo /SZKx2DGqutuEVhE0hK1rkg09LHrO3j4j//3ZURB6JriSB0nxh5YLA5267uMrun33a1s vS3H9AmSiBaUnPLPJ0GH1KlCN6siWELcbo1Jg= MIME-Version: 1.0 Received: by 10.150.63.17 with SMTP id l17mr1978813yba.115.1275071748558; Fri, 28 May 2010 11:35:48 -0700 (PDT) Received: by 10.151.43.7 with HTTP; Fri, 28 May 2010 11:35:48 -0700 (PDT) In-Reply-To: References: <1275063987240-852346.post@n3.nabble.com> <13D828CF2C5A6D4597111B6E6571FD63090063C7A7@GMEXMBS2.globeandmail.net> Date: Fri, 28 May 2010 14:35:48 -0400 Message-ID: Subject: Re: Storing different entities in Solr From: Erick Erickson To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=000e0cd56cc6a2d1990487abc65b X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd56cc6a2d1990487abc65b Content-Type: text/plain; charset=ISO-8859-1 You most certainly *can* store the many<->many relationship, you are just denormalizing your data. I know it goes against the grain of any good database admin, but it's very often a good solution for a search application. You've gotta forget almost everything you learned about how data *should* be stored in databases when working with a search app. Well, perhaps I'm overstating a bit, but you get the idea.... When I see messages about primary keys and foreign keys etc, I break out in hives. It's almost always a mistake to try to force lucene/solr to behave like a database. Whenever you find yourself trying, stop, take a deep breath, and think about searching ... A lot depends on how much data we're talking about here. If fully denormalizing things would cost you 10M, who cares? If it would cost you 100G, it's a different story.... Best Erick On Fri, May 28, 2010 at 1:12 PM, Moazzam Khan wrote: > Thanks for all your answers guys. Requests and consultants have a many > to many relationship so I can't store request info in a document with > advisorID as the primary key. > > Bill's solution and multicore solutions might be what I am looking > for. Bill, will I be able to have 2 primary keys (so I can update and > delete documents)? If yes, can you please give me a link or someting > where I can get more info on this? > > Thanks, > Moazzam > > > > On Fri, May 28, 2010 at 11:50 AM, Bill Au wrote: > > You can keep different type of documents in the same index. If each > > document has a type field. You can restrict your searches to specific > > type(s) of document by using a filter query, which is very fast and > > efficient. > > > > Bill > > > > On Fri, May 28, 2010 at 12:28 PM, Nagelberg, Kallin < > > KNagelberg@globeandmail.com> wrote: > > > >> Multi-core is an option, but keep in mind if you go that route you will > >> need to do two searches to correlate data between the two. > >> > >> -Kallin Nagelberg > >> > >> -----Original Message----- > >> From: Robert Zotter [mailto:robertzotter@gmail.com] > >> Sent: Friday, May 28, 2010 12:26 PM > >> To: solr-user@lucene.apache.org > >> Subject: Re: Storing different entities in Solr > >> > >> > >> Sounds like you'll want to use a multiple core setup. One core fore each > >> type > >> of "document" > >> > >> http://wiki.apache.org/solr/CoreAdmin > >> -- > >> View this message in context: > >> > http://lucene.472066.n3.nabble.com/Storing-different-entities-in-Solr-tp852299p852346.html > >> Sent from the Solr - User mailing list archive at Nabble.com. > >> > > > --000e0cd56cc6a2d1990487abc65b--