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 Vineeth Dasaraju <vi...@gmail.com> on 2015/08/01 09:51:27 UTC
Join Parent and Child Documents
Hi,
I had indexed a nested json object into solr as a parent document with
child documents. Whenever I query for a term in the child document, I am
returned only the child documents. Is it possible to get the parent
document along with the child documents as a part of the results? I have
been trying to run stats on the parent document but have not been able to
do so because solr returns the child document which always has a "null"
value for the field whose stats I am looking for. Is it possible to perform
stats on the parent documents I get them from a query for the child
documents?
Regards,
Vineeth
Re: Join Parent and Child Documents
Posted by Mikhail Khludnev <mk...@griddynamics.com>.
On Sat, Aug 1, 2015 at 10:51 AM, Vineeth Dasaraju <vi...@gmail.com>
wrote:
> Hi,
>
> I had indexed a nested json object into solr as a parent document with
> child documents. Whenever I query for a term in the child document, I am
> returned only the child documents. Is it possible to get the parent
> document along with the child documents as a part of the results?
There is a special query parser.
https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-BlockJoinQueryParsers
.
Did you use it?
> I have
> been trying to run stats on the parent document but have not been able to
> do so because solr returns the child document which always has a "null"
> value for the field whose stats I am looking for. Is it possible to perform
> stats on the parent documents I get them from a query for the child
> documents?
>
> Regards,
> Vineeth
>
--
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics
<http://www.griddynamics.com>
<mk...@griddynamics.com>