Parent Child Relation


(Arya Saha) #1
PUT dept?pretty
POST /dept/department/_bulk
{"index":{"_id":"1"}}
{"Dept_ID":1,"Dept_name":"Engineering"}
{"index":{"_id":"2"}}
{"Dept_ID":2,"Dept_name":"Medical"}


PUT dept_student?pretty
POST /dept/dept_student/_bulk
{"index":{"_id":"100","parent":"1"}}
{"Emp_name":"Arya","Dept_ID":1,"Marks":150}
{"index":{"_id":"200","parent":"1"}}
{"Emp_name":"Banashree","Dept_ID":1,"Marks":200}
{"index":{"_id":"300","parent":"2"}}
{"Emp_name":"Arnab","Dept_ID":2,"Marks":120}
{"index":{"_id":"400","parent":"2"}}
{"Emp_name":"Abhirup","Dept_ID":2,"Marks":120}

Getting the below error msg...
"index": {
"_index": "dept",
"_type": "dept_student",
"_id": "200",
"status": 400,
"error": {
"type": "illegal_argument_exception",
"reason": "can't specify parent if no parent field has been configured"
}
}
}been configured"
}
}
}


(Christian Dahlqvist) #2

Is this not the same issue as this? Please avoid opening multiple issues around the same topic.


(system) #3

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