# Index two parts of document in two different index

**URL:** <https://discuss.elastic.co/t/index-two-parts-of-document-in-two-different-index/240609>\
**Category:** Logstash\
**Created:** [July 9, 2020, 9:45pm UTC](https://discuss.elastic.co/t/index-two-parts-of-document-in-two-different-index/240609 "2020-07-09T21:45:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bouraoui\_Kacem](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bouraoui_kacem/32/44744_2.png) [@Bouraoui\_Kacem](https://discuss.elastic.co/u/Bouraoui_Kacem)\
**Post date:** [July 9, 2020, 9:45pm UTC](https://discuss.elastic.co/t/index-two-parts-of-document-in-two-different-index/240609/1 "2020-07-09T21:45:48Z")

</div>

I received a document which contains an array of objects , i want to index all the document in index1 and the content of the array in indexTwo , how can i configure that with logstash please with filter and output ?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 9, 2020, 9:53pm UTC](https://discuss.elastic.co/t/index-two-parts-of-document-in-two-different-index/240609/2 "2020-07-09T21:53:51Z")

</div>

Use pipeline to pipeline communications with a [forked path](https://www.elastic.co/guide/en/logstash/current/pipeline-to-pipeline.html#forked-path-pattern) pattern.

---

<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:** [August 6, 2020, 9:54pm UTC](https://discuss.elastic.co/t/index-two-parts-of-document-in-two-different-index/240609/3 "2020-08-06T21:54:02Z")

</div>

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