# Ingest pipeline : Getting lookup values from another index

**URL:** <https://discuss.elastic.co/t/ingest-pipeline-getting-lookup-values-from-another-index/164731>\
**Category:** Elasticsearch\
**Created:** [January 18, 2019, 4:46am UTC](https://discuss.elastic.co/t/ingest-pipeline-getting-lookup-values-from-another-index/164731 "2019-01-18T04:46:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hammadarif](https://avatars.discourse-cdn.com/v4/letter/h/b38774/32.png) [@hammadarif](https://discuss.elastic.co/u/hammadarif)\
**Post date:** [January 18, 2019, 4:46am UTC](https://discuss.elastic.co/t/ingest-pipeline-getting-lookup-values-from-another-index/164731/1 "2019-01-18T04:46:09Z")

</div>

Main main index (say, countries) has a field CountryId,  
At the time of indexing I would to grab details about this country from another index (say, population-data) and store in the main index.

So if i  
PUT countries/\_doc  
{  
Name: "Australia",  
CountryId : "33"  
}

Is there a way to setup pipeline to fetch Population and States field data from population-data index and Store it in main index. Assuming both index have document with CountryId:33?

The desired doucument to be indexed is

{  
Name: "Australia",  
CountryId : "33",  
Population: 2M,  
States: 7  
}

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 18, 2019, 6:16am UTC](https://discuss.elastic.co/t/ingest-pipeline-getting-lookup-values-from-another-index/164731/2 "2019-01-18T06:16:57Z")

</div>

No this is not possible and should be done outside elasticsearch index process. Logstash for example.

I wrote an example of this here: [http://david.pilato.fr/blog/2019/01/10/from-a-startup-to-a-listed-company-6-years-of-fun/](http://david.pilato.fr/blog/2019/01/10/from-a-startup-to-a-listed-company-6-years-of-fun/)

---

<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:** [February 15, 2019, 6:17am UTC](https://discuss.elastic.co/t/ingest-pipeline-getting-lookup-values-from-another-index/164731/3 "2019-02-15T06:17:00Z")

</div>

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