diff --git a/src/Nest/CommonAbstractions/ConnectionSettings/ClrTypeDefaults.cs b/src/Nest/CommonAbstractions/ConnectionSettings/ClrTypeDefaults.cs
index 6d021f263c6..1c49d6f86cc 100644
--- a/src/Nest/CommonAbstractions/ConnectionSettings/ClrTypeDefaults.cs
+++ b/src/Nest/CommonAbstractions/ConnectionSettings/ClrTypeDefaults.cs
@@ -26,11 +26,6 @@ public interface IClrTypeMapping
///
string RelationName { get; set; }
- ///
- /// The default Elasticsearch type name for the given
- ///
- string TypeName { get; set; }
-
/// Disables Id inference for the given .
/// By default, the _id value for a document is inferred from a property named Id,
/// or from the property named by , if set.
@@ -71,9 +66,6 @@ public class ClrTypeMapping : IClrTypeMapping
///
public string RelationName { get; set; }
- ///
- public string TypeName { get; set; }
-
///
public bool DisableIdInference { get; set; }
}
@@ -106,15 +98,11 @@ public class ClrTypeMappingDescriptor : DescriptorBase
public ClrTypeMappingDescriptor IndexName(string indexName) => Assign(indexName, (a, v) => a.IndexName = v);
- ///
- public ClrTypeMappingDescriptor TypeName(string typeName) => Assign(typeName, (a, v) => a.TypeName = v);
-
///
public ClrTypeMappingDescriptor RelationName(string relationName) => Assign(relationName, (a, v) => a.RelationName = v);
@@ -136,7 +124,6 @@ public class ClrTypeMappingDescriptor
IList> IClrTypeMapping.Properties { get; set; } = new List>();
string IClrTypeMapping.RelationName { get; set; }
Expression> IClrTypeMapping.RoutingProperty { get; set; }
- string IClrTypeMapping.TypeName { get; set; }
bool IClrTypeMapping.DisableIdInference { get; set; }
///
@@ -144,11 +131,6 @@ public class ClrTypeMappingDescriptor
///
public ClrTypeMappingDescriptor IndexName(string indexName) => Assign(indexName, (a, v) => a.IndexName = v);
- ///
- /// The default Elasticsearch type name for
- ///
- public ClrTypeMappingDescriptor TypeName(string typeName) => Assign(typeName, (a, v) => a.TypeName = v);
-
///
/// The relation name for to resolve to.
///
diff --git a/src/Nest/CommonAbstractions/ConnectionSettings/ConnectionSettingsBase.cs b/src/Nest/CommonAbstractions/ConnectionSettings/ConnectionSettingsBase.cs
index 790d4f31d70..454ff7828dc 100644
--- a/src/Nest/CommonAbstractions/ConnectionSettings/ConnectionSettingsBase.cs
+++ b/src/Nest/CommonAbstractions/ConnectionSettings/ConnectionSettingsBase.cs
@@ -56,8 +56,6 @@ public abstract class ConnectionSettingsBase : ConnectionCo
private readonly FluentDictionary _defaultRelationNames;
- private readonly FluentDictionary _defaultTypeNames;
-
private readonly FluentDictionary _idProperties = new FluentDictionary();
private readonly Inferrer _inferrer;
@@ -94,7 +92,6 @@ IPropertyMappingProvider propertyMappingProvider
_defaultFieldNameInferrer = p => p.ToCamelCase();
_defaultIndices = new FluentDictionary();
- _defaultTypeNames = new FluentDictionary();
_defaultRelationNames = new FluentDictionary();
_inferrer = new Inferrer(this);
}
@@ -216,9 +213,6 @@ public TConnectionSettings DefaultMappingFor(Func typeMa
if (!inferMapping.IndexName.IsNullOrEmpty())
_defaultIndices.Add(inferMapping.ClrType, inferMapping.IndexName);
- if (!inferMapping.TypeName.IsNullOrEmpty())
- _defaultTypeNames.Add(inferMapping.ClrType, inferMapping.TypeName);
-
if (!inferMapping.RelationName.IsNullOrEmpty())
_defaultRelationNames.Add(inferMapping.ClrType, inferMapping.RelationName);
}
diff --git a/src/Tests/Tests.Domain/Extensions/ConnectionSettingsExtensions.cs b/src/Tests/Tests.Domain/Extensions/ConnectionSettingsExtensions.cs
index e37726e3fb5..e25d7b3dca1 100644
--- a/src/Tests/Tests.Domain/Extensions/ConnectionSettingsExtensions.cs
+++ b/src/Tests/Tests.Domain/Extensions/ConnectionSettingsExtensions.cs
@@ -11,12 +11,10 @@ public static ConnectionSettings ApplyDomainSettings(this ConnectionSettings set
.IndexName(TestValueHelper.ProjectsIndex)
.IdProperty(p => p.Name)
.RelationName("project")
- .TypeName("doc")
)
.DefaultMappingFor(map => map
.IndexName(TestValueHelper.ProjectsIndex)
.RelationName("commits")
- .TypeName("doc")
)
.DefaultMappingFor(map => map
.IndexName("devs")
@@ -25,14 +23,12 @@ public static ConnectionSettings ApplyDomainSettings(this ConnectionSettings set
)
.DefaultMappingFor(map => map
.IndexName("queries")
- .TypeName(TestValueHelper.PercolatorType)
)
.DefaultMappingFor(map => map
.IndexName("server-metrics")
)
.DefaultMappingFor(map => map
.IndexName("shapes")
- .TypeName("doc")
);
}
}
diff --git a/src/Tests/Tests/ClientConcepts/Connection/ConfigurationOptions.doc.cs b/src/Tests/Tests/ClientConcepts/Connection/ConfigurationOptions.doc.cs
index 515a04eaa15..09c5289f660 100644
--- a/src/Tests/Tests/ClientConcepts/Connection/ConfigurationOptions.doc.cs
+++ b/src/Tests/Tests/ClientConcepts/Connection/ConfigurationOptions.doc.cs
@@ -49,7 +49,6 @@ public void AvailableOptions()
var connectionSettings = new ConnectionSettings()
.DefaultMappingFor(i => i
.IndexName("my-projects")
- .TypeName("project")
)
.EnableDebugMode()
.PrettyJson()
diff --git a/src/Tests/Tests/ClientConcepts/HighLevel/Inference/TypesAndRelationsInference.doc.cs b/src/Tests/Tests/ClientConcepts/HighLevel/Inference/TypesAndRelationsInference.doc.cs
index 555a66e6c68..c39e9a0111a 100644
--- a/src/Tests/Tests/ClientConcepts/HighLevel/Inference/TypesAndRelationsInference.doc.cs
+++ b/src/Tests/Tests/ClientConcepts/HighLevel/Inference/TypesAndRelationsInference.doc.cs
@@ -39,12 +39,10 @@ [U] public void RelationNameConfiguration()
var settings = new ConnectionSettings()
.DefaultMappingFor(m => m
.IndexName("projects-and-commits")
- .TypeName("doc")
.RelationName("commits")
)
.DefaultMappingFor(m => m
.IndexName("projects-and-commits")
- .TypeName("doc")
.RelationName("projects")
);
@@ -67,7 +65,6 @@ [U] public void TypeNameExplicitConfigurationDoesNotAffectRelationName()
var settings = new ConnectionSettings()
.DefaultMappingFor(m => m
.IndexName("projects-and-commits")
- .TypeName("doc")
);
var resolver = new RelationNameResolver(settings);
diff --git a/src/Tests/Tests/ClientConcepts/HighLevel/Mapping/AutoMap.doc.cs b/src/Tests/Tests/ClientConcepts/HighLevel/Mapping/AutoMap.doc.cs
index 0814ae411af..40df6aedefd 100644
--- a/src/Tests/Tests/ClientConcepts/HighLevel/Mapping/AutoMap.doc.cs
+++ b/src/Tests/Tests/ClientConcepts/HighLevel/Mapping/AutoMap.doc.cs
@@ -161,7 +161,6 @@ public void OverridingInheritedProperties()
var connectionSettings = new ConnectionSettings(new InMemoryConnection()) // <1> we're using an _in memory_ connection for this example. In your production application though, you'll want to use an `IConnection` that actually sends a request.
.DisableDirectStreaming() // <2> we disable direct streaming here to capture the request and response bytes. In your production application however, you'll likely not want to do this, since it causes the request and response bytes to be buffered in memory.
.DefaultMappingFor(m => m
- .TypeName("parent")
.Ignore(p => p.Description)
.Ignore(p => p.IgnoreMe)
);
diff --git a/src/Tests/Tests/ClientConcepts/HighLevel/Mapping/ParentChildRelationships.doc.cs b/src/Tests/Tests/ClientConcepts/HighLevel/Mapping/ParentChildRelationships.doc.cs
index ce90c7b3916..03031c2ea14 100644
--- a/src/Tests/Tests/ClientConcepts/HighLevel/Mapping/ParentChildRelationships.doc.cs
+++ b/src/Tests/Tests/ClientConcepts/HighLevel/Mapping/ParentChildRelationships.doc.cs
@@ -77,9 +77,9 @@ public void SimpleParentChildMapping()
{
var connectionPool = new SingleNodeConnectionPool(new Uri("http://localhost:9200"));
var connectionSettings = new ConnectionSettings(connectionPool, new InMemoryConnection()) // <1> for the purposes of this example, an in memory connection is used which doesn't actually send a request. In your application, you'd use the default connection or your own implementation that actually sends a request.
- .DefaultMappingFor(m => m.IndexName("index").TypeName("doc"))
- .DefaultMappingFor(m => m.IndexName("index").TypeName("doc"))
- .DefaultMappingFor(m => m.IndexName("index").TypeName("doc").RelationName("parent"));
+ .DefaultMappingFor(m => m.IndexName("index"))
+ .DefaultMappingFor(m => m.IndexName("index"))
+ .DefaultMappingFor(m => m.IndexName("index").RelationName("parent"));
var client = new ElasticClient(connectionSettings);