Interface IDynamicTemplate
A Dynamic template that defines custom mappings to be applied to dynamically added fields based on:
- the datatype detected by OpenSearch, with MatchMappingType. - the name of the field, with Match and Unmatch or MatchPattern. - the full dotted path to the field, with PathMatch and PathUnmatch.Namespace: OpenSearch.Client
Assembly: OpenSearch.Client.dll
Syntax
public interface IDynamicTemplate
Properties
| Edit this page View SourceMapping
The mapping to apply to matching fields
Declaration
[DataMember(Name = "mapping")]
IProperty Mapping { get; set; }
Property Value
Type | Description |
---|---|
IProperty |
Match
A pattern to match on the field name
Declaration
[DataMember(Name = "match")]
string Match { get; set; }
Property Value
Type | Description |
---|---|
string |
MatchMappingType
Matches on the datatype detected by dynamic field mapping, in other words, the datatype that OpenSearch thinks the field should have. Only the following datatypes can be automatically detected: boolean, date, double, long, object, string. It also accepts * to match all datatypes.
Declaration
[DataMember(Name = "match_mapping_type")]
string MatchMappingType { get; set; }
Property Value
Type | Description |
---|---|
string |
MatchPattern
Adjusts the behavior of Match such that it supports full Java regular expression matching on the field name instead of simple wildcards
Declaration
[DataMember(Name = "match_pattern")]
MatchType? MatchPattern { get; set; }
Property Value
Type | Description |
---|---|
MatchType? |
PathMatch
A pattern to match on the field name, which may be the full dotted path to the field name
Declaration
[DataMember(Name = "path_match")]
string PathMatch { get; set; }
Property Value
Type | Description |
---|---|
string |
PathUnmatch
A pattern to exclude fields matched by PathMatch
Declaration
[DataMember(Name = "path_unmatch")]
string PathUnmatch { get; set; }
Property Value
Type | Description |
---|---|
string |
Unmatch
A pattern to exclude fields matched by Match
Declaration
[DataMember(Name = "unmatch")]
string Unmatch { get; set; }
Property Value
Type | Description |
---|---|
string |