I have a Lambda that receives events from Kinesis and writes the event to ElasticSearch cluster.
| doc id | FirstTimestamp |
|---|---|
| d1 | 15974343498 |
Now when we receive another event, I want to update the document in the ElasticSearch to
| doc id | FirstTimestamp | SecondTimestamp | TimeTag |
|---|---|---|---|
| d1 | 15974343498 | 15974344498 | 1000 |
How can I do this without having to first GET the existing doc from ElasticSearch and then doing a PUT?
I found the update option here using which I can add the field SecondTimestamp, but how can I add the TimeTag field; it requires us to do an operation using the FirstTimestamp.