lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Walter Underwood <wun...@wunderwood.org>
Subject Re: Joining across collections with Nested documents
Date Fri, 03 Mar 2017 15:39:45 GMT
Make two denormalized collections. Just don’t join at query time.

wunder
Walter Underwood
wunder@wunderwood.org
http://observer.wunderwood.org/  (my blog)


> On Mar 3, 2017, at 1:01 AM, Preeti Bhat <preeti.bhat@shoregrp.com> wrote:
> 
> We can't, they are being used for different purposes and we have few cases where we would
need data from both.
> 
> 
> Thanks and Regards,
> Preeti Bhat
> 
> -----Original Message-----
> From: Walter Underwood [mailto:wunder@wunderwood.org]
> Sent: Friday, March 03, 2017 12:02 PM
> To: solr-user@lucene.apache.org
> Subject: Re: Joining across collections with Nested documents
> 
> Make one collection with denormalized data. This looks like a relational, multi-table
schema in Solr. That will be slow and painful.
> 
> wunder
> Walter Underwood
> wunder@wunderwood.org
> http://observer.wunderwood.org/  (my blog)
> 
> 
>> On Mar 2, 2017, at 9:55 PM, Preeti Bhat <preeti.bhat@shoregrp.com> wrote:
>> 
>> Hi All,
>> 
>> I have two collections in solrcloud namely contact and company, they are in same
solr instance. Company is relatively simpler document with id, Name, address etc... Coming
over to Contact, this has the nested document like below. I would like to get the Company
details using the "CompanyId" field in child document  by joining this to the "Company" collections's
id document. Is this possible? Could someone please guide me on this?
>> 
>> {
>> id: "1"
>> , FirstName: "ABC"
>> , LastName: "BCD"
>> .
>> .
>> .
>> _childDocuments_:{
>> {
>> id:"123-1",
>> CompanyId: "123",
>> Email: "abc.bcd@smd.edu"
>> }
>> {
>> id:"124-1",
>> CompanyId: "124",
>> Email: "abc.bcd@smd.edu"
>> 
>> }
>> }
>> 
>> 
>> 
>> Thanks and Regards,
>> Preeti Bhat
>> 
>> 
>> 
>> NOTICE TO RECIPIENTS: This communication may contain confidential and/or privileged
information. If you are not the intended recipient (or have received this communication in
error) please notify the sender and it-support@shoregrp.com immediately, and destroy this
communication. Any unauthorized copying, disclosure or distribution of the material in this
communication is strictly forbidden. Any views or opinions presented in this email are solely
those of the author and do not necessarily represent those of the company. Finally, the recipient
should check this email and any attachments for the presence of viruses. The company accepts
no liability for any damage caused by any virus transmitted by this email.
>> 
>> 
> 
> 
> NOTICE TO RECIPIENTS: This communication may contain confidential and/or privileged information.
If you are not the intended recipient (or have received this communication in error) please
notify the sender and it-support@shoregrp.com immediately, and destroy this communication.
Any unauthorized copying, disclosure or distribution of the material in this communication
is strictly forbidden. Any views or opinions presented in this email are solely those of the
author and do not necessarily represent those of the company. Finally, the recipient should
check this email and any attachments for the presence of viruses. The company accepts no liability
for any damage caused by any virus transmitted by this email.
> 
> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message