I have upgraded to ElasticSearch.Net /Nest 2.0.2 and I can no longer use the low level client method (connector.GetClient().Raw.Bulk()). I have looked at the documentation but I can't seem to find any that shows how to post raw json using the new version to index new documents.
Post raw json using elastic search client
4.5k Views Asked by Imran Azad At
2
There are 2 best solutions below
0
On
client.Raw.Bulk() turned into client.LowLevel.Bulk(). With NEST, you could do something like:
// jsonStringList assumed to hold your bulk indexing commands and objects
var jsonPostData = new PostData<object>(jsonStringList);
var response = nestClient.LowLevel.Bulk<VoidResponse>("your_index", "your_type", jsonPostData);
That how I do that: