# Enrich index with data found in another index

**URL:** <https://discuss.elastic.co/t/enrich-index-with-data-found-in-another-index/336966>\
**Category:** Elasticsearch\
**Tags:** painless\
**Created:** [June 27, 2023, 9:53am UTC](https://discuss.elastic.co/t/enrich-index-with-data-found-in-another-index/336966 "2023-06-27T09:53:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stobbe](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@stobbe](https://discuss.elastic.co/u/stobbe)\
**Post date:** [June 27, 2023, 9:53am UTC](https://discuss.elastic.co/t/enrich-index-with-data-found-in-another-index/336966/1 "2023-06-27T09:53:31Z")

</div>

Hello,

What is the best way to add a field to an existing indexm where the value is filled with data from an other index.

E.g. most commont example you have an index with a name field amd you want to add an email address. This email address can be found in an other index.

Is reindex with a painless script an option, a script that updates or is an enrich pipeline the best option?

KR Henk

---

<div class="post-metadata">

**Author:** ![Alec\_Carpenter2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alec_carpenter2/32/117725_2.png) [@Alec\_Carpenter2](https://discuss.elastic.co/u/Alec_Carpenter2)\
**Post date:** [June 27, 2023, 2:50pm UTC](https://discuss.elastic.co/t/enrich-index-with-data-found-in-another-index/336966/2 "2023-06-27T14:50:29Z")

</div>

An enrich processor is your best bet for adding an email address from another index to the existing index.

An example for this specific scenario is found in the docs [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/match-enrich-policy-type.html).

---

<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:** [July 25, 2023, 2:51pm UTC](https://discuss.elastic.co/t/enrich-index-with-data-found-in-another-index/336966/3 "2023-07-25T14:51:18Z")

</div>

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