Class TypeMapping
Implements
Inherited Members
Namespace: OpenSearch .Client
Assembly: OpenSearch.Client.dll
Syntax
public class TypeMapping : ITypeMapping
Properties
| Edit this page View SourceDateDetection
If enabled (default), then new string fields are checked to see whether their contents match
any of the date patterns specified in Dynamic
Declaration
public bool? DateDetection { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Dynamic
Whether new unseen fields will be added to the mapping. Default is true
.
A value of false
will ignore unknown fields and a value of Strict
will result in an error if an unknown field is encountered in a document.
Declaration
public Union<bool, DynamicMapping> Dynamic { get; set; }
Property Value
Type | Description |
---|---|
Union<bool, Dynamic |
DynamicDateFormats
Date formats used by Date
Declaration
public IEnumerable<string> DynamicDateFormats { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<string> |
DynamicTemplates
Dynamic templates allow you to define custom mappings that can be applied to dynamically added fields based on
- the datatype detected by OpenSearch, with Match
- the name of the field, with Match and Unmatch or
Match
- the full dotted path to the field, with Path
The original field name {name}
and the detected datatype {dynamic_type}
template variables can be
used in the mapping specification as placeholders.
Declaration
public IDynamicTemplateContainer DynamicTemplates { get; set; }
Property Value
Type | Description |
---|---|
IDynamic |
FieldNamesField
Used to index the names of every field in a document that contains any value other than null. This field was used by the exists query to find documents that either have or don’t have any non-null value for a particular field. Now, it only indexes the names of fields that have doc_values and norms disabled. Can be disabled. Disabling _field_names is often not necessary because it no longer carries the index overhead it once did. If you have a lot of fields which have doc_values and norms disabled and you do not need to execute exists queries using those fields you might want to disable
Declaration
public IFieldNamesField FieldNamesField { get; set; }
Property Value
Type | Description |
---|---|
IField |
Meta
Custom meta data to associate with a mapping. Not used by OpenSearch, but can be used to store application-specific metadata.
Declaration
public IDictionary<string, object> Meta { get; set; }
Property Value
Type | Description |
---|---|
IDictionary<string, object> |
NumericDetection
If enabled (not enabled by default), then new string fields are checked to see whether they wholly contain a numeric value and if so, to map as a numeric field.
Declaration
public bool? NumericDetection { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Properties
Specifies the mapping properties
Declaration
public IProperties Properties { get; set; }
Property Value
Type | Description |
---|---|
IProperties |
RoutingField
Specifies configuration for the _routing parameter
Declaration
public IRoutingField RoutingField { get; set; }
Property Value
Type | Description |
---|---|
IRouting |
RuntimeFields
Specifies runtime fields for the mapping.
Declaration
public IRuntimeFields RuntimeFields { get; set; }
Property Value
Type | Description |
---|---|
IRuntime |
SizeField
If enabled, indexes the size in bytes of the original _source field. Requires mapper-size plugin be installed
Declaration
public ISizeField SizeField { get; set; }
Property Value
Type | Description |
---|---|
ISize |
SourceField
Specifies configuration for the _source field
Declaration
public ISourceField SourceField { get; set; }
Property Value
Type | Description |
---|---|
ISource |