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 anand chandak <an...@oracle.com> on 2014/02/01 08:18:00 UTC

solr joins

Folks, have a basic question regarding solr join, the wiki, 
<http://wiki.apache.org/solr/Join>  states : -

"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)".

I am finding it hard to understand the above limitation of solr 
join,does it means that unlike the traditional RDMS joins that can have 
columns from both the TO and FROM field, solr joins will only have 
fields from the TO  documents ? Is my understanding correct ?

Also, there's some difference with respect to scoring and towards that 
the wiki says :

"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" Does it mean the 
subquery's score is not available the main query? Is this behaviour true 
for the lucene join too ?

Basically, i am trying to understand where and how solr joins differ 
from lucene joins. Any pointers, much appreciated ?

I have posted same question on the stackoverflow 
<http://stackoverflow.com/questions/21480628/solr-join-vs-lucene-join>

Thanks,

Anand


Re: solr joins

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
On Fri, Feb 7, 2014 at 3:32 PM, anand chandak <an...@oracle.com>wrote:

> Thanks Mikhail, curious why was scoring left out of solr ?

Have no idea. I've never been involved in query-time join.


> And if there's any plan to port it ?
>
I suppose  there is no plan until someone raise a jira.


> Also, if you can please elaborate on the segmented vs toplevel
>

http://vimeo.com/44113003
"Is Your Index Reader Really Atomic or Maybe Slow?" by Uwe Schindler


> Thanks,
>
> Anand
>
>
>
> On 2/7/2014 4:53 PM, Mikhail Khludnev wrote:
>
>>  Basically, i am trying to understand where and how solr joins differ from
>>>> lucene joins. Any pointers, much appreciated ?
>>>>
>>>>
>>>>  Hello Anand,
>>
>> I'm keen for index-time joins (aka block joins), thus I've never looked
>> into query-time ones.
>> I even didn't ever know that there are two different query-time joins.
>> This
>> diverging might caused the fabulous drama: segmented vs top-level
>> Ok. It seems like, Solr's query time join never scores
>> https://github.com/apache/lucene-solr/blob/trunk/solr/
>> core/src/java/org/apache/solr/search/JoinQParserPlugin.java#L535
>> But Lucene's JoinUtils does
>> https://github.com/apache/lucene-solr/blob/trunk/lucene/
>> join/src/java/org/apache/lucene/search/join/JoinUtil.java?source=cc#L78
>> Also Solr's join joins across different cores.
>>
>>
>


-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
 <mk...@griddynamics.com>

Re: solr joins

Posted by anand chandak <an...@oracle.com>.
Thanks Mikhail, curious why was scoring left out of solr ? And if 
there's any plan to port it ?

Also, if you can please elaborate on the segmented vs toplevel

Thanks,

Anand


On 2/7/2014 4:53 PM, Mikhail Khludnev wrote:
>>> Basically, i am trying to understand where and how solr joins differ from
>>> lucene joins. Any pointers, much appreciated ?
>>>
>>>
> Hello Anand,
>
> I'm keen for index-time joins (aka block joins), thus I've never looked
> into query-time ones.
> I even didn't ever know that there are two different query-time joins. This
> diverging might caused the fabulous drama: segmented vs top-level
> Ok. It seems like, Solr's query time join never scores
> https://github.com/apache/lucene-solr/blob/trunk/solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java#L535
> But Lucene's JoinUtils does
> https://github.com/apache/lucene-solr/blob/trunk/lucene/join/src/java/org/apache/lucene/search/join/JoinUtil.java?source=cc#L78
> Also Solr's join joins across different cores.
>


Re: solr joins

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
>> Basically, i am trying to understand where and how solr joins differ from
>> lucene joins. Any pointers, much appreciated ?
>>
>>
Hello Anand,

I'm keen for index-time joins (aka block joins), thus I've never looked
into query-time ones.
I even didn't ever know that there are two different query-time joins. This
diverging might caused the fabulous drama: segmented vs top-level
Ok. It seems like, Solr's query time join never scores
https://github.com/apache/lucene-solr/blob/trunk/solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java#L535
But Lucene's JoinUtils does
https://github.com/apache/lucene-solr/blob/trunk/lucene/join/src/java/org/apache/lucene/search/join/JoinUtil.java?source=cc#L78
Also Solr's join joins across different cores.

-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
 <mk...@griddynamics.com>

Re: solr joins

Posted by anand chandak <an...@oracle.com>.
Re-posting, just in case if this one fell through crack.

Thanks,

Anand


On 2/1/2014 12:48 PM, anand chandak wrote:
> Folks, have a basic question regarding solr join, the wiki, 
> <http://wiki.apache.org/solr/Join>  states : -
>
> "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)".
>
> I am finding it hard to understand the above limitation of solr 
> join,does it means that unlike the traditional RDMS joins that can 
> have columns from both the TO and FROM field, solr joins will only 
> have fields from the TO  documents ? Is my understanding correct ?
>
> Also, there's some difference with respect to scoring and towards that 
> the wiki says :
>
> "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" Does it mean the 
> subquery's score is not available the main query? Is this behaviour 
> true for the lucene join too ?
>
> Basically, i am trying to understand where and how solr joins differ 
> from lucene joins. Any pointers, much appreciated ?
>
> I have posted same question on the stackoverflow 
> <http://stackoverflow.com/questions/21480628/solr-join-vs-lucene-join>
>
> Thanks,
>
> Anand
>
>


Re: solr joins

Posted by Ahmet Arslan <io...@yahoo.com>.
Hi Anand,

Mikhail writes about different join solutions and compares them. Here is couple of his write-ups.

http://blog.griddynamics.com/2012/08/block-join-query-performs.html

http://blog.griddynamics.com/2013/09/solr-block-join-support.html






On Saturday, February 1, 2014 9:18 AM, anand chandak <an...@oracle.com> wrote:
Folks, have a basic question regarding solr join, the wiki, 
<http://wiki.apache.org/solr/Join>  states : -

"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)".

I am finding it hard to understand the above limitation of solr 
join,does it means that unlike the traditional RDMS joins that can have 
columns from both the TO and FROM field, solr joins will only have 
fields from the TO  documents ? Is my understanding correct ?

Also, there's some difference with respect to scoring and towards that 
the wiki says :

"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" Does it mean the 
subquery's score is not available the main query? Is this behaviour true 
for the lucene join too ?

Basically, i am trying to understand where and how solr joins differ 
from lucene joins. Any pointers, much appreciated ?

I have posted same question on the stackoverflow 
<http://stackoverflow.com/questions/21480628/solr-join-vs-lucene-join>

Thanks,

Anand