Hi, I am using elasticsearch 1.3.7
{
.
.
.
custId : "String",
custName :"String",
terrid : "Long",
terrname: "String"
.
.
.
}
In the beginning I have a mapping as above and I indexed (save) some document.
But right now I want to put the Terrid and Tername in nested as below.
{
.
.
.
custId : "String",
custName :"String",
terrs: {
type" : "nested",
"properties" : {
"id" : {
"type" : "string",
},
"terrId" : {
"type" : "long",
},
"terrName" : {
"type" : "string",
}
}
}
.
.
.
}
And I did.
My query is how to update the existing document which do not have a field called "terrs"
(without re-index/migration), through MVEL Script.
The following code is what we did.
updateScript.append("ctx._source['terrs'] = '" + toJson(terrList) + "';");
We get the following exception
ElasticSearchEJBBean : bulkUpdate : Failure reason :: failure in bulk execution:
[0]: index [db2], type [3], id [263270], message [MapperParsingException[object mapping for [3] tried to parse as object, but got EOF, has a concrete value been provided to it?]]