Elasticsearch percolator for checking the existing doc

I have a requirement where I am getting documents and along with the doc I am getting a field date.
Now I need to figure it out whether the doc is already there or not if It is already there I will add another field called last_update for that doc (with the latest date I am getting ).

Is is possible using percolator (because for percolator I have to resister percolator query for each document so It would not be optimized solution )

Is there other optimal way possible ?

Percolator probably isn't what you want - check out the update/upsert API: https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html#upserts

Thanks @Mark_Harwood,

This is exactly what I wanted . Currently I am sending my data through java bulk api.


Is it possible to use upate and upsert using bulk api ?

I want to reduce the CPU efforts by using bulk api .
sending the lots of data using update & upsert could be overhead ?

Should work with bulk