Specify the _id field using Bulk.IndexMany in ElasticSearch

Viewed 2440

I'm facing a problem inserting document using bulk API (C# NEST v5.4). I've an array of documents and inside of the array I've my ID.

My code is:

documents = documents .ToArray();

Client.Bulk(bd =>
bd.IndexMany(documents,
    (descriptor, s) => descriptor.Index(indexName)));

How can i insert the _id manually using the descriptor?

Thanks in advance!

1 Answers
Related