# Creating documents out of components

**URL:** <https://discuss.elastic.co/t/creating-documents-out-of-components/251581>\
**Category:** Elastic Search\
**Tags:** elastic-site-search\
**Created:** [October 9, 2020, 2:55pm UTC](https://discuss.elastic.co/t/creating-documents-out-of-components/251581 "2020-10-09T14:55:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JeanP](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeanp/32/47144_2.png) [@JeanP](https://discuss.elastic.co/u/JeanP)\
**Post date:** [October 9, 2020, 2:55pm UTC](https://discuss.elastic.co/t/creating-documents-out-of-components/251581/1 "2020-10-09T14:55:30Z")

</div>

Hello,

Would it be possible to create documents not out of pages but out of a list of components? We currently use AEM for our sites and the client would like to index a list of individual FAQ components as a document each so that the users may get results linking to specific questions.

Would something like this work?

```auto
<div data-swiftype-index="true" class="${component.block}__title" data-subcategory="${component.alias}" id="${component.questionID}">
    <button aria-expanded="false" class="${component.block}__button">
        <div data-sly-test="${properties.question}"
             data-swiftype-name="faqQuestion"
             data-swiftype-type="string"
             aria-controls="${component.questionID}-panel"> ${properties.question}
        </div>
    </button>
</div>

```

Thanks.

---

<div class="post-metadata">

**Author:** ![constancecchen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/constancecchen/32/71762_2.png) [@constancecchen](https://discuss.elastic.co/u/constancecchen)\
**Post date:** [October 12, 2020, 7:29pm UTC](https://discuss.elastic.co/t/creating-documents-out-of-components/251581/2 "2020-10-12T19:29:09Z")

</div>

Hi Jean,

Unfortunately, that's not something Site Search supports out of the box. The only thing we really use `data-swiftype` attributes for are [content exclusion/inclusion](https://swiftype.com/documentation/site-search/crawler-configuration/content-inclusion-exclusion) rules, which don't create separate pages.

An API engine (vs. a crawler engine) would be able to ingest non-page documents, but that's a fairly significant change and might not be what you want if you already have an existing working setup.

Apologies I couldn't help further!  
Constance

---

<div class="post-metadata">

**Author:** ![JeanP](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeanp/32/47144_2.png) [@JeanP](https://discuss.elastic.co/u/JeanP)\
**Post date:** [October 12, 2020, 7:57pm UTC](https://discuss.elastic.co/t/creating-documents-out-of-components/251581/3 "2020-10-12T19:57:04Z")

</div>

Thanks for the reply. I'll look into alternatives.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 9, 2020, 7:57pm UTC](https://discuss.elastic.co/t/creating-documents-out-of-components/251581/4 "2020-11-09T19:57:14Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
