--- title: Push embedded documents slug: '3166' canonical_url: https://docs.coveo.com/en/3166/ collection: index-content source_format: adoc --- # Push embedded documents The [Coveo indexing pipeline](https://docs.coveo.com/en/184/) can automatically detect and [index](https://docs.coveo.com/en/204/) certain kinds of embedded documents (for example, Excel spreadsheets embedded in Word documents). In doing so, the index populates a set of [fields](https://docs.coveo.com/en/200/) 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 `@topparent`. * `@containsattachments`: Populated in parent items only. If present, has the same value as `@topparent`. It's possible to leverage those fields in result folding. ## Folding embedded items with the JavaScript Search Framework Use a [`FoldingForThread`](https://coveo.github.io/search-ui/classes/foldingforthread.html) component, setting the following options: ```html
``` See [Folding results - One-level relationships](https://docs.coveo.com/en/428#one-level-relationships) for details. ## Folding embedded items with the Coveo APIs directly In your Search API requests, specify the following: ```json ... "filterFIeld": "@topparent", "parentField": "@containsattachments", "childField": "@isattachment", ... ``` See [Handle folded results](https://docs.coveo.com/en/1372#handle-folded-results) for details.