Jhon, What if you just forgen about middle level and q={!parent which=type_s:parent}.<child matching query>..&child.facet.field=SIZE_s
Binoy, facet.query works but there should be many of them one for L, one for M, etc On Wed, Mar 9, 2016 at 7:09 PM, 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? > > > -- Sincerely yours Mikhail Khludnev Principal Engineer, Grid Dynamics <http://www.griddynamics.com> <mkhlud...@griddynamics.com>