Search Results for

    Show / Hide Table of Contents

    Class DynamicTemplateDescriptor<T>

    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.
    Inheritance
    object
    DescriptorBase<DynamicTemplateDescriptor<T>, IDynamicTemplate>
    DynamicTemplateDescriptor<T>
    Implements
    IDescriptor
    IDynamicTemplate
    Inherited Members
    DescriptorBase<DynamicTemplateDescriptor<T>, IDynamicTemplate>.Self
    DescriptorBase<DynamicTemplateDescriptor<T>, IDynamicTemplate>.Assign<TValue>(TValue, Action<IDynamicTemplate, TValue>)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: OpenSearch.Client
    Assembly: OpenSearch.Client.dll
    Syntax
    public class DynamicTemplateDescriptor<T> : DescriptorBase<DynamicTemplateDescriptor<T>, IDynamicTemplate>, IDescriptor, IDynamicTemplate where T : class
    Type Parameters
    Name Description
    T

    Methods

    | Edit this page View Source

    Mapping(Func<SingleMappingSelector<T>, IProperty>)

    The mapping to apply to matching fields

    Declaration
    public DynamicTemplateDescriptor<T> Mapping(Func<SingleMappingSelector<T>, IProperty> mappingSelector)
    Parameters
    Type Name Description
    Func<SingleMappingSelector<T>, IProperty> mappingSelector
    Returns
    Type Description
    DynamicTemplateDescriptor<T>
    | Edit this page View Source

    Match(string)

    A pattern to match on the field name

    Declaration
    public DynamicTemplateDescriptor<T> Match(string match)
    Parameters
    Type Name Description
    string match
    Returns
    Type Description
    DynamicTemplateDescriptor<T>
    | Edit this page View Source

    MatchMappingType(string)

    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
    public DynamicTemplateDescriptor<T> MatchMappingType(string matchMappingType)
    Parameters
    Type Name Description
    string matchMappingType
    Returns
    Type Description
    DynamicTemplateDescriptor<T>
    | Edit this page View Source

    MatchPattern(MatchType?)

    Adjusts the behavior of Match such that it supports full Java regular expression matching on the field name instead of simple wildcards

    Declaration
    public DynamicTemplateDescriptor<T> MatchPattern(MatchType? matchPattern)
    Parameters
    Type Name Description
    MatchType? matchPattern
    Returns
    Type Description
    DynamicTemplateDescriptor<T>
    | Edit this page View Source

    PathMatch(string)

    A pattern to match on the field name, which may be the full dotted path to the field name

    Declaration
    public DynamicTemplateDescriptor<T> PathMatch(string pathMatch)
    Parameters
    Type Name Description
    string pathMatch
    Returns
    Type Description
    DynamicTemplateDescriptor<T>
    | Edit this page View Source

    PathUnmatch(string)

    A pattern to exclude fields matched by PathMatch

    Declaration
    public DynamicTemplateDescriptor<T> PathUnmatch(string pathUnmatch)
    Parameters
    Type Name Description
    string pathUnmatch
    Returns
    Type Description
    DynamicTemplateDescriptor<T>
    | Edit this page View Source

    Unmatch(string)

    A pattern to exclude fields matched by Match

    Declaration
    public DynamicTemplateDescriptor<T> Unmatch(string unMatch)
    Parameters
    Type Name Description
    string unMatch
    Returns
    Type Description
    DynamicTemplateDescriptor<T>

    Implements

    IDescriptor
    IDynamicTemplate

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Methods
      • Mapping(Func<SingleMappingSelector<T>, IProperty>)
      • Match(string)
      • MatchMappingType(string)
      • MatchPattern(MatchType?)
      • PathMatch(string)
      • PathUnmatch(string)
      • Unmatch(string)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX