You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm doing a index / update bulk call using the client.bulk api:
When I do the insert action
{index: 'myIndex',type: '_doc',body: [// action description{index: {_id: docIDOne}},// the document to indexitemOne,// action description{index: {_id: docIDTwo}},// the document to indexitemTwo,]}
The index action works ok. At second attempt of the index action with the same items it works as well and I get a updated value for the result field in the response:
This issue tracker should be used only for questions or issues related to the JavaScript client. If you have other general questions about Elastic I suggest you use our fantastic forum, where your question will probably help others as well :)
I'm doing a index / update bulk call using the
client.bulk
api:When I do the
insert
actionThe index action works ok. At second attempt of the
index
action with the same items it works as well and I get aupdated
value for theresult
field in the response:Does this mean that that doc has been updated?
I have tried also to use the
update
action with thedoc_as_upsert
flag like:and it gives me back a
created
result the first attempt, and anoop
the second one. I suppose I will get aupdated
if it updates the content.So the point is: which api call shall I use to perform something closer to a insert OR update:
index
orupdate
with thedoc_as_upsert
flag?The text was updated successfully, but these errors were encountered: