I am trying to create a mapping for my Elasticsearch that would make me insert both an array and a string into my field "value". The following shows the data I want inserted:
{
"Data": [{
"key": "keyName",
"value": "valueName"
},
{
"key": "keyName",
"value": "valueName"
},
{
"key": "keyName",
"value": [{
"type": "FailedName",
"message": "FailedMessage",
"path": "FailedPath"
}]
}
]
}
I am running into this error when inserting the mentioned data:
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "failed to parse field [customData.value] of type [text] in document with id '0ltFcoEBP0oW3Bg9b2S_'. Preview of field's value: '{path=FailedPath, type=FailedName, message=FailedMessage}'"
}
],
"type": "mapper_parsing_exception",
"reason": "failed to parse field [customData.value] of type [text] in document with id '0ltFcoEBP0oW3Bg9b2S_'. Preview of field's value: '{path=FailedPath, type=FailedName, message=FailedMessage}'",
"caused_by": {
"type": "illegal_state_exception",
"reason": "Can't get text on a START_OBJECT at 8:23"
}
},
"status": 400
}
We have looked into the documentation and seems like this is not supported. I am now asking for some advice on how I could make this work.
I am running Elasticsearch version 7.3.1.
Here are some links that may be interesting to this topic:
Add Array/Object support for elasticsearch connector via _meta field mapping