We have two index
- parent_index
- child_index
My task is to create new_child_index with some fields from parent_index.
Parent Index =>
{
"_parent": {
"type": "parent"
},
"properties": {
"id" : {
"id" : "String"
}
"First_name": {
"type": "string",
},
"last_name": {
"type": "string",
},
"family": {
"type": "string",
}
...
}
}
Child Index
{
"_Child": {
"type": "child"
},
"properties": {
"id" : {
"id" : "String"
},
"parent_id" : {
"id" : "String"
},
"First_name": {
"type": "string",
},
"last_name": {
"type": "string",
},
"family": {
"type": "string",
}
...
}
}
New_Child_Index
{
"_Child": {
"type": "parent"
},
"properties": {
"id": {
"id": "String"
},
"parent_id": {
"id": "String"
},
"parent_first_name": {
"type": "String"
},
"parent_last_name": {
"type": "String"
},
"First_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"family": {
"type": "string"
}
}
}
Here parent has 11M of documents and the Child has 175M documents. (2 TB data)
How can I efficiently copy the data from the parent and child index to a new child index?