I think you are looking for the facet.query method.
To get your child doc facets append &facet.query=<normal solr query for
child docs>

On Wed, 9 Mar 2016, 21:39 Jhon Smith, <doom...@gmx.com> wrote:

> There are 3 levels of nested docs: parent -> mniddle -> child.
>
> E.g.
> <doc>
> <field name="id">9</field>
> <field name="type_s">parent</field>
> <doc>
> <field name="id">10</field>
> <field name="type_s">middle</field>
> <field name="BRAND_s">Nike</field>
> <doc>
> <field name="id">11</field>
> <field name="COLOR_s">Red</field>
> <field name="SIZE_s">XL</field>
> </doc>
> <doc>
> <field name="id">12</field>
> <field name="COLOR_s">Blue</field>
> <field name="SIZE_s">XL</field>
> </doc>
> </doc>
> </doc>
>
> If i retrieve middle docs with q={!parent
> which=type_s:middle}...&child.facet.field=SIZE_s
> then facets work fine (in the latest solr): XL(1)
>
> But i want to retrieve top parent documents (type_s:parent) while still
> having facet info about SIZE_s from child document. How to do that?
>
>
> --
Regards,
Binoy Dalal

Reply via email to