Update the context of one document based on the context of other document (Please help)

Hey, We have two types of documents type A and type B both are connected through an Id field

Type A
{
"id": "abc",
"name": "xyz",
"class": "mno"
}

Type B
{
"id": "abc",
}
I want to update all the Type B documents and I want them to have "name" field from the corresponding Type A document.
So the final Type B document should look like
Type B
{
"id": "abc",
"name": "xyz"
}
Is it possible to do such updates through native elastic update queries?

1 Like

Welcome to our community! :smiley:

No Elasticsearch cannot automatically do this for you. You can to do this in your own code during indexing, or you could use a reindex request to create new documents.

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