title: Bulk insert to ElasticSearch with NEST
body: <p>I try to add 100k products to elasticsearch, but when i try i get: {"Validation Failed: 1: no requests added;"}</p>
  
  <p>My code:</p>
  
  <pre><code>        var Node = new Uri("......");
          var ConnectionPool = new SniffingConnectionPool(new[] { Node });
          var Config = new ConnectionConfiguration(ConnectionPool)
                      .SniffOnConnectionFault(false)
                      .SniffOnStartup(false)
                      .SniffLifeSpan(TimeSpan.FromMinutes(10));
          var Client = new ElasticsearchClient(Config);
  
          var AllProducts = Product.GetProducts();
          var SPl = AllProducts.Split(100); // Split into 100 collections/requests
  
          var COll = new List&lt;ElasticsearchResponse&lt;DynamicDictionary&gt;&gt;();
  
          foreach (var I in SPl)
          {
              var Descriptor = new BulkDescriptor();
  
              foreach (var Product in I)
              {
                  Descriptor.Index&lt;Product&gt;(op =&gt; op.Document(Product));
              }
  
              COll.Add(Client.Bulk(Descriptor));
          }
  </code></pre>
  
  <p>AllProducts contains a list of this object:</p>
  
  <pre><code>public class Product
  {
   public int AffiliateNr { get; set; }
   public string AffiliateProductId { get; set; }
   public int BrandNr { get; set; }
   public string Currency { get; set; }
   public string IndexId { get; set; }
   public decimal Price { get; set; }
   public long ProductNr { get; set; }
   public string Title { get; set; }
  }
  </code></pre>
  
  <p>So,</p>
  
  <ol>
  <li>Where can i set the name of the index?</li>
  <li>Why did i get, Validation Failed: 1: no requests added;?</li>
  <li>IndexId is my id for the product. How do i tell Elasticsearch to use this id? Or must i specify a id?</li>
  </ol>