I am trying to Index data (parent child relation). data is sent using Spark
Index
------------------------------------------
PUT test_tree
{
"mappings":{
"properties":{
"fam_details": {
"type":"join",
**"relations":**{
"danfamily":[ "comfamily", "enterfamily" ],
"comfamily":"richardfamily"
}}}}}
1. Data inserted in from Spark2 using esHadoop and mapping for
## Parent insert
esconf["es.mapping.id"] = "uniqueid"
**esconf["es.mapping.join"] = "fam_details" , /* also tried danfamily */**
## Child insert
----------------------------------------------------------------
esconf["es.mapping.id"] = "uniqueid of child"
**esconf["es.mapping.join"] = "comfamily"**
**esconf["es.mapping.routing"] = "uniqueid" (same field as parent)**
I am able to insert data from spark. I am able to search data
but no data when i query using has_parent, has_child queries
Note : Unable to use es.mapping.parent property in 7.6.2
Can anyone let me know ,the correct settings bthat needs to be passed for parent and child documents for esconfigurations above ?