title: How to create index of Polymorphic data in elastic search with NEST
body: <p>I have</p>
  
  <pre><code>             var descriptor = new CreateIndexDescriptor("resources")
                  .Mappings(ms =&gt; ms
                      .Map&lt;ResourceEntity&gt;(m =&gt; m
                          .AutoMap()
                          .RoutingField(k =&gt; k.Required(true))
                          .Properties(props =&gt; props
                              .Keyword(s1 =&gt; s1.Name(p =&gt; p.Id).Norms(false))
                              .Keyword(k =&gt; k.Name(p =&gt; p.Type).Norms(false))
                              .Keyword(k =&gt; k.Name(p =&gt; p.Location).Norms(false))
                           )
                      )
                      .Map&lt;StreamEntity&gt;(m =&gt; m
                          .AutoMap()
                          .RoutingField(r =&gt; r.Required(true))
                          .Properties(props =&gt; props
                              .Keyword(s1 =&gt; s1.Name(p =&gt; p.Name).Norms(false))
                           )
                      )
                      .Map&lt;StreamMessageEntity&gt;(m =&gt; m
                          .AutoMap()
                          .Parent&lt;StreamEntity&gt;()
                          .RoutingField(r =&gt; r.Required(true))
                      )
                  );
  </code></pre>
  
  <p>but it fails</p>
  
  <pre><code>Invalid NEST response built from a unsuccessful low level call on PUT: /elastic/resources
  # Audit trail of this API call:
   - [1] BadResponse: Node: https://local.earthml.com:8500/elastic/ Took: 00:00:00.6271828
  # ServerError: ServerError: 400Type: illegal_argument_exception Reason: "Mapper for [id] conflicts with existing mapping in other types:
  [mapper [id] has different [similarity], mapper [id] is used by multiple types. Set update_all_types to true to update [null_value] across all types.]"
  # OriginalException: System.Net.WebException: The remote server returned an error: (400) Bad Request.
     at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
     at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Elasticsearch.Net.HttpConnection.&lt;RequestAsync&gt;d__14`1.MoveNext()
  # Request:
  &lt;Request stream not captured or already read to completion by serializer. Set DisableDirectStreaming() on ConnectionSettings to force it to be set on the response.&gt;
  # Response:
  &lt;Response stream not captured or already read to completion by serializer. Set DisableDirectStreaming() on ConnectionSettings to force it to be set on the response.&gt;
  </code></pre>
  
  <p>and here are my base classes.</p>
  
  <pre><code>public abstract class ResourceEntity
  {         
      public string Id { get; set; }       
      public string Location { get; set; }
      public string Type { get; set; }
  }
  
  public class NamedResourceEntity : ResourceEntity
  {      
      public string Name { get; set; }
  }
  public class StreamEntity : NamedResourceEntity
  {
  }
  
  public class StreamMessageEntity : ResourceEntity
  {       
  }
  </code></pre>
  
  <p>as of now there are not many extra properties on them, but they will come. Do I have to registere everything or could I simply registere the base class with the index in elastic search.</p>
  
  <p>I want all types in the same index, and the Type Property is a seperater for the different classes (it will be unique for each class and set when created).</p>