I'm running Elasticsearch 6.2.4 and am occasionally getting an unexpected document missing exception when I try to index a new document using the bulk api.
Here's the job I'm sending:
{:update
{:_id "3b4ff48814eff41bc4014c19",
:_index "customerAlias",
:_type "doc",
:routing "customerAlias"}}
{:doc
{:id "3b4ff48814eff41bc4014c19"
:some "data"},
:doc_as_upsert true}
And the response I'm getting:
{:type "document_missing_exception",
:reason "[doc][3b4ff48814eff41bc4014c19]: document missing",
:index_uuid "KzcNGk1oTOijW00oDJDacQ",
:shard "0",
:index "prefix-customerAlias"}
I'd estimate that tens of thousands of documents per day go through this code path successfully, but a few times a day I get this error.
Under what circumstances will Elasticsearch complain that the document it's being asked to index, with doc_as_upsert, doesn't exist?