flush

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: 13 Imported by: 0

Documentation

Overview

Performs the flush operation on one or more indices.

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 Flush

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

func New

Performs the flush operation on one or more indices.

https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html

func (*Flush) AllowNoIndices

func (r *Flush) AllowNoIndices(b bool) *Flush

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 (Flush) Do

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

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

func (*Flush) ExpandWildcards

func (r *Flush) ExpandWildcards(v string) *Flush

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

func (*Flush) Force

func (r *Flush) Force(b bool) *Flush

Force Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal) API name: force

func (*Flush) Header

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

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

func (*Flush) HttpRequest

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

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

func (*Flush) IgnoreUnavailable

func (r *Flush) IgnoreUnavailable(b bool) *Flush

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

func (*Flush) Index

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

Index A comma-separated list of index names; use `_all` or empty string for all indices API Name: index

func (Flush) IsSuccess

func (r Flush) IsSuccess(ctx context.Context) (bool, error)

IsSuccess allows to run a query with a context and retrieve the result as a boolean. This only exists for endpoints without a request payload and allows for quick control flow.

func (Flush) Perform

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

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

func (*Flush) WaitIfOngoing

func (r *Flush) WaitIfOngoing(b bool) *Flush

WaitIfOngoing If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running. API name: wait_if_ongoing

type NewFlush

type NewFlush func() *Flush

NewFlush type alias for index.

func NewFlushFunc

func NewFlushFunc(tp elastictransport.Interface) NewFlush

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

type Response

type Response struct {
	Shards_ types.ShardStatistics `json:"_shards"`
}

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