I use the Elasticsearch Bulk Index to update some data about documents, but it may happen that the document I'm trying to update does not exist - in this case I want it to do nothing.
I do not want him to create a document in this case.
I didn’t find anything in the docs or maybe missed it.
My current actions (in this case it creates a document):
{ update: { _index: "index1", _type: "interaction", _id: item.id } }, { script: { file: "update-stats", lang: "groovy", params: { newCommentsCount: newRetweetCount, } }, upsert: normalizedItem }
How to update a document only if it exists, otherwise nothing?
thanks
Alexd source share