Pushing Embedded Documents
In doing so, the index populates a set of fields which establish a single-level parent-child relationship between the parent document and its embedded children:
@topparent: The parent in the given parent-child relationship.
@isattachment: Populated in child items only. If present, has the same value as
@containsattachments: Populated in parent items only. If present, has the same value as
It’s possible to leverage those fields in result folding.
FoldingForThread component, setting the following options:
<div class="CoveoFoldingForThread" data-field="@topparent" data-child="@containsattachment" data-parent="@isattachment"></div>
Folding Embedded Items with the Coveo APIs Directly
In your Search API requests, specify the following:
... "filterFIeld": "@topparent", "parentField": "@containsattachments", "childField": "@isattachment", ...