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/23 17:03:11 UTC
need help with a complicated join query
At least it is complicated to me. :>)
We are investigating how to find return a list documents whose identifier is contained in a multi-value field in another document.
The index consists of essentially two different documents sharing some common fields.
To make it simple, I will refer to them as two different documents, but they are in the same index.
DocA has a multi-value field that contains a set of identifiers from DocBs. The multi-value field is named "members"
I am trying to conceptualize a query join where for a given DocA the response contains those DocBs whose identifier is contained in DocA's members field.
Not sure how to piece this together.
I looked at function queries, but nothing jumped out.
Any suggestions would be greatly appreciated.
Thanks.
-SP
Re: need help with a complicated join query
Posted by da...@gmail.com.
I'm thinking something like this: q={!join v=id:doca_1 from=members to=id}
On Fri, 24 Aug 2018 at 03:03, Steve Pruitt <bp...@opentext.com> wrote:
> At least it is complicated to me. :>)
>
> We are investigating how to find return a list documents whose identifier
> is contained in a multi-value field in another document.
> The index consists of essentially two different documents sharing some
> common fields.
> To make it simple, I will refer to them as two different documents, but
> they are in the same index.
> DocA has a multi-value field that contains a set of identifiers from
> DocBs. The multi-value field is named "members"
>
> I am trying to conceptualize a query join where for a given DocA the
> response contains those DocBs whose identifier is contained in DocA's
> members field.
>
> Not sure how to piece this together.
>
> I looked at function queries, but nothing jumped out.
>
> Any suggestions would be greatly appreciated.
>
> Thanks.
>
> -SP
>