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 trying to use the bulk API and am hitting a problem with the way dynamic entries are being handled. It looks like it's a serialization issue.
Given the following:
var bulkEntries = new List<object>();
var bulkEntry = new {index = new { _index = "ourIndex", _type = "ourType", _id = "ourId"}}
bulkEntries.Add(bulkEntry);
Here's two examples, one that works as expected and one that doesn't:
Working
bulkEntries.Add(new { id = 1 });
Not working
var doc = JsonConvert.DeserializeObject<dynamic>(document);
doc.someprop = "some value";
bulkEntries.Add(doc);