elasticsearch/elasticsearch-net — pull request #595 by nordbergm (2014-04-17 14:38:49+00:00)
Title: allow type name to be overridden when adding mappings at index creation

This change allows you to use the PutMappingDescriptor's existing Type method to override the type name of a mapping at index creation.

Since it was already supported for PutMapping, having it at index creation too made sense.

The use case is pretty simple. If you have a base class which you want to either use attribute mappings for, or fluent mapping, you could put that base class mapping as "\_default\_" by doing something like:

```csharp
_client.CreateIndex("index",
c =>
c.AddMapping(
map =>
map.Type("_default_")
.Properties(p => p.String(s => s.Name(n => n.Name)
.Index(FieldIndexOption.analyzed)
.Store(false)
.IncludeInAll()))
.DynamicTemplates(d => d.Add(a =>
a.Name("other")
.Match("*")
.Mapping(m => m.Generic(g => g.Index("not_analyzed")
.IncludeInAll(false)))))))
```