Hi
You cannot join on two fields in SOLR as you do using SQL.
Having the same situations I add new string field in collections(to concatenate 
Type and Id fields) and fill it at index time)
Then join two collections on that field at query time
-- 
Vadim

-----Original Message-----
From: dami...@gmail.com [mailto:dami...@gmail.com] 
Sent: Tuesday, October 16, 2018 1:24 AM
To: solr-user@lucene.apache.org
Subject: Re: Correct join syntax

Hi Christoph,

The closest I can get is:

{!join from=id to=id v="+UserId=<VALUE> +Access=<VALUE>"}

If there was a combined id/type field then you could join on that.

Regards,
Damien.

On Tue, 16 Oct 2018 at 04:10, Christoph <
christoph+develo...@project-mayhem.org> wrote:

> I have two cores.
>
> One core has the following fields:
>
> Type
> Id
>
> The other core has
>
> Type
> Id
> UserId
> Access
>
> How can I join where core1.Type = core2.Type, core1.Id = core2.id,
> core2.UserId = <VALUE>, and core2.Access = <VALUE>?
>
> When querying core1, I've tried variations of
>
> {!join from=Type to=Type fromIndex=core2)(UserId:<VALUE> AND
> Access:<VALUE>)
> {!join from=Id to=Id fromIndex=core2)(UserId:<VALUE> AND Access:<VALUE>)
>
> {!join from=Type to=Type fromIndex=core2)UserId:<VALUE>
> {!join from=Id to=Id fromIndex=core2)UserId:<VALUE>
> {!join from=Type to=Type fromIndex=core2)Access:<VALUE>
> {!join from=Id to=Id fromIndex=core2)Access:<VALUE>
>
> et. al.
>
> How can I get done what I'm trying to do?
>
> thnx,
> Christoph
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>

Reply via email to