let elasticsearch = require('elasticsearch');
let client = new elasticsearch.Client({
host: "*********************",
});
let temp = await client.update({
index: container,
id: 1,
type: '_doc',
body: {"name": "rks", "visible": true},
doc_as_upsert: true,
})
Response of this query returns
"result": {
"_index": "container",
"_type": "_doc",
"_id": "1",
"_version": 2,
"result": "updated",
"_shards": {
"total": 2,
"successful": 1,
"failed": 0
},
"_seq_no": 1,
"_primary_term": 1
}
How do I return the updated document in the response. Is there any way/method to achieve this goal. Please help me