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 Dorian Hoxha <do...@gmail.com> on 2016/11/17 07:08:29 UTC

Parent child relationship, where children aren't nested but separate (like elasticsearch)

Hi,

I'm not finding a way to support parent-child like es does (using
blockjoin)? I've seen some blogs
<http://www.slideshare.net/anshumg/working-with-deeply-nested-documents-in-apache-solr>
with having children as nested inside the parent-document, but I want to
freely crud childs/parents as separate documents (i know that nested also
writes separate documents) and have a special field to link them + manually
route them to the same shard.

Is this possible/available ?

Thank You

Re: Parent child relationship, where children aren't nested but separate (like elasticsearch)

Posted by Dorian Hoxha <do...@gmail.com>.
It's not mentioned on that page, but I'm assuming the join should work on
solrcloud when joining the same collection with the same routing (example:
users and user_events both routed by user_id (and joining on user_id))


On Thu, Nov 17, 2016 at 10:23 AM, Alexandre Rafalovitch <ar...@gmail.com>
wrote:

> You want just the usual join (not the block-join). That's the way it
> was before nested documents became supported.
> https://cwiki.apache.org/confluence/display/solr/Other+
> Parsers#OtherParsers-JoinQueryParser
>
> Also, Elasticsearch - as far as I remember - stores the original
> document structure (including children) as a special field and then
> flattens all the children into parallel fields within parent. Which
> causes interesting hidden ranking issues, but that's an issue for a
> different day.
>
> Rgards,
>    Alex.
> ----
> Solr Example reading group is starting November 2016, join us at
> http://j.mp/SolrERG
> Newsletter and resources for Solr beginners and intermediates:
> http://www.solr-start.com/
>
>
> On 17 November 2016 at 18:08, Dorian Hoxha <do...@gmail.com> wrote:
> > Hi,
> >
> > I'm not finding a way to support parent-child like es does (using
> > blockjoin)? I've seen some blogs
> > <http://www.slideshare.net/anshumg/working-with-deeply-
> nested-documents-in-apache-solr>
> > with having children as nested inside the parent-document, but I want to
> > freely crud childs/parents as separate documents (i know that nested also
> > writes separate documents) and have a special field to link them +
> manually
> > route them to the same shard.
> >
> > Is this possible/available ?
> >
> > Thank You
>

Re: Parent child relationship, where children aren't nested but separate (like elasticsearch)

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
You want just the usual join (not the block-join). That's the way it
was before nested documents became supported.
https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-JoinQueryParser

Also, Elasticsearch - as far as I remember - stores the original
document structure (including children) as a special field and then
flattens all the children into parallel fields within parent. Which
causes interesting hidden ranking issues, but that's an issue for a
different day.

Rgards,
   Alex.
----
Solr Example reading group is starting November 2016, join us at
http://j.mp/SolrERG
Newsletter and resources for Solr beginners and intermediates:
http://www.solr-start.com/


On 17 November 2016 at 18:08, Dorian Hoxha <do...@gmail.com> wrote:
> Hi,
>
> I'm not finding a way to support parent-child like es does (using
> blockjoin)? I've seen some blogs
> <http://www.slideshare.net/anshumg/working-with-deeply-nested-documents-in-apache-solr>
> with having children as nested inside the parent-document, but I want to
> freely crud childs/parents as separate documents (i know that nested also
> writes separate documents) and have a special field to link them + manually
> route them to the same shard.
>
> Is this possible/available ?
>
> Thank You