I tried updating a document using elasticsearchjs, using:
export async function esUpdate (index, id, body) {
return es.update({
body: JSON.stringify(body),
id,
index,
refresh: true,
type: DocType
}).catch(logAndRethrow)
}
It throws error : `Elasticsearch error: {\"msg\":\"[action_request_validation_exception] Validation Failed: 1: script or doc is missing;`