[
https://issues.apache.org/jira/browse/SOLR-7090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14938789#comment-14938789
]
Ishan Chattopadhyaya commented on SOLR-7090:
--------------------------------------------
bq. I couldn't figure out how to use the ValueSourceParser formulation as a
drop-in replacement for a QParserPlugin.
It is not supposed to be a replacement. This is a way in which some field from
a secondary collection can be augmented to the results (most usually useful for
use in scoring of docs), joined on a key.
bq. Where would you put the query to actually select the original set of docs
you want to join from?
The main query, as you see in the test, is q=*:*:
{noformat}
String joinFunction = "coljoin(collection2,id,boost_i,key_i)";
ModifiableSolrParams query = new ModifiableSolrParams();
query.set("q", "*:*");
query.set("sort", "key_i asc");
query.set("fl", "id,$joinedVal");
query.set("joinedVal", joinFunction);
{noformat}
You can put in your main query there (q, or an fq), and add the colljoin()
function in a fl or score parameter.
bq. I also saw some assumptions about keys and values being integers, which
maybe I don't understand.
Off the top of my head, I remember that that was true only for this PoC patch,
and not a limitation of the approach per se. The patch can deal with integer
keys only, but this can be extended to support all kinds of keys to join
from/to.
> Cross collection join
> ---------------------
>
> Key: SOLR-7090
> URL: https://issues.apache.org/jira/browse/SOLR-7090
> Project: Solr
> Issue Type: New Feature
> Reporter: Ishan Chattopadhyaya
> Fix For: 5.2, Trunk
>
> Attachments: SOLR-7090.patch
>
>
> Although SOLR-4905 supports joins across collections in Cloud mode, there are
> limitations, (i) the secondary collection must be replicated at each node
> where the primary collection has a replica, (ii) the secondary collection
> must be singly sharded.
> This issue explores ideas/possibilities of cross collection joins, even
> across nodes. This will be helpful for users who wish to maintain boosts or
> signals in a secondary, more frequently updated collection, and perform query
> time join of these boosts/signals with results from the primary collection.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]