putsettings

package
v8.0.0-...-8970b63 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

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(b bool) *PutSettings

AllowNoIndices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) 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(v string) *PutSettings

ExpandWildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. API name: expand_wildcards

func (*PutSettings) FlatSettings

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

FlatSettings Return settings in flat format (default: false) 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(b bool) *PutSettings

IgnoreUnavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) API name: ignore_unavailable

func (*PutSettings) Index

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

Index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices API Name: index

func (*PutSettings) MasterTimeout

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

MasterTimeout Specify timeout for connection to master API name: master_timeout

func (PutSettings) Perform

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(b bool) *PutSettings

PreserveExisting Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false` 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(v string) *PutSettings

Timeout Explicit operation timeout API name: timeout

type Response

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

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