https://wiki.apache.org/solr/Join
Compared To SQL
http://solr.pl/en/2011/02/21/waiting-for-4-0-solr-2272-solr-and-join-functionality/
Waiting for 4.0: SOLR-2272 – Solr and JOIN functionality
Compared To SQL
For people who are used to SQL, it's important to note that Joins in Solr are not really equivalent to SQL Joins because no information about the table being joined "from" is carried forward into the final result. A more appropriate SQL analogy would be an "inner query".
This Solr request...
/solr/collection1/select ? fl=xxx,yyy & q={!join from=inner_id to=outer_id}zzz:vvv
Is comparable to this SQL statement...
SELECT xxx, yyy FROM collection1 WHERE outer_id IN (SELECT inner_id FROM collection1 where zzz = "vvv")
- Fields or other properties of the documents being joined "from" are not available for use in processing of the resulting set of "to" documents (ie: you can not return fields in the "from" documents as if they were a multivalued field on the "to" documents)
- The Join query produces constant scores for all documents that match -- scores computed by the nested query for the "from" documents are not available to use in scoring the "to" documents
http://solr.pl/en/2011/02/21/waiting-for-4-0-solr-2272-solr-and-join-functionality/
Waiting for 4.0: SOLR-2272 – Solr and JOIN functionality
No comments:
Post a Comment