I have a question about es structure and complex objects.
I need to create a complex structure with recursive objects. So I have defined a first object, for example "message", and inside message i put the reference : "$ref": "#/definitions/message" (a message can contain an other message).
It works when I parse my structure in an JSON parser, but I received a 400 error when I try to create my structure....
So first of all, is it possible to create a recursive object in ES structure? And if yes, how can i do that?
Thank you !!!!
and i've got this error :
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Expected map for property [fields] on field [$ref] but got a class java.lang.String"
}
],
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping [BODY]: Expected map for property [fields] on field [$ref] but got a class java.lang.String",
"caused_by": {
"type": "mapper_parsing_exception",
"reason": "Expected map for property [fields] on field [$ref] but got a class java.lang.String"
}
},
"status": 400
}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.