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 Pratik Patel <pr...@semandex.net> on 2019/08/12 22:03:30 UTC

Best way to retrieve parent documents with children using getBeans method?

Hello Everyone,

We use SolrJ with POJOs to index documents into solr. If a POJO has a field
annotated with @child then SolrJ automatically adds those objects as
children of the POJO. This works fine and indexing is done properly.

However, when I retrieve the same document through same POJO using
"getBeans" method of DocumentObjectBinder class, the field annotated
with @child annotation is always null i.e. the children are not populated
in POJO.

What is the best way to get children in the same POJO along with other
fields. I read about child transformers but I am not sure if it is the
prescribed and recommended way to get children with parent. What is the
best practice to achieve this?

Thanks!
Pratik

Re: Best way to retrieve parent documents with children using getBeans method?

Posted by Erick Erickson <er...@gmail.com>.
Follow the instructions here: http://lucene.apache.org/solr/community.html#mailing-lists-irc. You must use the _exact_ same e-mail as you used to subscribe.

If the initial try doesn't work and following the suggestions at the "problems" link doesn't work for you, let us know. But note you need to show us the _entire_ return header to allow anyone to diagnose the problem.

Best,
Erick


> On Aug 12, 2019, at 7:17 PM, Dave Durbin <da...@canva.com> wrote:
> 
> Unsubscribe
> 
> -- 
> *P.S. We've launched a new blog to share the latest ideas and case studies 
> from our team. Check it out here: product.canva.com 
> <https://product.canva.com/>. ***
> ** <https://www.canva.com/>Empowering the 
> world to design
> Also, we're hiring. Apply here! 
> <https://about.canva.com/careers/>
> <https://twitter.com/canva> 
> <https://facebook.com/canva> <https://au.linkedin.com/company/canva> 
> <https://twitter.com/canva>  <https://facebook.com/canva>  
> <https://au.linkedin.com/company/canva>  <https://instagram.com/canva>
> 
> 
> 
> 
> 
> 


Re: Best way to retrieve parent documents with children using getBeans method?

Posted by Dave Durbin <da...@canva.com>.
Unsubscribe

-- 
*P.S. We've launched a new blog to share the latest ideas and case studies 
from our team. Check it out here: product.canva.com 
<https://product.canva.com/>. ***
** <https://www.canva.com/>Empowering the 
world to design
Also, we're hiring. Apply here! 
<https://about.canva.com/careers/>
 <https://twitter.com/canva> 
<https://facebook.com/canva> <https://au.linkedin.com/company/canva> 
<https://twitter.com/canva>  <https://facebook.com/canva>  
<https://au.linkedin.com/company/canva>  <https://instagram.com/canva>