putdatastreammappings

package
v9.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Update data stream mappings.

This API can be used to override mappings on specific data streams. These overrides will take precedence over what is specified in the template that the data stream matches. The mapping change is only applied to new write indices that are created during rollover after this API is called. No indices are changed by this API.

Index

Constants

This section is empty.

Variables

View Source
var ErrBuildPath = errors.New("cannot build path, check for missing path parameters")

ErrBuildPath is returned in case of missing parameters within the build of the request.

Functions

This section is empty.

Types

type NewPutDataStreamMappings

type NewPutDataStreamMappings func(name string) *PutDataStreamMappings

NewPutDataStreamMappings type alias for index.

func NewPutDataStreamMappingsFunc

func NewPutDataStreamMappingsFunc(tp elastictransport.Interface) NewPutDataStreamMappings

NewPutDataStreamMappingsFunc returns a new instance of PutDataStreamMappings with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.

type PutDataStreamMappings

type PutDataStreamMappings struct {
	// contains filtered or unexported fields
}

func New

Update data stream mappings.

This API can be used to override mappings on specific data streams. These overrides will take precedence over what is specified in the template that the data stream matches. The mapping change is only applied to new write indices that are created during rollover after this API is called. No indices are changed by this API.

https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-mappings

func (*PutDataStreamMappings) AddProperty

func (*PutDataStreamMappings) AddRuntime

func (*PutDataStreamMappings) AllField

API name: all_field

func (*PutDataStreamMappings) DataStreamTimestamp_

func (r *PutDataStreamMappings) DataStreamTimestamp_(datastreamtimestamp_ types.DataStreamTimestampVariant) *PutDataStreamMappings

API name: _data_stream_timestamp

func (*PutDataStreamMappings) DateDetection

func (r *PutDataStreamMappings) DateDetection(datedetection bool) *PutDataStreamMappings

API name: date_detection

func (PutDataStreamMappings) Do

func (r PutDataStreamMappings) Do(providedCtx context.Context) (*Response, error)

Do runs the request through the transport, handle the response and returns a putdatastreammappings.Response

func (*PutDataStreamMappings) DryRun

DryRun If `true`, the request does not actually change the mappings on any data streams. Instead, it simulates changing the settings and reports back to the user what would have happened had these settings actually been applied. API name: dry_run

func (*PutDataStreamMappings) Dynamic

API name: dynamic

func (*PutDataStreamMappings) DynamicDateFormats

func (r *PutDataStreamMappings) DynamicDateFormats(dynamicdateformats ...string) *PutDataStreamMappings

API name: dynamic_date_formats

func (*PutDataStreamMappings) DynamicTemplates

func (r *PutDataStreamMappings) DynamicTemplates(dynamictemplates []map[string]types.DynamicTemplate) *PutDataStreamMappings

API name: dynamic_templates

func (*PutDataStreamMappings) Enabled

func (r *PutDataStreamMappings) Enabled(enabled bool) *PutDataStreamMappings

API name: enabled

func (*PutDataStreamMappings) ErrorTrace

func (r *PutDataStreamMappings) ErrorTrace(errortrace bool) *PutDataStreamMappings

ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace

func (*PutDataStreamMappings) FieldNames_

API name: _field_names

func (*PutDataStreamMappings) FilterPath

func (r *PutDataStreamMappings) FilterPath(filterpaths ...string) *PutDataStreamMappings

FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path

func (*PutDataStreamMappings) Header

func (r *PutDataStreamMappings) Header(key, value string) *PutDataStreamMappings

Header set a key, value pair in the PutDataStreamMappings headers map.

func (*PutDataStreamMappings) HttpRequest

func (r *PutDataStreamMappings) HttpRequest(ctx context.Context) (*http.Request, error)

HttpRequest returns the http.Request object built from the given parameters.

func (*PutDataStreamMappings) Human

Human When set to `true` will return statistics in a format suitable for humans. For example `"exists_time": "1h"` for humans and `"exists_time_in_millis": 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines. API name: human

func (*PutDataStreamMappings) IndexField

API name: index_field

func (*PutDataStreamMappings) MasterTimeout

func (r *PutDataStreamMappings) MasterTimeout(duration string) *PutDataStreamMappings

MasterTimeout The period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. API name: master_timeout

func (*PutDataStreamMappings) Meta_

API name: _meta

func (*PutDataStreamMappings) NumericDetection

func (r *PutDataStreamMappings) NumericDetection(numericdetection bool) *PutDataStreamMappings

API name: numeric_detection

func (PutDataStreamMappings) Perform

func (r PutDataStreamMappings) Perform(providedCtx context.Context) (*http.Response, error)

Perform runs the http.Request through the provided transport and returns an http.Response.

func (*PutDataStreamMappings) Pretty

Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty

func (*PutDataStreamMappings) Properties

func (r *PutDataStreamMappings) Properties(properties map[string]types.Property) *PutDataStreamMappings

API name: properties

func (*PutDataStreamMappings) Raw

Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.

func (*PutDataStreamMappings) Request

Request allows to set the request property with the appropriate payload.

func (*PutDataStreamMappings) Routing_

API name: _routing

func (*PutDataStreamMappings) Runtime

API name: runtime

func (*PutDataStreamMappings) Size_

API name: _size

func (*PutDataStreamMappings) Source_

API name: _source

func (*PutDataStreamMappings) Subobjects

API name: subobjects

func (*PutDataStreamMappings) Timeout

func (r *PutDataStreamMappings) Timeout(duration string) *PutDataStreamMappings

Timeout The period to wait for a response. If no response is received before the

timeout expires, the request fails and returns an error.

API name: timeout

type Response

type Response struct {
	DataStreams []types.UpdatedDataStreamMappings `json:"data_streams"`
}

Response holds the response body struct for the package putdatastreammappings

https://github.com/elastic/elasticsearch-specification/blob/d520d9e8cf14cad487de5e0654007686c395b494/specification/indices/put_data_stream_mappings/IndicesPutDataStreamMappingsResponse.ts#L23-L28

func NewResponse

func NewResponse() *Response

NewResponse returns a Response

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL