Joining Across Collections

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Joining Across Collections

nabil Kouici-2
Hi All,
I'm using  join across collection feature to do an inner join between 2 collections. It works fine.
Is it possible to use this feature to compare between fields from different collections. For exemple:
Collection1 Field1Collection2 Field2
search document from Collection1 where Field1 != Field2
In sql, this will translated to:
Select A.* From Collection1 A inner join Collection2 B on  A.id=B.idWhere A.Field1<>B.Field2

Thank you.
Regards,NKI.
Reply | Threaded
Open this post in threaded view
|

Re: Joining Across Collections

Billnbell
Great question

Bill Bell
Sent from mobile


> On Jan 18, 2017, at 1:32 AM, nabil Kouici <[hidden email]> wrote:
>
> Hi All,
> I'm using  join across collection feature to do an inner join between 2 collections. It works fine.
> Is it possible to use this feature to compare between fields from different collections. For exemple:
> Collection1 Field1Collection2 Field2
> search document from Collection1 where Field1 != Field2
> In sql, this will translated to:
> Select A.* From Collection1 A inner join Collection2 B on  A.id=B.idWhere A.Field1<>B.Field2
>
> Thank you.
> Regards,NKI.
Reply | Threaded
Open this post in threaded view
|

Re: Joining Across Collections

Mikhail Khludnev-2
In reply to this post by nabil Kouici-2
It seems like it can be done by just negating join query or I'm missing
something.

On Wed, Jan 18, 2017 at 11:32 AM, nabil Kouici <[hidden email]>
wrote:

> Hi All,
> I'm using  join across collection feature to do an inner join between 2
> collections. It works fine.
> Is it possible to use this feature to compare between fields from
> different collections. For exemple:
> Collection1 Field1Collection2 Field2
> search document from Collection1 where Field1 != Field2
> In sql, this will translated to:
> Select A.* From Collection1 A inner join Collection2 B on  A.id=B.idWhere
> A.Field1<>B.Field2
>
> Thank you.
> Regards,NKI.
>



--
Sincerely yours
Mikhail Khludnev
Reply | Threaded
Open this post in threaded view
|

RE: Joining Across Collections

Moenieb Davids
Hi Guys

Just a quick question on search and join:

I have a few cores which is based on a mainframe extract, 1 core per extracted file which resembles a "DB Table"
The cores are all somehow linked via 1 to many fields, with a structure similar to a normal ERD

Is it possible to return the result from a query that joins lets say 3 cores in the following format:

        "core1_id":"XXX",
        "_childDocuments_":[
        {
          "core2_id":"yyy",
          "core_2_fieldx":"ABC",
                  "_childDocuments_":[
                  {
                    "core3_id":"zzz",
                    "core_3_fieldx":"ABC",
                    "core3_fieldy":"123",
                  {
          "core2_fieldy":"123",
        {

Regards
Moenieb Davids

-----Original Message-----
From: Mikhail Khludnev [mailto:[hidden email]]
Sent: 19 January 2017 10:00 AM
To: solr-user; nabil Kouici
Subject: Re: Joining Across Collections

It seems like it can be done by just negating join query or I'm missing something.

On Wed, Jan 18, 2017 at 11:32 AM, nabil Kouici <[hidden email]>
wrote:

> Hi All,
> I'm using  join across collection feature to do an inner join between
> 2 collections. It works fine.
> Is it possible to use this feature to compare between fields from
> different collections. For exemple:
> Collection1 Field1Collection2 Field2
> search document from Collection1 where Field1 != Field2 In sql, this
> will translated to:
> Select A.* From Collection1 A inner join Collection2 B on  
> A.id=B.idWhere
> A.Field1<>B.Field2
>
> Thank you.
> Regards,NKI.
>



--
Sincerely yours
Mikhail Khludnev










===========================================================================
GPAA e-mail Disclaimers and confidential note

This e-mail is intended for the exclusive use of the addressee only.
If you are not the intended recipient, you should not use the contents
or disclose them to any other person. Please notify the sender immediately
and delete the e-mail. This e-mail is not intended nor
shall it be taken to create any legal relations, contractual or otherwise.
Legally binding obligations can only arise for the GPAA by means of
a written instrument signed by an authorised signatory.
===========================================================================
Reply | Threaded
Open this post in threaded view
|

Re: Joining Across Collections

nabil Kouici-2
In reply to this post by Mikhail Khludnev-2
Hi Mikhail,
I'm not we can do a negation because Field1 and Field2 are not in the join condition.
Regards,Nabil.

      De : Mikhail Khludnev <[hidden email]>
 À : solr-user <[hidden email]>; nabil Kouici <[hidden email]>
 Envoyé le : Jeudi 19 janvier 2017 9h00
 Objet : Re: Joining Across Collections
   
It seems like it can be done by just negating join query or I'm missing
something.

On Wed, Jan 18, 2017 at 11:32 AM, nabil Kouici <[hidden email]>
wrote:

> Hi All,
> I'm using  join across collection feature to do an inner join between 2
> collections. It works fine.
> Is it possible to use this feature to compare between fields from
> different collections. For exemple:
> Collection1 Field1Collection2 Field2
> search document from Collection1 where Field1 != Field2
> In sql, this will translated to:
> Select A.* From Collection1 A inner join Collection2 B on  A.id=B.idWhere
> A.Field1<>B.Field2
>
> Thank you.
> Regards,NKI.
>



--
Sincerely yours
Mikhail Khludnev


   
Reply | Threaded
Open this post in threaded view
|

RE: Joining Across Collections

Moenieb Davids
Hi Guys

Just a quick question on search and join:

I have a few cores which is based on a mainframe extract, 1 core per extracted file which resembles a "DB Table"
The cores are all somehow linked via 1 to many fields, with a structure similar to a normal ERD

Is it possible to return the result from a query that joins lets say 3 cores in the following format:

        "core1_id":"XXX",
        "_childDocuments_":[
        {
          "core2_id":"yyy",
          "core_2_fieldx":"ABC",
                  "_childDocuments_":[
                  {
                    "core3_id":"zzz",
                    "core_3_fieldx":"ABC",
                    "core3_fieldy":"123",
                  {
          "core2_fieldy":"123",
        {

Regards
Moenieb Davids

-----Original Message-----
From: nabil Kouici [mailto:[hidden email]]
Sent: 20 January 2017 03:43 PM
To: [hidden email]
Subject: Re: Joining Across Collections

Hi Mikhail,
I'm not we can do a negation because Field1 and Field2 are not in the join condition.
Regards,Nabil.

      De : Mikhail Khludnev <[hidden email]>
 À : solr-user <[hidden email]>; nabil Kouici <[hidden email]>
 Envoyé le : Jeudi 19 janvier 2017 9h00
 Objet : Re: Joining Across Collections
   
It seems like it can be done by just negating join query or I'm missing
something.

On Wed, Jan 18, 2017 at 11:32 AM, nabil Kouici <[hidden email]>
wrote:

> Hi All,
> I'm using  join across collection feature to do an inner join between 2
> collections. It works fine.
> Is it possible to use this feature to compare between fields from
> different collections. For exemple:
> Collection1 Field1Collection2 Field2
> search document from Collection1 where Field1 != Field2
> In sql, this will translated to:
> Select A.* From Collection1 A inner join Collection2 B on  A.id=B.idWhere
> A.Field1<>B.Field2
>
> Thank you.
> Regards,NKI.
>



--
Sincerely yours
Mikhail Khludnev


   










===========================================================================
GPAA e-mail Disclaimers and confidential note

This e-mail is intended for the exclusive use of the addressee only.
If you are not the intended recipient, you should not use the contents
or disclose them to any other person. Please notify the sender immediately
and delete the e-mail. This e-mail is not intended nor
shall it be taken to create any legal relations, contractual or otherwise.
Legally binding obligations can only arise for the GPAA by means of
a written instrument signed by an authorised signatory.
===========================================================================
Reply | Threaded
Open this post in threaded view
|

Re: Joining Across Collections

nabil Kouici-2
In reply to this post by nabil Kouici-2
Hi All,
It seems that it's not possible to compare fields from different collections.
I have another question:
Is it possible to use join to get all documents which existe in the first collection but not in the second.It's equivalent to SQL statement:
 Select A.* From Collection1 A LEFT OUTER JOIN Collection2 B on  A.id=B.idWhere B.Id is NULL;
Regards,NKI.

      De : nabil Kouici <[hidden email]>
 À : "[hidden email]" <[hidden email]>
 Envoyé le : Vendredi 20 janvier 2017 14h42
 Objet : Re: Joining Across Collections
   
Hi Mikhail,
I'm not we can do a negation because Field1 and Field2 are not in the join condition.
Regards,Nabil.

      De : Mikhail Khludnev <[hidden email]>
 À : solr-user <[hidden email]>; nabil Kouici <[hidden email]>
 Envoyé le : Jeudi 19 janvier 2017 9h00
 Objet : Re: Joining Across Collections
 
It seems like it can be done by just negating join query or I'm missing
something.

On Wed, Jan 18, 2017 at 11:32 AM, nabil Kouici <[hidden email]>
wrote:

> Hi All,
> I'm using  join across collection feature to do an inner join between 2
> collections. It works fine.
> Is it possible to use this feature to compare between fields from
> different collections. For exemple:
> Collection1 Field1Collection2 Field2
> search document from Collection1 where Field1 != Field2
> In sql, this will translated to:
> Select A.* From Collection1 A inner join Collection2 B on  A.id=B.idWhere
> A.Field1<>B.Field2
>
> Thank you.
> Regards,NKI.
>



--
Sincerely yours
Mikhail Khludnev