lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jhon Smith" <doom...@gmx.com>
Subject How to pass facet info of the top inner nested doc to the top parent doc
Date Wed, 09 Mar 2016 16:09:32 GMT
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?



Mime
View raw message