In the "question"/"answer" example on
https://www.elastic.co/guide/en/elasticsearch/reference/current/parent-join.html
the parent and child docs have the same schema (a single field called "text").
In my case, the parent docs have one set of fields and child docs have a different set. I'm currently specifying the parent doc schema with:
"mappings": {
"properties": {
"field1": {
"type": "long"
},
"field2": {
"type": "keyword"
},
"field3": {
"type": "keyword"
},
"join_field": {
"type": "join",
"eager_global_ordinals": true,
"relations": {
"parent_doc_name": "child_doc_name"
}
},
}
}
how can I also specify the child doc schema?