Open ToujouAya opened 7 years ago
@basemkhirat Could you please add parent_id param or something else to insert/etc, method?
Yeah, it seems like adding a child document, referring to its parent is not supported by the syntax at the moment.
I'm using this library for 2 hours, so I don't know where to search to add this feature.
I'm trying to create two documents, one build a child of the other. My mapping config is like this
'mappings' => [ "roadType" => [ "properties" => [ ] ], "carType" => [ "_parent" => [ "type" => "roadType" ], "properties" => [ "make" => [ "type" => "string" ], "model" => [ "type" => "string" ] ] ] ]
I got this error message .
{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"No handler for type [roadType] declared on fie ld [_parent]"}],"type":"mapper_parsing_exception","reason":"No handler for type [roadType] declared on field [_pare nt]"},"status":400}
Does anyone have any idea. Thank you