putsettings

package
v8.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 13 Imported by: 4

Documentation

Overview

Updates the index settings.

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 NewPutSettings

type NewPutSettings func() *PutSettings

NewPutSettings type alias for index.

func NewPutSettingsFunc

func NewPutSettingsFunc(tp elastictransport.Interface) NewPutSettings

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

type PutSettings

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

func (*PutSettings) AllowNoIndices

func (r *PutSettings) AllowNoIndices(allownoindices bool) *PutSettings

AllowNoIndices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. API name: allow_no_indices

func (PutSettings) Do

func (r PutSettings) Do(ctx context.Context) (*Response, error)

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

func (*PutSettings) ExpandWildcards

func (r *PutSettings) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *PutSettings

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`. API name: expand_wildcards

func (*PutSettings) FlatSettings

func (r *PutSettings) FlatSettings(flatsettings bool) *PutSettings

FlatSettings If `true`, returns settings in flat format. API name: flat_settings

func (*PutSettings) Header

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

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

func (*PutSettings) HttpRequest

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

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

func (*PutSettings) IgnoreUnavailable

func (r *PutSettings) IgnoreUnavailable(ignoreunavailable bool) *PutSettings

IgnoreUnavailable If `true`, returns settings in flat format. API name: ignore_unavailable

func (*PutSettings) Index

func (r *PutSettings) Index(index string) *PutSettings

Index Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. API Name: index

func (*PutSettings) MasterTimeout

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

MasterTimeout 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 (PutSettings) Perform added in v8.7.0

func (r PutSettings) Perform(ctx context.Context) (*http.Response, error)

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

func (*PutSettings) PreserveExisting

func (r *PutSettings) PreserveExisting(preserveexisting bool) *PutSettings

PreserveExisting If `true`, existing index settings remain unchanged. API name: preserve_existing

func (*PutSettings) Raw

func (r *PutSettings) Raw(raw io.Reader) *PutSettings

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

func (*PutSettings) Request

func (r *PutSettings) Request(req *types.IndexSettings) *PutSettings

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

func (*PutSettings) Timeout

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

Timeout 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 added in v8.7.0

type Response struct {

	// Acknowledged For a successful response, this value is always true. On failure, an
	// exception is returned instead.
	Acknowledged bool `json:"acknowledged"`
}

func NewResponse added in v8.7.0

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