Documentation
¶
Overview ¶
Updates the index settings.
Index ¶
- Variables
- type NewPutSettings
- type PutSettings
- func (r *PutSettings) AllowNoIndices(allownoindices bool) *PutSettings
- func (r PutSettings) Do(ctx context.Context) (*Response, error)
- func (r *PutSettings) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *PutSettings
- func (r *PutSettings) FlatSettings(flatsettings bool) *PutSettings
- func (r *PutSettings) Header(key, value string) *PutSettings
- func (r *PutSettings) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *PutSettings) IgnoreUnavailable(ignoreunavailable bool) *PutSettings
- func (r *PutSettings) Index(index string) *PutSettings
- func (r *PutSettings) MasterTimeout(duration string) *PutSettings
- func (r PutSettings) Perform(ctx context.Context) (*http.Response, error)
- func (r *PutSettings) PreserveExisting(preserveexisting bool) *PutSettings
- func (r *PutSettings) Raw(raw io.Reader) *PutSettings
- func (r *PutSettings) Request(req *types.IndexSettings) *PutSettings
- func (r *PutSettings) Timeout(duration string) *PutSettings
- type Response
Constants ¶
This section is empty.
Variables ¶
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 New ¶
func New(tp elastictransport.Interface) *PutSettings
Updates the index settings.
https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html
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 ¶
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
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