title: Add a mapping to an existing index template (using NEST attributes)
body: <p>In my ElasticSearch server, I have an <em>existing</em> index template, which contains some settings and some mappings.</p>
  
  <p>I want to add a mapping for a new type to the template, but since it's not possible to update templates, I need to delete the existing one and recreate it.</p>
  
  <p>Since I would like to keep all the existing settings, I tried getting the existing definition, add the mapping to it and then delete/recreate, like in this example:</p>
  
  <pre><code>using Nest;
  using System;
  
  public class SomeNewType {
      [ElasticProperty(Index = FieldIndexOption.NotAnalyzed)]
      public string SomeField { get; set; }
      [ElasticProperty(Index = FieldIndexOption.Analyzed)]
      public string AnotherField { get; set; }
  }
  
  class Program {
      static void Main(string[] args) {
          var settings = new ConnectionSettings(uri: new Uri("http://localhost:9200/"));
          var client = new ElasticClient(settings);
          var templateResponse = client.GetTemplate("sometemplate");
          var template = templateResponse.TemplateMapping;
          client.DeleteTemplate("sometemplate");
          // Add a mapping to the template somehow...
          template.Mappings.Add( ... );
          var putTemplateRequest = new PutTemplateRequest("sometemplate") {
              TemplateMapping = template
          };
          client.PutTemplate(putTemplateRequest);
      }
  }
  </code></pre>
  
  <p>However, I cannot find a way to add a mapping to the template definition using the ElasticProperty attributes, like in</p>
  
  <pre><code>client.Map&lt;SomeNewType&gt;(m =&gt; m.MapFromAttributes());
  </code></pre>
  
  <p>Is it possible to create a <code>RootObjectMapping</code> to add to the <code>Mappings</code> collection with something similar to <code>MapFromAttributes</code>?</p>