I'm trying to use JEST to implement CRUD actions to ElasticSearch, and I've surveryed some articles, the method I found to do "Update" is "Index" another document with the same "_id", but I'll replace the whole document in that way.
I want to know is JEST capable to do "Partial Update"?
Edit :
I found there's an Update class which is in io.searchbox.core package that might help, but after I try this :
Update update = new Update.Builder(updateCameraString).index(this._IndexName).type(this._TypeName).id(id).build();
JestResult updateResult = this._JestClient.execute(update);
The content of updateCameraString
is
{"Name":"test Added into Es, update again.","CreatedAt":"","ModifiedAt":"","UniqueId":"","Note":""}
Seems everything is fine, but I'll get the response below :
{
"error": {
"root_cause": [
{
"type": "action_request_validation_exception",
"reason": "Validation Failed: 1: script or doc is missing;"
}
],
"type": "action_request_validation_exception",
"reason": "Validation Failed: 1: script or doc is missing;"
},
"status": 400
}
Any device could be really appreciate, Thanks!