Update the value of a field in index based on its value in another index

There's an index_A that contains say about 10K docs. It has many fields like field_1, field_2, ...field_n and one of the fields is product_name.

Then there's another index_B that contains about 10 docs only and is a master catalogue sort of index. It has 2 fields: product_name and product_description.
e.g

{
	"product_name" : "EES",
	"product_desc" : "Elastic Enterprise Search"
}
{
	"product_name" : "EO",
	"product_desc" : "Elastic Observability"
}

index_A contains many fields, from that one of the fields is product_name. index_A does not have the field product_desc

I want to insert product_desc field into each document in index_A such that the value of product_name in index_A matches value of product_name in index_B.

i.e. something like set index_A.prod_desc = index_B.prod_desc where index_A.prod_name = index_B.prod_name

How can I achieve that?

ELK Version: 7.12

Hi @sandeepkanabar

This is exactly the use case the enrich processor was created for.

Take a look at this.

1 Like

Thank you. I had half a mind to try enrich processor but then though it's over-kill to create enrich policies et al for this.

Let me try it.

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