Search Results for

    Show / Hide Table of Contents

    Class PutMappingRequest

    Request for PutMapping

    https://opensearch.org/docs/latest/api-reference/index-apis/put-mapping/

    Inheritance
    object
    RequestBase<PutMappingRequestParameters>
    PlainRequestBase<PutMappingRequestParameters>
    PutMappingRequest
    PutMappingRequest<TDocument>
    Implements
    IPutMappingRequest
    ITypeMapping
    IRequest<PutMappingRequestParameters>
    IRequest
    Inherited Members
    PlainRequestBase<PutMappingRequestParameters>.RequestConfiguration
    PlainRequestBase<PutMappingRequestParameters>.ErrorTrace
    PlainRequestBase<PutMappingRequestParameters>.FilterPath
    PlainRequestBase<PutMappingRequestParameters>.Human
    PlainRequestBase<PutMappingRequestParameters>.Pretty
    PlainRequestBase<PutMappingRequestParameters>.SourceQueryString
    RequestBase<PutMappingRequestParameters>.HttpMethod
    RequestBase<PutMappingRequestParameters>.RequestState
    RequestBase<PutMappingRequestParameters>.ContentType
    RequestBase<PutMappingRequestParameters>.ResolveUrl(RouteValues, IConnectionSettingsValues)
    RequestBase<PutMappingRequestParameters>.RequestDefaults(PutMappingRequestParameters)
    RequestBase<PutMappingRequestParameters>.Q<TOut>(string)
    RequestBase<PutMappingRequestParameters>.Q(string, object)
    RequestBase<PutMappingRequestParameters>.SetAcceptHeader(string)
    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
    [DataContract]
    public class PutMappingRequest : PlainRequestBase<PutMappingRequestParameters>, IPutMappingRequest, ITypeMapping, IRequest<PutMappingRequestParameters>, IRequest

    Constructors

    | Edit this page View Source

    PutMappingRequest()

    Used for serialization purposes, making sure we have a parameterless constructor

    Declaration
    protected PutMappingRequest()
    | Edit this page View Source

    PutMappingRequest(Indices)

    /{index}/_mapping

    Declaration
    public PutMappingRequest(Indices index)
    Parameters
    Type Name Description
    Indices index

    this parameter is required

    Properties

    | Edit this page View Source

    AllowNoIndices

    If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes.

    Declaration
    public bool? AllowNoIndices { get; set; }
    Property Value
    Type Description
    bool?
    | Edit this page View Source

    ClusterManagerTimeout

    Operation timeout for connection to cluster-manager node.

    Declaration
    public Time ClusterManagerTimeout { get; set; }
    Property Value
    Type Description
    Time
    Remarks

    Supported by OpenSearch servers of version 2.0.0 or greater.

    | Edit this page View Source

    DateDetection

    If enabled (default), then new string fields are checked to see whether their contents match any of the date patterns specified in DynamicDateFormats. If a match is found, a new date field is added with the corresponding format.

    Declaration
    public bool? DateDetection { get; set; }
    Property Value
    Type Description
    bool?
    | Edit this page View Source

    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, DynamicMapping>
    | Edit this page View Source

    DynamicDateFormats

    Date formats used by DateDetection

    Declaration
    public IEnumerable<string> DynamicDateFormats { get; set; }
    Property Value
    Type Description
    IEnumerable<string>
    | Edit this page View Source

    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 MatchMappingType.

    - the name of the field, with Match and Unmatch or MatchPattern.

    - the full dotted path to the field, with PathMatch and PathUnmatch.

    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
    IDynamicTemplateContainer
    | Edit this page View Source

    ExpandWildcards

    Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as open,hidden. Valid values are: all, open, closed, hidden, none.

    Declaration
    public ExpandWildcards? ExpandWildcards { get; set; }
    Property Value
    Type Description
    ExpandWildcards?
    | Edit this page View Source

    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
    IFieldNamesField
    | Edit this page View Source

    IgnoreUnavailable

    If false, the request returns an error if it targets a missing or closed index.

    Declaration
    public bool? IgnoreUnavailable { get; set; }
    Property Value
    Type Description
    bool?
    | Edit this page View Source

    IncludeTypeName

    Whether a type should be expected in the body of the mappings.

    Declaration
    public bool? IncludeTypeName { get; set; }
    Property Value
    Type Description
    bool?
    Remarks

    Deprecated as of OpenSearch 2.0

    | Edit this page View Source

    MasterTimeout

    Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.

    Declaration
    [Obsolete("Deprecated as of: 2.0.0, reason: To promote inclusive language, use `cluster_manager_timeout` instead.")]
    public Time MasterTimeout { get; set; }
    Property Value
    Type Description
    Time
    | Edit this page View Source

    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>
    | Edit this page View Source

    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?
    | Edit this page View Source

    Properties

    Specifies the mapping properties

    Declaration
    public IProperties Properties { get; set; }
    Property Value
    Type Description
    IProperties
    | Edit this page View Source

    RoutingField

    Specifies configuration for the _routing parameter

    Declaration
    public IRoutingField RoutingField { get; set; }
    Property Value
    Type Description
    IRoutingField
    | Edit this page View Source

    RuntimeFields

    Specifies runtime fields for the mapping.

    Declaration
    public IRuntimeFields RuntimeFields { get; set; }
    Property Value
    Type Description
    IRuntimeFields
    | Edit this page View Source

    Self

    Declaration
    protected IPutMappingRequest Self { get; }
    Property Value
    Type Description
    IPutMappingRequest
    | Edit this page View Source

    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
    ISizeField
    | Edit this page View Source

    SourceField

    Specifies configuration for the _source field

    Declaration
    public ISourceField SourceField { get; set; }
    Property Value
    Type Description
    ISourceField
    | Edit this page View Source

    Timeout

    Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

    Declaration
    public Time Timeout { get; set; }
    Property Value
    Type Description
    Time
    | Edit this page View Source

    WriteIndexOnly

    If true, the mappings are applied only to the current write index for the target.

    Declaration
    public bool? WriteIndexOnly { get; set; }
    Property Value
    Type Description
    bool?

    Implements

    IPutMappingRequest
    ITypeMapping
    IRequest<TParameters>
    IRequest

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Constructors
      • PutMappingRequest()
      • PutMappingRequest(Indices)
    • Properties
      • AllowNoIndices
      • ClusterManagerTimeout
      • DateDetection
      • Dynamic
      • DynamicDateFormats
      • DynamicTemplates
      • ExpandWildcards
      • FieldNamesField
      • IgnoreUnavailable
      • IncludeTypeName
      • MasterTimeout
      • Meta
      • NumericDetection
      • Properties
      • RoutingField
      • RuntimeFields
      • Self
      • SizeField
      • SourceField
      • Timeout
      • WriteIndexOnly
    • Implements
    • Extension Methods
    Back to top Generated by DocFX