I use bulk update and have set "doc_as_upsert": true
However, SOMETIMES I get errors like this:
"update": {
"_index": "artists",
"_type": "artist",
"_id": "fernanda-francis",
"status": 404,
"error": {
"type": "document_missing_exception",
"reason": "[artist][fernanda-francis]: document missing",
"index_uuid": "q123-ftoS4WD3eE1j0D0ka",
"shard": "3",
"index": "artists"
}
}
Any ideas why this happens? Isn't it supposed to insert the doc if it doesn't exist?
ES v5.1 on AWS.
Anyone has any ideas?
Is this just me who has run into this issue?
Hey @skilledDeveloper ,
Any chance you could show us the upsert code?
@mujtabahussain
I use elasticsearch npm package and send something like the followings via bulk
method:
var artist = {...};
var firstLine = {
update: {
_index: "artists",
_type: "artist",
_id: artist.id,
}
};
var secondLine = {
"doc": artist
"doc_as_upsert": true
};
client.bulk({
body: [firstLine, secondLine]
}, function (err, resp) {
// ...
});
system
(system)
Closed
May 31, 2017, 4:30pm
6
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.