You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Steve Pruitt <bp...@opentext.com> on 2018/08/30 15:00:56 UTC

join works with a core, doesn't work with a collection

Is there something different I need to do for a query with a join for a Collection?  Singular Collection, not across Collections.

Initially, I used a Core for simple development.  One of my queries uses a join.  It works fine.

I created a Collection with the same schema.  Indexed the same documents, but the join returns an empty list.
I am running SolrCloud entirely locally using the Getting started with SolrCloud instructions.

The Query is:

q=expctr-type:journey&{!join from=expctr-label-memberIds to=expctr-id}expctr-id:4b6f7d34-a58b-3399-b077-685951d06738

the document 4b6f7d34-a58b-3399-b077-685951d06738
has the multivalue field memberIds.  Its contains identifiers of other documents.

Thanks in advance.

-S

Re: [EXTERNAL] - Re: join works with a core, doesn't work with a collection

Posted by Jan Høydahl <ja...@cominvent.com>.
Hi,

You can have multiple nodes as long as you make sure that your collection has only one shard, then the joins will work.

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

> 30. aug. 2018 kl. 19:51 skrev Steve Pruitt <bp...@opentext.com>:
> 
> Shawn,
> 
> You are correct.  I created another setup.  This time with 1 node, 1 shard, 2 replicas and the join worked!
> Running with the example SolrCloud setup doesn't work for join queries.
> 
> Thanks.
> 
> -S
> 
> 
> -----Original Message-----
> From: Steve Pruitt <bp...@opentext.com> 
> Sent: Thursday, August 30, 2018 12:25 PM
> To: solr-user@lucene.apache.org
> Subject: RE: [EXTERNAL] - Re: join works with a core, doesn't work with a collection
> 
> Gosh, really?  This is not mentioned anywhere in the documentation that I can find.  There are node to HW considerations if you are joining across different Collections.
> But, the same Collection?  Tell me this is not so.
> 
> -S
> 
> -----Original Message-----
> From: Shawn Heisey <ap...@elyograg.org> 
> Sent: Thursday, August 30, 2018 12:11 PM
> To: solr-user@lucene.apache.org
> Subject: Re: [EXTERNAL] - Re: join works with a core, doesn't work with a collection
> 
> On 8/30/2018 9:49 AM, Steve Pruitt wrote:
>> If you mean another running Solr server running, then no.
> 
> I mean multiple Solr processes.
> 
> The cloud example (started with bin/solr -e cloud) starts two Solr instances if you give it the defaults.  They are both running on the same machine, but if part of the data is on the instance running on port
> 8983 and part of the data is on the instance running on port 7574, I don't think you can do a join.
> 
> Thanks,
> Shawn
> 


RE: [EXTERNAL] - Re: join works with a core, doesn't work with a collection

Posted by Steve Pruitt <bp...@opentext.com>.
Shawn,

You are correct.  I created another setup.  This time with 1 node, 1 shard, 2 replicas and the join worked!
Running with the example SolrCloud setup doesn't work for join queries.

Thanks.

-S


-----Original Message-----
From: Steve Pruitt <bp...@opentext.com> 
Sent: Thursday, August 30, 2018 12:25 PM
To: solr-user@lucene.apache.org
Subject: RE: [EXTERNAL] - Re: join works with a core, doesn't work with a collection

Gosh, really?  This is not mentioned anywhere in the documentation that I can find.  There are node to HW considerations if you are joining across different Collections.
But, the same Collection?  Tell me this is not so.

-S

-----Original Message-----
From: Shawn Heisey <ap...@elyograg.org> 
Sent: Thursday, August 30, 2018 12:11 PM
To: solr-user@lucene.apache.org
Subject: Re: [EXTERNAL] - Re: join works with a core, doesn't work with a collection

On 8/30/2018 9:49 AM, Steve Pruitt wrote:
> If you mean another running Solr server running, then no.

I mean multiple Solr processes.

The cloud example (started with bin/solr -e cloud) starts two Solr instances if you give it the defaults.  They are both running on the same machine, but if part of the data is on the instance running on port
8983 and part of the data is on the instance running on port 7574, I don't think you can do a join.

Thanks,
Shawn


RE: [EXTERNAL] - Re: join works with a core, doesn't work with a collection

Posted by Steve Pruitt <bp...@opentext.com>.
Gosh, really?  This is not mentioned anywhere in the documentation that I can find.  There are node to HW considerations if you are joining across different Collections.
But, the same Collection?  Tell me this is not so.

-S

-----Original Message-----
From: Shawn Heisey <ap...@elyograg.org> 
Sent: Thursday, August 30, 2018 12:11 PM
To: solr-user@lucene.apache.org
Subject: Re: [EXTERNAL] - Re: join works with a core, doesn't work with a collection

On 8/30/2018 9:49 AM, Steve Pruitt wrote:
> If you mean another running Solr server running, then no.

I mean multiple Solr processes.

The cloud example (started with bin/solr -e cloud) starts two Solr instances if you give it the defaults.  They are both running on the same machine, but if part of the data is on the instance running on port
8983 and part of the data is on the instance running on port 7574, I don't think you can do a join.

Thanks,
Shawn


Re: [EXTERNAL] - Re: join works with a core, doesn't work with a collection

Posted by Shawn Heisey <ap...@elyograg.org>.
On 8/30/2018 9:49 AM, Steve Pruitt wrote:
> If you mean another running Solr server running, then no.

I mean multiple Solr processes.

The cloud example (started with bin/solr -e cloud) starts two Solr 
instances if you give it the defaults.  They are both running on the 
same machine, but if part of the data is on the instance running on port 
8983 and part of the data is on the instance running on port 7574, I 
don't think you can do a join.

Thanks,
Shawn


RE: [EXTERNAL] - Re: join works with a core, doesn't work with a collection

Posted by Steve Pruitt <bp...@opentext.com>.
If you mean another running Solr server running, then no.  

-----Original Message-----
From: Shawn Heisey <ap...@elyograg.org> 
Sent: Thursday, August 30, 2018 11:31 AM
To: solr-user@lucene.apache.org
Subject: Re: [EXTERNAL] - Re: join works with a core, doesn't work with a collection

On 8/30/2018 9:17 AM, Steve Pruitt wrote:
> Single server.  Localhost.  I am using the simple setup and took all the defaults.

Is there more than one Solr instance on that server? SolrCloud considers multiple instances to be completely separate, even if they're actually on the same hardware.

Thanks,
Shawn


Re: [EXTERNAL] - Re: join works with a core, doesn't work with a collection

Posted by Shawn Heisey <ap...@elyograg.org>.
On 8/30/2018 9:17 AM, Steve Pruitt wrote:
> Single server.  Localhost.  I am using the simple setup and took all the defaults.

Is there more than one Solr instance on that server? SolrCloud considers 
multiple instances to be completely separate, even if they're actually 
on the same hardware.

Thanks,
Shawn


RE: [EXTERNAL] - Re: join works with a core, doesn't work with a collection

Posted by Steve Pruitt <bp...@opentext.com>.
Single server.  Localhost.  I am using the simple setup and took all the defaults.



-----Original Message-----
From: Shawn Heisey <ap...@elyograg.org> 
Sent: Thursday, August 30, 2018 11:14 AM
To: solr-user@lucene.apache.org
Subject: [EXTERNAL] - Re: join works with a core, doesn't work with a collection

On 8/30/2018 9:00 AM, Steve Pruitt wrote:
> Is there something different I need to do for a query with a join for a Collection?  Singular Collection, not across Collections.
>
> Initially, I used a Core for simple development.  One of my queries uses a join.  It works fine.

I know very little about using the join feature. Everything that I know about it has been picked up by reading this mailing list.

I think one of the key elements is that all of the indexes involved in a join must exist on the same server.  It is quite common with a SolrCloud setup to have the data spread across multiple servers, especially when collections have multiple shards.

I do not know whether you're having a problem because of having your collection spread across multiple servers or not, but it does seem to be a likely possibility.

Thanks,
Shawn


Re: join works with a core, doesn't work with a collection

Posted by Shawn Heisey <ap...@elyograg.org>.
On 8/30/2018 9:00 AM, Steve Pruitt wrote:
> Is there something different I need to do for a query with a join for a Collection?  Singular Collection, not across Collections.
>
> Initially, I used a Core for simple development.  One of my queries uses a join.  It works fine.

I know very little about using the join feature. Everything that I know 
about it has been picked up by reading this mailing list.

I think one of the key elements is that all of the indexes involved in a 
join must exist on the same server.  It is quite common with a SolrCloud 
setup to have the data spread across multiple servers, especially when 
collections have multiple shards.

I do not know whether you're having a problem because of having your 
collection spread across multiple servers or not, but it does seem to be 
a likely possibility.

Thanks,
Shawn