Ingest pipeline : Getting lookup values from another index

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

1 Like

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

I wrote an example of this here:

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