esapi

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2019 License: Apache-2.0 Imports: 10 Imported by: 71

Documentation

Overview

Package esapi provides the Go API for Elasticsearch.

It is automatically included in the client provided by the github.com/elastic/go-elasticsearch package:

es, _ := elasticsearch.NewDefaultClient()
res, _ := es.Info()
log.Println(res)

For each Elasticsearch API, such as "Index", the package exports two corresponding types: a function and a struct.

The function type allows you to call the Elasticsearch API as a method on the client, passing the parameters as arguments:

res, err := es.Index(
	"test",                                  // Index name
	strings.NewReader(`{"title" : "Test"}`), // Document body
	es.Index.WithDocumentID("1"),            // Document ID
	es.Index.WithRefresh("true"),            // Refresh
)
if err != nil {
	log.Fatalf("ERROR: %s", err)
}
defer res.Body.Close()

log.Println(res)

// => [201 Created] {"_index":"test","_type":"_doc","_id":"1" ...

The struct type allows for a more hands-on approach, where you create a new struct, with the request configuration as fields, and call the Do() method with a context and the client as arguments:

req := esapi.IndexRequest{
	Index:      "test",                                  // Index name
	Body:       strings.NewReader(`{"title" : "Test"}`), // Document body
	DocumentID: "1",                                     // Document ID
	Refresh:    "true",                                  // Refresh
}

res, err := req.Do(context.Background(), es)
if err != nil {
	log.Fatalf("Error getting response: %s", err)
}
defer res.Body.Close()

log.Println(res)

// => [200 OK] {"_index":"test","_type":"_doc","_id":"1","_version":2 ...

The function type is a wrapper around the struct, and allows to configure and perform the request in a more expressive way. It has a minor overhead compared to using a struct directly; refer to the esapi_benchmark_test.go suite for concrete numbers.

See the documentation for each API function or struct at https://godoc.org/github.com/elastic/go-elasticsearch, or locally by:

go doc github.com/elastic/go-elasticsearch/esapi Index
go doc github.com/elastic/go-elasticsearch/esapi IndexRequest

Response

The esapi.Response type is a lightweight wrapper around http.Response.

The res.Body field is an io.ReadCloser, leaving the JSON parsing to the calling code, in the interest of performance and flexibility (eg. to allow using a custom JSON parser).

It is imperative to close the response body for a non-nil response.

The Response type implements a couple of convenience methods for accessing the status, checking an error status code or printing the response body for debugging purposes.

Additional Information

See the Elasticsearch documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/api-conventions.html for detailed information about the API endpoints and parameters.

The Go API is generated from the Elasticsearch JSON specification at https://github.com/elastic/elasticsearch/tree/master/rest-api-spec/src/main/resources/rest-api-spec/api by the internal package available at https://github.com/elastic/go-elasticsearch/tree/master/internal/cmd/generate/commands.

The API is tested by integration tests common to all Elasticsearch official clients, generated from the source at https://github.com/elastic/elasticsearch/tree/master/rest-api-spec/src/main/resources/rest-api-spec/test. The generator is provided by the internal package internal/cmd/generate.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolPtr

func BoolPtr(v bool) *bool

BoolPtr returns a pointer to v.

It is used as a convenience function for converting a bool value into a pointer when passing the value to a function or struct field which expects a pointer.

func IntPtr

func IntPtr(v int) *int

IntPtr returns a pointer to v.

It is used as a convenience function for converting an int value into a pointer when passing the value to a function or struct field which expects a pointer.

Types

type API

type API struct {
	Cat      *Cat
	Cluster  *Cluster
	Indices  *Indices
	Ingest   *Ingest
	Nodes    *Nodes
	Remote   *Remote
	Snapshot *Snapshot
	Tasks    *Tasks

	Bulk                    Bulk
	ClearScroll             ClearScroll
	Count                   Count
	Create                  Create
	Delete                  Delete
	DeleteByQuery           DeleteByQuery
	DeleteByQueryRethrottle DeleteByQueryRethrottle
	DeleteScript            DeleteScript
	Exists                  Exists
	ExistsSource            ExistsSource
	Explain                 Explain
	FieldCaps               FieldCaps
	Get                     Get
	GetScript               GetScript
	GetSource               GetSource
	Index                   Index
	Info                    Info
	Mget                    Mget
	Msearch                 Msearch
	MsearchTemplate         MsearchTemplate
	Mtermvectors            Mtermvectors
	Ping                    Ping
	PutScript               PutScript
	RankEval                RankEval
	Reindex                 Reindex
	ReindexRethrottle       ReindexRethrottle
	RenderSearchTemplate    RenderSearchTemplate
	ScriptsPainlessExecute  ScriptsPainlessExecute
	Scroll                  Scroll
	Search                  Search
	SearchShards            SearchShards
	SearchTemplate          SearchTemplate
	Termvectors             Termvectors
	Update                  Update
	UpdateByQuery           UpdateByQuery
	UpdateByQueryRethrottle UpdateByQueryRethrottle
}

API contains the Elasticsearch APIs

func New

func New(t Transport) *API

New creates new API

type Bulk

type Bulk func(body io.Reader, o ...func(*BulkRequest)) (*Response, error)

Bulk allows to perform multiple index/update/delete operations in a single request.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html.

func (Bulk) WithContext

func (f Bulk) WithContext(v context.Context) func(*BulkRequest)

WithContext sets the request context.

func (Bulk) WithDocumentType

func (f Bulk) WithDocumentType(v string) func(*BulkRequest)

WithDocumentType - default document type for items which don't provide one.

func (Bulk) WithErrorTrace

func (f Bulk) WithErrorTrace() func(*BulkRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (Bulk) WithFilterPath

func (f Bulk) WithFilterPath(v ...string) func(*BulkRequest)

WithFilterPath filters the properties of the response body.

func (Bulk) WithHuman

func (f Bulk) WithHuman() func(*BulkRequest)

WithHuman makes statistical values human-readable.

func (Bulk) WithIndex

func (f Bulk) WithIndex(v string) func(*BulkRequest)

WithIndex - default index for items which don't provide one.

func (Bulk) WithPipeline

func (f Bulk) WithPipeline(v string) func(*BulkRequest)

WithPipeline - the pipeline ID to preprocess incoming documents with.

func (Bulk) WithPretty

func (f Bulk) WithPretty() func(*BulkRequest)

WithPretty makes the response body pretty-printed.

func (Bulk) WithRefresh

func (f Bulk) WithRefresh(v string) func(*BulkRequest)

WithRefresh - if `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes..

func (Bulk) WithRouting

func (f Bulk) WithRouting(v string) func(*BulkRequest)

WithRouting - specific routing value.

func (Bulk) WithSource

func (f Bulk) WithSource(v ...string) func(*BulkRequest)

WithSource - true or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request.

func (Bulk) WithSourceExcludes

func (f Bulk) WithSourceExcludes(v ...string) func(*BulkRequest)

WithSourceExcludes - default list of fields to exclude from the returned _source field, can be overridden on each sub-request.

func (Bulk) WithSourceIncludes

func (f Bulk) WithSourceIncludes(v ...string) func(*BulkRequest)

WithSourceIncludes - default list of fields to extract and return from the _source field, can be overridden on each sub-request.

func (Bulk) WithTimeout

func (f Bulk) WithTimeout(v time.Duration) func(*BulkRequest)

WithTimeout - explicit operation timeout.

func (Bulk) WithWaitForActiveShards

func (f Bulk) WithWaitForActiveShards(v string) func(*BulkRequest)

WithWaitForActiveShards - sets the number of shard copies that must be active before proceeding with the bulk operation. defaults to 1, meaning the primary shard only. set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1).

type BulkRequest

type BulkRequest struct {
	Index        string
	DocumentType string
	Body         io.Reader

	Pipeline            string
	Refresh             string
	Routing             string
	Source              []string
	SourceExcludes      []string
	SourceIncludes      []string
	Timeout             time.Duration
	WaitForActiveShards string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

BulkRequest configures the Bulk API request.

func (BulkRequest) Do

func (r BulkRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Cat

type Cat struct {
	Aliases      CatAliases
	Allocation   CatAllocation
	Count        CatCount
	Fielddata    CatFielddata
	Health       CatHealth
	Help         CatHelp
	Indices      CatIndices
	Master       CatMaster
	Nodeattrs    CatNodeattrs
	Nodes        CatNodes
	PendingTasks CatPendingTasks
	Plugins      CatPlugins
	Recovery     CatRecovery
	Repositories CatRepositories
	Segments     CatSegments
	Shards       CatShards
	Snapshots    CatSnapshots
	Tasks        CatTasks
	Templates    CatTemplates
	ThreadPool   CatThreadPool
}

Cat contains the Cat APIs

type CatAliases

type CatAliases func(o ...func(*CatAliasesRequest)) (*Response, error)

CatAliases shows information about currently configured aliases to indices including filter and routing infos.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html.

func (CatAliases) WithContext

func (f CatAliases) WithContext(v context.Context) func(*CatAliasesRequest)

WithContext sets the request context.

func (CatAliases) WithErrorTrace

func (f CatAliases) WithErrorTrace() func(*CatAliasesRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatAliases) WithFilterPath

func (f CatAliases) WithFilterPath(v ...string) func(*CatAliasesRequest)

WithFilterPath filters the properties of the response body.

func (CatAliases) WithFormat

func (f CatAliases) WithFormat(v string) func(*CatAliasesRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatAliases) WithH

func (f CatAliases) WithH(v ...string) func(*CatAliasesRequest)

WithH - comma-separated list of column names to display.

func (CatAliases) WithHelp

func (f CatAliases) WithHelp(v bool) func(*CatAliasesRequest)

WithHelp - return help information.

func (CatAliases) WithHuman

func (f CatAliases) WithHuman() func(*CatAliasesRequest)

WithHuman makes statistical values human-readable.

func (CatAliases) WithLocal

func (f CatAliases) WithLocal(v bool) func(*CatAliasesRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatAliases) WithMasterTimeout

func (f CatAliases) WithMasterTimeout(v time.Duration) func(*CatAliasesRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatAliases) WithName

func (f CatAliases) WithName(v ...string) func(*CatAliasesRequest)

WithName - a list of alias names to return.

func (CatAliases) WithPretty

func (f CatAliases) WithPretty() func(*CatAliasesRequest)

WithPretty makes the response body pretty-printed.

func (CatAliases) WithS

func (f CatAliases) WithS(v ...string) func(*CatAliasesRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatAliases) WithV

func (f CatAliases) WithV(v bool) func(*CatAliasesRequest)

WithV - verbose mode. display column headers.

type CatAliasesRequest

type CatAliasesRequest struct {
	Name          []string
	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatAliasesRequest configures the Cat Aliases API request.

func (CatAliasesRequest) Do

func (r CatAliasesRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatAllocation

type CatAllocation func(o ...func(*CatAllocationRequest)) (*Response, error)

CatAllocation provides a snapshot of how many shards are allocated to each data node and how much disk space they are using.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html.

func (CatAllocation) WithBytes

func (f CatAllocation) WithBytes(v string) func(*CatAllocationRequest)

WithBytes - the unit in which to display byte values.

func (CatAllocation) WithContext

func (f CatAllocation) WithContext(v context.Context) func(*CatAllocationRequest)

WithContext sets the request context.

func (CatAllocation) WithErrorTrace

func (f CatAllocation) WithErrorTrace() func(*CatAllocationRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatAllocation) WithFilterPath

func (f CatAllocation) WithFilterPath(v ...string) func(*CatAllocationRequest)

WithFilterPath filters the properties of the response body.

func (CatAllocation) WithFormat

func (f CatAllocation) WithFormat(v string) func(*CatAllocationRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatAllocation) WithH

func (f CatAllocation) WithH(v ...string) func(*CatAllocationRequest)

WithH - comma-separated list of column names to display.

func (CatAllocation) WithHelp

func (f CatAllocation) WithHelp(v bool) func(*CatAllocationRequest)

WithHelp - return help information.

func (CatAllocation) WithHuman

func (f CatAllocation) WithHuman() func(*CatAllocationRequest)

WithHuman makes statistical values human-readable.

func (CatAllocation) WithLocal

func (f CatAllocation) WithLocal(v bool) func(*CatAllocationRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatAllocation) WithMasterTimeout

func (f CatAllocation) WithMasterTimeout(v time.Duration) func(*CatAllocationRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatAllocation) WithNodeID

func (f CatAllocation) WithNodeID(v ...string) func(*CatAllocationRequest)

WithNodeID - a list of node ids or names to limit the returned information.

func (CatAllocation) WithPretty

func (f CatAllocation) WithPretty() func(*CatAllocationRequest)

WithPretty makes the response body pretty-printed.

func (CatAllocation) WithS

func (f CatAllocation) WithS(v ...string) func(*CatAllocationRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatAllocation) WithV

func (f CatAllocation) WithV(v bool) func(*CatAllocationRequest)

WithV - verbose mode. display column headers.

type CatAllocationRequest

type CatAllocationRequest struct {
	NodeID        []string
	Bytes         string
	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatAllocationRequest configures the Cat Allocation API request.

func (CatAllocationRequest) Do

func (r CatAllocationRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatCount

type CatCount func(o ...func(*CatCountRequest)) (*Response, error)

CatCount provides quick access to the document count of the entire cluster, or individual indices.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html.

func (CatCount) WithContext

func (f CatCount) WithContext(v context.Context) func(*CatCountRequest)

WithContext sets the request context.

func (CatCount) WithErrorTrace

func (f CatCount) WithErrorTrace() func(*CatCountRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatCount) WithFilterPath

func (f CatCount) WithFilterPath(v ...string) func(*CatCountRequest)

WithFilterPath filters the properties of the response body.

func (CatCount) WithFormat

func (f CatCount) WithFormat(v string) func(*CatCountRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatCount) WithH

func (f CatCount) WithH(v ...string) func(*CatCountRequest)

WithH - comma-separated list of column names to display.

func (CatCount) WithHelp

func (f CatCount) WithHelp(v bool) func(*CatCountRequest)

WithHelp - return help information.

func (CatCount) WithHuman

func (f CatCount) WithHuman() func(*CatCountRequest)

WithHuman makes statistical values human-readable.

func (CatCount) WithIndex

func (f CatCount) WithIndex(v ...string) func(*CatCountRequest)

WithIndex - a list of index names to limit the returned information.

func (CatCount) WithLocal

func (f CatCount) WithLocal(v bool) func(*CatCountRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatCount) WithMasterTimeout

func (f CatCount) WithMasterTimeout(v time.Duration) func(*CatCountRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatCount) WithPretty

func (f CatCount) WithPretty() func(*CatCountRequest)

WithPretty makes the response body pretty-printed.

func (CatCount) WithS

func (f CatCount) WithS(v ...string) func(*CatCountRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatCount) WithV

func (f CatCount) WithV(v bool) func(*CatCountRequest)

WithV - verbose mode. display column headers.

type CatCountRequest

type CatCountRequest struct {
	Index []string

	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatCountRequest configures the Cat Count API request.

func (CatCountRequest) Do

func (r CatCountRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatFielddata

type CatFielddata func(o ...func(*CatFielddataRequest)) (*Response, error)

CatFielddata shows how much heap memory is currently being used by fielddata on every data node in the cluster.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html.

func (CatFielddata) WithBytes

func (f CatFielddata) WithBytes(v string) func(*CatFielddataRequest)

WithBytes - the unit in which to display byte values.

func (CatFielddata) WithContext

func (f CatFielddata) WithContext(v context.Context) func(*CatFielddataRequest)

WithContext sets the request context.

func (CatFielddata) WithErrorTrace

func (f CatFielddata) WithErrorTrace() func(*CatFielddataRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatFielddata) WithFields

func (f CatFielddata) WithFields(v ...string) func(*CatFielddataRequest)

WithFields - a list of fields to return the fielddata size.

func (CatFielddata) WithFilterPath

func (f CatFielddata) WithFilterPath(v ...string) func(*CatFielddataRequest)

WithFilterPath filters the properties of the response body.

func (CatFielddata) WithFormat

func (f CatFielddata) WithFormat(v string) func(*CatFielddataRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatFielddata) WithH

func (f CatFielddata) WithH(v ...string) func(*CatFielddataRequest)

WithH - comma-separated list of column names to display.

func (CatFielddata) WithHelp

func (f CatFielddata) WithHelp(v bool) func(*CatFielddataRequest)

WithHelp - return help information.

func (CatFielddata) WithHuman

func (f CatFielddata) WithHuman() func(*CatFielddataRequest)

WithHuman makes statistical values human-readable.

func (CatFielddata) WithLocal

func (f CatFielddata) WithLocal(v bool) func(*CatFielddataRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatFielddata) WithMasterTimeout

func (f CatFielddata) WithMasterTimeout(v time.Duration) func(*CatFielddataRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatFielddata) WithPretty

func (f CatFielddata) WithPretty() func(*CatFielddataRequest)

WithPretty makes the response body pretty-printed.

func (CatFielddata) WithS

func (f CatFielddata) WithS(v ...string) func(*CatFielddataRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatFielddata) WithV

func (f CatFielddata) WithV(v bool) func(*CatFielddataRequest)

WithV - verbose mode. display column headers.

type CatFielddataRequest

type CatFielddataRequest struct {
	Fields        []string
	Bytes         string
	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatFielddataRequest configures the Cat Fielddata API request.

func (CatFielddataRequest) Do

func (r CatFielddataRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatHealth

type CatHealth func(o ...func(*CatHealthRequest)) (*Response, error)

CatHealth returns a concise representation of the cluster health.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html.

func (CatHealth) WithContext

func (f CatHealth) WithContext(v context.Context) func(*CatHealthRequest)

WithContext sets the request context.

func (CatHealth) WithErrorTrace

func (f CatHealth) WithErrorTrace() func(*CatHealthRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatHealth) WithFilterPath

func (f CatHealth) WithFilterPath(v ...string) func(*CatHealthRequest)

WithFilterPath filters the properties of the response body.

func (CatHealth) WithFormat

func (f CatHealth) WithFormat(v string) func(*CatHealthRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatHealth) WithH

func (f CatHealth) WithH(v ...string) func(*CatHealthRequest)

WithH - comma-separated list of column names to display.

func (CatHealth) WithHelp

func (f CatHealth) WithHelp(v bool) func(*CatHealthRequest)

WithHelp - return help information.

func (CatHealth) WithHuman

func (f CatHealth) WithHuman() func(*CatHealthRequest)

WithHuman makes statistical values human-readable.

func (CatHealth) WithLocal

func (f CatHealth) WithLocal(v bool) func(*CatHealthRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatHealth) WithMasterTimeout

func (f CatHealth) WithMasterTimeout(v time.Duration) func(*CatHealthRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatHealth) WithPretty

func (f CatHealth) WithPretty() func(*CatHealthRequest)

WithPretty makes the response body pretty-printed.

func (CatHealth) WithS

func (f CatHealth) WithS(v ...string) func(*CatHealthRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatHealth) WithTs

func (f CatHealth) WithTs(v bool) func(*CatHealthRequest)

WithTs - set to false to disable timestamping.

func (CatHealth) WithV

func (f CatHealth) WithV(v bool) func(*CatHealthRequest)

WithV - verbose mode. display column headers.

type CatHealthRequest

type CatHealthRequest struct {
	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	Ts            *bool
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatHealthRequest configures the Cat Health API request.

func (CatHealthRequest) Do

func (r CatHealthRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatHelp

type CatHelp func(o ...func(*CatHelpRequest)) (*Response, error)

CatHelp returns help for the Cat APIs.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html.

func (CatHelp) WithContext

func (f CatHelp) WithContext(v context.Context) func(*CatHelpRequest)

WithContext sets the request context.

func (CatHelp) WithErrorTrace

func (f CatHelp) WithErrorTrace() func(*CatHelpRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatHelp) WithFilterPath

func (f CatHelp) WithFilterPath(v ...string) func(*CatHelpRequest)

WithFilterPath filters the properties of the response body.

func (CatHelp) WithHelp

func (f CatHelp) WithHelp(v bool) func(*CatHelpRequest)

WithHelp - return help information.

func (CatHelp) WithHuman

func (f CatHelp) WithHuman() func(*CatHelpRequest)

WithHuman makes statistical values human-readable.

func (CatHelp) WithPretty

func (f CatHelp) WithPretty() func(*CatHelpRequest)

WithPretty makes the response body pretty-printed.

func (CatHelp) WithS

func (f CatHelp) WithS(v ...string) func(*CatHelpRequest)

WithS - comma-separated list of column names or column aliases to sort by.

type CatHelpRequest

type CatHelpRequest struct {
	Help *bool
	S    []string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatHelpRequest configures the Cat Help API request.

func (CatHelpRequest) Do

func (r CatHelpRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatIndices

type CatIndices func(o ...func(*CatIndicesRequest)) (*Response, error)

CatIndices returns information about indices: number of primaries and replicas, document counts, disk size, ...

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html.

func (CatIndices) WithBytes

func (f CatIndices) WithBytes(v string) func(*CatIndicesRequest)

WithBytes - the unit in which to display byte values.

func (CatIndices) WithContext

func (f CatIndices) WithContext(v context.Context) func(*CatIndicesRequest)

WithContext sets the request context.

func (CatIndices) WithErrorTrace

func (f CatIndices) WithErrorTrace() func(*CatIndicesRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatIndices) WithFilterPath

func (f CatIndices) WithFilterPath(v ...string) func(*CatIndicesRequest)

WithFilterPath filters the properties of the response body.

func (CatIndices) WithFormat

func (f CatIndices) WithFormat(v string) func(*CatIndicesRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatIndices) WithH

func (f CatIndices) WithH(v ...string) func(*CatIndicesRequest)

WithH - comma-separated list of column names to display.

func (CatIndices) WithHealth

func (f CatIndices) WithHealth(v string) func(*CatIndicesRequest)

WithHealth - a health status ("green", "yellow", or "red" to filter only indices matching the specified health status.

func (CatIndices) WithHelp

func (f CatIndices) WithHelp(v bool) func(*CatIndicesRequest)

WithHelp - return help information.

func (CatIndices) WithHuman

func (f CatIndices) WithHuman() func(*CatIndicesRequest)

WithHuman makes statistical values human-readable.

func (CatIndices) WithIndex

func (f CatIndices) WithIndex(v ...string) func(*CatIndicesRequest)

WithIndex - a list of index names to limit the returned information.

func (CatIndices) WithLocal

func (f CatIndices) WithLocal(v bool) func(*CatIndicesRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatIndices) WithMasterTimeout

func (f CatIndices) WithMasterTimeout(v time.Duration) func(*CatIndicesRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatIndices) WithPretty

func (f CatIndices) WithPretty() func(*CatIndicesRequest)

WithPretty makes the response body pretty-printed.

func (CatIndices) WithPri

func (f CatIndices) WithPri(v bool) func(*CatIndicesRequest)

WithPri - set to true to return stats only for primary shards.

func (CatIndices) WithS

func (f CatIndices) WithS(v ...string) func(*CatIndicesRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatIndices) WithV

func (f CatIndices) WithV(v bool) func(*CatIndicesRequest)

WithV - verbose mode. display column headers.

type CatIndicesRequest

type CatIndicesRequest struct {
	Index []string

	Bytes         string
	Format        string
	H             []string
	Health        string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	Pri           *bool
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatIndicesRequest configures the Cat Indices API request.

func (CatIndicesRequest) Do

func (r CatIndicesRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatMaster

type CatMaster func(o ...func(*CatMasterRequest)) (*Response, error)

CatMaster returns information about the master node.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html.

func (CatMaster) WithContext

func (f CatMaster) WithContext(v context.Context) func(*CatMasterRequest)

WithContext sets the request context.

func (CatMaster) WithErrorTrace

func (f CatMaster) WithErrorTrace() func(*CatMasterRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatMaster) WithFilterPath

func (f CatMaster) WithFilterPath(v ...string) func(*CatMasterRequest)

WithFilterPath filters the properties of the response body.

func (CatMaster) WithFormat

func (f CatMaster) WithFormat(v string) func(*CatMasterRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatMaster) WithH

func (f CatMaster) WithH(v ...string) func(*CatMasterRequest)

WithH - comma-separated list of column names to display.

func (CatMaster) WithHelp

func (f CatMaster) WithHelp(v bool) func(*CatMasterRequest)

WithHelp - return help information.

func (CatMaster) WithHuman

func (f CatMaster) WithHuman() func(*CatMasterRequest)

WithHuman makes statistical values human-readable.

func (CatMaster) WithLocal

func (f CatMaster) WithLocal(v bool) func(*CatMasterRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatMaster) WithMasterTimeout

func (f CatMaster) WithMasterTimeout(v time.Duration) func(*CatMasterRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatMaster) WithPretty

func (f CatMaster) WithPretty() func(*CatMasterRequest)

WithPretty makes the response body pretty-printed.

func (CatMaster) WithS

func (f CatMaster) WithS(v ...string) func(*CatMasterRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatMaster) WithV

func (f CatMaster) WithV(v bool) func(*CatMasterRequest)

WithV - verbose mode. display column headers.

type CatMasterRequest

type CatMasterRequest struct {
	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatMasterRequest configures the Cat Master API request.

func (CatMasterRequest) Do

func (r CatMasterRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatNodeattrs

type CatNodeattrs func(o ...func(*CatNodeattrsRequest)) (*Response, error)

CatNodeattrs returns information about custom node attributes.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html.

func (CatNodeattrs) WithContext

func (f CatNodeattrs) WithContext(v context.Context) func(*CatNodeattrsRequest)

WithContext sets the request context.

func (CatNodeattrs) WithErrorTrace

func (f CatNodeattrs) WithErrorTrace() func(*CatNodeattrsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatNodeattrs) WithFilterPath

func (f CatNodeattrs) WithFilterPath(v ...string) func(*CatNodeattrsRequest)

WithFilterPath filters the properties of the response body.

func (CatNodeattrs) WithFormat

func (f CatNodeattrs) WithFormat(v string) func(*CatNodeattrsRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatNodeattrs) WithH

func (f CatNodeattrs) WithH(v ...string) func(*CatNodeattrsRequest)

WithH - comma-separated list of column names to display.

func (CatNodeattrs) WithHelp

func (f CatNodeattrs) WithHelp(v bool) func(*CatNodeattrsRequest)

WithHelp - return help information.

func (CatNodeattrs) WithHuman

func (f CatNodeattrs) WithHuman() func(*CatNodeattrsRequest)

WithHuman makes statistical values human-readable.

func (CatNodeattrs) WithLocal

func (f CatNodeattrs) WithLocal(v bool) func(*CatNodeattrsRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatNodeattrs) WithMasterTimeout

func (f CatNodeattrs) WithMasterTimeout(v time.Duration) func(*CatNodeattrsRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatNodeattrs) WithPretty

func (f CatNodeattrs) WithPretty() func(*CatNodeattrsRequest)

WithPretty makes the response body pretty-printed.

func (CatNodeattrs) WithS

func (f CatNodeattrs) WithS(v ...string) func(*CatNodeattrsRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatNodeattrs) WithV

func (f CatNodeattrs) WithV(v bool) func(*CatNodeattrsRequest)

WithV - verbose mode. display column headers.

type CatNodeattrsRequest

type CatNodeattrsRequest struct {
	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatNodeattrsRequest configures the Cat Nodeattrs API request.

func (CatNodeattrsRequest) Do

func (r CatNodeattrsRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatNodes

type CatNodes func(o ...func(*CatNodesRequest)) (*Response, error)

CatNodes returns basic statistics about performance of cluster nodes.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html.

func (CatNodes) WithContext

func (f CatNodes) WithContext(v context.Context) func(*CatNodesRequest)

WithContext sets the request context.

func (CatNodes) WithErrorTrace

func (f CatNodes) WithErrorTrace() func(*CatNodesRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatNodes) WithFilterPath

func (f CatNodes) WithFilterPath(v ...string) func(*CatNodesRequest)

WithFilterPath filters the properties of the response body.

func (CatNodes) WithFormat

func (f CatNodes) WithFormat(v string) func(*CatNodesRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatNodes) WithFullID

func (f CatNodes) WithFullID(v bool) func(*CatNodesRequest)

WithFullID - return the full node ID instead of the shortened version (default: false).

func (CatNodes) WithH

func (f CatNodes) WithH(v ...string) func(*CatNodesRequest)

WithH - comma-separated list of column names to display.

func (CatNodes) WithHelp

func (f CatNodes) WithHelp(v bool) func(*CatNodesRequest)

WithHelp - return help information.

func (CatNodes) WithHuman

func (f CatNodes) WithHuman() func(*CatNodesRequest)

WithHuman makes statistical values human-readable.

func (CatNodes) WithLocal

func (f CatNodes) WithLocal(v bool) func(*CatNodesRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatNodes) WithMasterTimeout

func (f CatNodes) WithMasterTimeout(v time.Duration) func(*CatNodesRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatNodes) WithPretty

func (f CatNodes) WithPretty() func(*CatNodesRequest)

WithPretty makes the response body pretty-printed.

func (CatNodes) WithS

func (f CatNodes) WithS(v ...string) func(*CatNodesRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatNodes) WithV

func (f CatNodes) WithV(v bool) func(*CatNodesRequest)

WithV - verbose mode. display column headers.

type CatNodesRequest

type CatNodesRequest struct {
	Format        string
	FullID        *bool
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatNodesRequest configures the Cat Nodes API request.

func (CatNodesRequest) Do

func (r CatNodesRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatPendingTasks

type CatPendingTasks func(o ...func(*CatPendingTasksRequest)) (*Response, error)

CatPendingTasks returns a concise representation of the cluster pending tasks.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html.

func (CatPendingTasks) WithContext

func (f CatPendingTasks) WithContext(v context.Context) func(*CatPendingTasksRequest)

WithContext sets the request context.

func (CatPendingTasks) WithErrorTrace

func (f CatPendingTasks) WithErrorTrace() func(*CatPendingTasksRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatPendingTasks) WithFilterPath

func (f CatPendingTasks) WithFilterPath(v ...string) func(*CatPendingTasksRequest)

WithFilterPath filters the properties of the response body.

func (CatPendingTasks) WithFormat

func (f CatPendingTasks) WithFormat(v string) func(*CatPendingTasksRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatPendingTasks) WithH

func (f CatPendingTasks) WithH(v ...string) func(*CatPendingTasksRequest)

WithH - comma-separated list of column names to display.

func (CatPendingTasks) WithHelp

func (f CatPendingTasks) WithHelp(v bool) func(*CatPendingTasksRequest)

WithHelp - return help information.

func (CatPendingTasks) WithHuman

func (f CatPendingTasks) WithHuman() func(*CatPendingTasksRequest)

WithHuman makes statistical values human-readable.

func (CatPendingTasks) WithLocal

func (f CatPendingTasks) WithLocal(v bool) func(*CatPendingTasksRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatPendingTasks) WithMasterTimeout

func (f CatPendingTasks) WithMasterTimeout(v time.Duration) func(*CatPendingTasksRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatPendingTasks) WithPretty

func (f CatPendingTasks) WithPretty() func(*CatPendingTasksRequest)

WithPretty makes the response body pretty-printed.

func (CatPendingTasks) WithS

func (f CatPendingTasks) WithS(v ...string) func(*CatPendingTasksRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatPendingTasks) WithV

func (f CatPendingTasks) WithV(v bool) func(*CatPendingTasksRequest)

WithV - verbose mode. display column headers.

type CatPendingTasksRequest

type CatPendingTasksRequest struct {
	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatPendingTasksRequest configures the Cat Pending Tasks API request.

func (CatPendingTasksRequest) Do

func (r CatPendingTasksRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatPlugins

type CatPlugins func(o ...func(*CatPluginsRequest)) (*Response, error)

CatPlugins returns information about installed plugins across nodes node.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html.

func (CatPlugins) WithContext

func (f CatPlugins) WithContext(v context.Context) func(*CatPluginsRequest)

WithContext sets the request context.

func (CatPlugins) WithErrorTrace

func (f CatPlugins) WithErrorTrace() func(*CatPluginsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatPlugins) WithFilterPath

func (f CatPlugins) WithFilterPath(v ...string) func(*CatPluginsRequest)

WithFilterPath filters the properties of the response body.

func (CatPlugins) WithFormat

func (f CatPlugins) WithFormat(v string) func(*CatPluginsRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatPlugins) WithH

func (f CatPlugins) WithH(v ...string) func(*CatPluginsRequest)

WithH - comma-separated list of column names to display.

func (CatPlugins) WithHelp

func (f CatPlugins) WithHelp(v bool) func(*CatPluginsRequest)

WithHelp - return help information.

func (CatPlugins) WithHuman

func (f CatPlugins) WithHuman() func(*CatPluginsRequest)

WithHuman makes statistical values human-readable.

func (CatPlugins) WithLocal

func (f CatPlugins) WithLocal(v bool) func(*CatPluginsRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatPlugins) WithMasterTimeout

func (f CatPlugins) WithMasterTimeout(v time.Duration) func(*CatPluginsRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatPlugins) WithPretty

func (f CatPlugins) WithPretty() func(*CatPluginsRequest)

WithPretty makes the response body pretty-printed.

func (CatPlugins) WithS

func (f CatPlugins) WithS(v ...string) func(*CatPluginsRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatPlugins) WithV

func (f CatPlugins) WithV(v bool) func(*CatPluginsRequest)

WithV - verbose mode. display column headers.

type CatPluginsRequest

type CatPluginsRequest struct {
	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatPluginsRequest configures the Cat Plugins API request.

func (CatPluginsRequest) Do

func (r CatPluginsRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatRecovery

type CatRecovery func(o ...func(*CatRecoveryRequest)) (*Response, error)

CatRecovery returns information about index shard recoveries, both on-going completed.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html.

func (CatRecovery) WithBytes

func (f CatRecovery) WithBytes(v string) func(*CatRecoveryRequest)

WithBytes - the unit in which to display byte values.

func (CatRecovery) WithContext

func (f CatRecovery) WithContext(v context.Context) func(*CatRecoveryRequest)

WithContext sets the request context.

func (CatRecovery) WithErrorTrace

func (f CatRecovery) WithErrorTrace() func(*CatRecoveryRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatRecovery) WithFilterPath

func (f CatRecovery) WithFilterPath(v ...string) func(*CatRecoveryRequest)

WithFilterPath filters the properties of the response body.

func (CatRecovery) WithFormat

func (f CatRecovery) WithFormat(v string) func(*CatRecoveryRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatRecovery) WithH

func (f CatRecovery) WithH(v ...string) func(*CatRecoveryRequest)

WithH - comma-separated list of column names to display.

func (CatRecovery) WithHelp

func (f CatRecovery) WithHelp(v bool) func(*CatRecoveryRequest)

WithHelp - return help information.

func (CatRecovery) WithHuman

func (f CatRecovery) WithHuman() func(*CatRecoveryRequest)

WithHuman makes statistical values human-readable.

func (CatRecovery) WithIndex

func (f CatRecovery) WithIndex(v ...string) func(*CatRecoveryRequest)

WithIndex - a list of index names to limit the returned information.

func (CatRecovery) WithMasterTimeout

func (f CatRecovery) WithMasterTimeout(v time.Duration) func(*CatRecoveryRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatRecovery) WithPretty

func (f CatRecovery) WithPretty() func(*CatRecoveryRequest)

WithPretty makes the response body pretty-printed.

func (CatRecovery) WithS

func (f CatRecovery) WithS(v ...string) func(*CatRecoveryRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatRecovery) WithV

func (f CatRecovery) WithV(v bool) func(*CatRecoveryRequest)

WithV - verbose mode. display column headers.

type CatRecoveryRequest

type CatRecoveryRequest struct {
	Index []string

	Bytes         string
	Format        string
	H             []string
	Help          *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatRecoveryRequest configures the Cat Recovery API request.

func (CatRecoveryRequest) Do

func (r CatRecoveryRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatRepositories

type CatRepositories func(o ...func(*CatRepositoriesRequest)) (*Response, error)

CatRepositories returns information about snapshot repositories registered in the cluster.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html.

func (CatRepositories) WithContext

func (f CatRepositories) WithContext(v context.Context) func(*CatRepositoriesRequest)

WithContext sets the request context.

func (CatRepositories) WithErrorTrace

func (f CatRepositories) WithErrorTrace() func(*CatRepositoriesRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatRepositories) WithFilterPath

func (f CatRepositories) WithFilterPath(v ...string) func(*CatRepositoriesRequest)

WithFilterPath filters the properties of the response body.

func (CatRepositories) WithFormat

func (f CatRepositories) WithFormat(v string) func(*CatRepositoriesRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatRepositories) WithH

func (f CatRepositories) WithH(v ...string) func(*CatRepositoriesRequest)

WithH - comma-separated list of column names to display.

func (CatRepositories) WithHelp

func (f CatRepositories) WithHelp(v bool) func(*CatRepositoriesRequest)

WithHelp - return help information.

func (CatRepositories) WithHuman

func (f CatRepositories) WithHuman() func(*CatRepositoriesRequest)

WithHuman makes statistical values human-readable.

func (CatRepositories) WithLocal

func (f CatRepositories) WithLocal(v bool) func(*CatRepositoriesRequest)

WithLocal - return local information, do not retrieve the state from master node.

func (CatRepositories) WithMasterTimeout

func (f CatRepositories) WithMasterTimeout(v time.Duration) func(*CatRepositoriesRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatRepositories) WithPretty

func (f CatRepositories) WithPretty() func(*CatRepositoriesRequest)

WithPretty makes the response body pretty-printed.

func (CatRepositories) WithS

func (f CatRepositories) WithS(v ...string) func(*CatRepositoriesRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatRepositories) WithV

func (f CatRepositories) WithV(v bool) func(*CatRepositoriesRequest)

WithV - verbose mode. display column headers.

type CatRepositoriesRequest

type CatRepositoriesRequest struct {
	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatRepositoriesRequest configures the Cat Repositories API request.

func (CatRepositoriesRequest) Do

func (r CatRepositoriesRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatSegments

type CatSegments func(o ...func(*CatSegmentsRequest)) (*Response, error)

CatSegments provides low-level information about the segments in the shards of an index.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html.

func (CatSegments) WithBytes

func (f CatSegments) WithBytes(v string) func(*CatSegmentsRequest)

WithBytes - the unit in which to display byte values.

func (CatSegments) WithContext

func (f CatSegments) WithContext(v context.Context) func(*CatSegmentsRequest)

WithContext sets the request context.

func (CatSegments) WithErrorTrace

func (f CatSegments) WithErrorTrace() func(*CatSegmentsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatSegments) WithFilterPath

func (f CatSegments) WithFilterPath(v ...string) func(*CatSegmentsRequest)

WithFilterPath filters the properties of the response body.

func (CatSegments) WithFormat

func (f CatSegments) WithFormat(v string) func(*CatSegmentsRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatSegments) WithH

func (f CatSegments) WithH(v ...string) func(*CatSegmentsRequest)

WithH - comma-separated list of column names to display.

func (CatSegments) WithHelp

func (f CatSegments) WithHelp(v bool) func(*CatSegmentsRequest)

WithHelp - return help information.

func (CatSegments) WithHuman

func (f CatSegments) WithHuman() func(*CatSegmentsRequest)

WithHuman makes statistical values human-readable.

func (CatSegments) WithIndex

func (f CatSegments) WithIndex(v ...string) func(*CatSegmentsRequest)

WithIndex - a list of index names to limit the returned information.

func (CatSegments) WithPretty

func (f CatSegments) WithPretty() func(*CatSegmentsRequest)

WithPretty makes the response body pretty-printed.

func (CatSegments) WithS

func (f CatSegments) WithS(v ...string) func(*CatSegmentsRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatSegments) WithV

func (f CatSegments) WithV(v bool) func(*CatSegmentsRequest)

WithV - verbose mode. display column headers.

type CatSegmentsRequest

type CatSegmentsRequest struct {
	Index []string

	Bytes  string
	Format string
	H      []string
	Help   *bool
	S      []string
	V      *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatSegmentsRequest configures the Cat Segments API request.

func (CatSegmentsRequest) Do

func (r CatSegmentsRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatShards

type CatShards func(o ...func(*CatShardsRequest)) (*Response, error)

CatShards provides a detailed view of shard allocation on nodes.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html.

func (CatShards) WithBytes

func (f CatShards) WithBytes(v string) func(*CatShardsRequest)

WithBytes - the unit in which to display byte values.

func (CatShards) WithContext

func (f CatShards) WithContext(v context.Context) func(*CatShardsRequest)

WithContext sets the request context.

func (CatShards) WithErrorTrace

func (f CatShards) WithErrorTrace() func(*CatShardsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatShards) WithFilterPath

func (f CatShards) WithFilterPath(v ...string) func(*CatShardsRequest)

WithFilterPath filters the properties of the response body.

func (CatShards) WithFormat

func (f CatShards) WithFormat(v string) func(*CatShardsRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatShards) WithH

func (f CatShards) WithH(v ...string) func(*CatShardsRequest)

WithH - comma-separated list of column names to display.

func (CatShards) WithHelp

func (f CatShards) WithHelp(v bool) func(*CatShardsRequest)

WithHelp - return help information.

func (CatShards) WithHuman

func (f CatShards) WithHuman() func(*CatShardsRequest)

WithHuman makes statistical values human-readable.

func (CatShards) WithIndex

func (f CatShards) WithIndex(v ...string) func(*CatShardsRequest)

WithIndex - a list of index names to limit the returned information.

func (CatShards) WithLocal

func (f CatShards) WithLocal(v bool) func(*CatShardsRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatShards) WithMasterTimeout

func (f CatShards) WithMasterTimeout(v time.Duration) func(*CatShardsRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatShards) WithPretty

func (f CatShards) WithPretty() func(*CatShardsRequest)

WithPretty makes the response body pretty-printed.

func (CatShards) WithS

func (f CatShards) WithS(v ...string) func(*CatShardsRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatShards) WithV

func (f CatShards) WithV(v bool) func(*CatShardsRequest)

WithV - verbose mode. display column headers.

type CatShardsRequest

type CatShardsRequest struct {
	Index []string

	Bytes         string
	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatShardsRequest configures the Cat Shards API request.

func (CatShardsRequest) Do

func (r CatShardsRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatSnapshots

type CatSnapshots func(o ...func(*CatSnapshotsRequest)) (*Response, error)

CatSnapshots returns all snapshots in a specific repository.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html.

func (CatSnapshots) WithContext

func (f CatSnapshots) WithContext(v context.Context) func(*CatSnapshotsRequest)

WithContext sets the request context.

func (CatSnapshots) WithErrorTrace

func (f CatSnapshots) WithErrorTrace() func(*CatSnapshotsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatSnapshots) WithFilterPath

func (f CatSnapshots) WithFilterPath(v ...string) func(*CatSnapshotsRequest)

WithFilterPath filters the properties of the response body.

func (CatSnapshots) WithFormat

func (f CatSnapshots) WithFormat(v string) func(*CatSnapshotsRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatSnapshots) WithH

func (f CatSnapshots) WithH(v ...string) func(*CatSnapshotsRequest)

WithH - comma-separated list of column names to display.

func (CatSnapshots) WithHelp

func (f CatSnapshots) WithHelp(v bool) func(*CatSnapshotsRequest)

WithHelp - return help information.

func (CatSnapshots) WithHuman

func (f CatSnapshots) WithHuman() func(*CatSnapshotsRequest)

WithHuman makes statistical values human-readable.

func (CatSnapshots) WithIgnoreUnavailable

func (f CatSnapshots) WithIgnoreUnavailable(v bool) func(*CatSnapshotsRequest)

WithIgnoreUnavailable - set to true to ignore unavailable snapshots.

func (CatSnapshots) WithMasterTimeout

func (f CatSnapshots) WithMasterTimeout(v time.Duration) func(*CatSnapshotsRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatSnapshots) WithPretty

func (f CatSnapshots) WithPretty() func(*CatSnapshotsRequest)

WithPretty makes the response body pretty-printed.

func (CatSnapshots) WithRepository

func (f CatSnapshots) WithRepository(v ...string) func(*CatSnapshotsRequest)

WithRepository - name of repository from which to fetch the snapshot information.

func (CatSnapshots) WithS

func (f CatSnapshots) WithS(v ...string) func(*CatSnapshotsRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatSnapshots) WithV

func (f CatSnapshots) WithV(v bool) func(*CatSnapshotsRequest)

WithV - verbose mode. display column headers.

type CatSnapshotsRequest

type CatSnapshotsRequest struct {
	Repository        []string
	Format            string
	H                 []string
	Help              *bool
	IgnoreUnavailable *bool
	MasterTimeout     time.Duration
	S                 []string
	V                 *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatSnapshotsRequest configures the Cat Snapshots API request.

func (CatSnapshotsRequest) Do

func (r CatSnapshotsRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatTasks

type CatTasks func(o ...func(*CatTasksRequest)) (*Response, error)

CatTasks returns information about the tasks currently executing on one or more nodes in the cluster.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html.

func (CatTasks) WithActions

func (f CatTasks) WithActions(v ...string) func(*CatTasksRequest)

WithActions - a list of actions that should be returned. leave empty to return all..

func (CatTasks) WithContext

func (f CatTasks) WithContext(v context.Context) func(*CatTasksRequest)

WithContext sets the request context.

func (CatTasks) WithDetailed

func (f CatTasks) WithDetailed(v bool) func(*CatTasksRequest)

WithDetailed - return detailed task information (default: false).

func (CatTasks) WithErrorTrace

func (f CatTasks) WithErrorTrace() func(*CatTasksRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatTasks) WithFilterPath

func (f CatTasks) WithFilterPath(v ...string) func(*CatTasksRequest)

WithFilterPath filters the properties of the response body.

func (CatTasks) WithFormat

func (f CatTasks) WithFormat(v string) func(*CatTasksRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatTasks) WithH

func (f CatTasks) WithH(v ...string) func(*CatTasksRequest)

WithH - comma-separated list of column names to display.

func (CatTasks) WithHelp

func (f CatTasks) WithHelp(v bool) func(*CatTasksRequest)

WithHelp - return help information.

func (CatTasks) WithHuman

func (f CatTasks) WithHuman() func(*CatTasksRequest)

WithHuman makes statistical values human-readable.

func (CatTasks) WithNodeID

func (f CatTasks) WithNodeID(v ...string) func(*CatTasksRequest)

WithNodeID - a list of node ids or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes.

func (CatTasks) WithParentTask

func (f CatTasks) WithParentTask(v int) func(*CatTasksRequest)

WithParentTask - return tasks with specified parent task ID. set to -1 to return all..

func (CatTasks) WithPretty

func (f CatTasks) WithPretty() func(*CatTasksRequest)

WithPretty makes the response body pretty-printed.

func (CatTasks) WithS

func (f CatTasks) WithS(v ...string) func(*CatTasksRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatTasks) WithV

func (f CatTasks) WithV(v bool) func(*CatTasksRequest)

WithV - verbose mode. display column headers.

type CatTasksRequest

type CatTasksRequest struct {
	Actions    []string
	Detailed   *bool
	Format     string
	H          []string
	Help       *bool
	NodeID     []string
	ParentTask *int
	S          []string
	V          *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatTasksRequest configures the Cat Tasks API request.

func (CatTasksRequest) Do

func (r CatTasksRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatTemplates

type CatTemplates func(o ...func(*CatTemplatesRequest)) (*Response, error)

CatTemplates returns information about existing templates.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html.

func (CatTemplates) WithContext

func (f CatTemplates) WithContext(v context.Context) func(*CatTemplatesRequest)

WithContext sets the request context.

func (CatTemplates) WithErrorTrace

func (f CatTemplates) WithErrorTrace() func(*CatTemplatesRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatTemplates) WithFilterPath

func (f CatTemplates) WithFilterPath(v ...string) func(*CatTemplatesRequest)

WithFilterPath filters the properties of the response body.

func (CatTemplates) WithFormat

func (f CatTemplates) WithFormat(v string) func(*CatTemplatesRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatTemplates) WithH

func (f CatTemplates) WithH(v ...string) func(*CatTemplatesRequest)

WithH - comma-separated list of column names to display.

func (CatTemplates) WithHelp

func (f CatTemplates) WithHelp(v bool) func(*CatTemplatesRequest)

WithHelp - return help information.

func (CatTemplates) WithHuman

func (f CatTemplates) WithHuman() func(*CatTemplatesRequest)

WithHuman makes statistical values human-readable.

func (CatTemplates) WithLocal

func (f CatTemplates) WithLocal(v bool) func(*CatTemplatesRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatTemplates) WithMasterTimeout

func (f CatTemplates) WithMasterTimeout(v time.Duration) func(*CatTemplatesRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatTemplates) WithName

func (f CatTemplates) WithName(v string) func(*CatTemplatesRequest)

WithName - a pattern that returned template names must match.

func (CatTemplates) WithPretty

func (f CatTemplates) WithPretty() func(*CatTemplatesRequest)

WithPretty makes the response body pretty-printed.

func (CatTemplates) WithS

func (f CatTemplates) WithS(v ...string) func(*CatTemplatesRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatTemplates) WithV

func (f CatTemplates) WithV(v bool) func(*CatTemplatesRequest)

WithV - verbose mode. display column headers.

type CatTemplatesRequest

type CatTemplatesRequest struct {
	Name          string
	Format        string
	H             []string
	Help          *bool
	Local         *bool
	MasterTimeout time.Duration
	S             []string
	V             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatTemplatesRequest configures the Cat Templates API request.

func (CatTemplatesRequest) Do

func (r CatTemplatesRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CatThreadPool

type CatThreadPool func(o ...func(*CatThreadPoolRequest)) (*Response, error)

CatThreadPool returns cluster-wide thread pool statistics per node. By default the active, queue and rejected statistics are returned for all thread pools.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html.

func (CatThreadPool) WithContext

func (f CatThreadPool) WithContext(v context.Context) func(*CatThreadPoolRequest)

WithContext sets the request context.

func (CatThreadPool) WithErrorTrace

func (f CatThreadPool) WithErrorTrace() func(*CatThreadPoolRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CatThreadPool) WithFilterPath

func (f CatThreadPool) WithFilterPath(v ...string) func(*CatThreadPoolRequest)

WithFilterPath filters the properties of the response body.

func (CatThreadPool) WithFormat

func (f CatThreadPool) WithFormat(v string) func(*CatThreadPoolRequest)

WithFormat - a short version of the accept header, e.g. json, yaml.

func (CatThreadPool) WithH

func (f CatThreadPool) WithH(v ...string) func(*CatThreadPoolRequest)

WithH - comma-separated list of column names to display.

func (CatThreadPool) WithHelp

func (f CatThreadPool) WithHelp(v bool) func(*CatThreadPoolRequest)

WithHelp - return help information.

func (CatThreadPool) WithHuman

func (f CatThreadPool) WithHuman() func(*CatThreadPoolRequest)

WithHuman makes statistical values human-readable.

func (CatThreadPool) WithLocal

func (f CatThreadPool) WithLocal(v bool) func(*CatThreadPoolRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (CatThreadPool) WithMasterTimeout

func (f CatThreadPool) WithMasterTimeout(v time.Duration) func(*CatThreadPoolRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (CatThreadPool) WithPretty

func (f CatThreadPool) WithPretty() func(*CatThreadPoolRequest)

WithPretty makes the response body pretty-printed.

func (CatThreadPool) WithS

func (f CatThreadPool) WithS(v ...string) func(*CatThreadPoolRequest)

WithS - comma-separated list of column names or column aliases to sort by.

func (CatThreadPool) WithSize

func (f CatThreadPool) WithSize(v string) func(*CatThreadPoolRequest)

WithSize - the multiplier in which to display values.

func (CatThreadPool) WithThreadPoolPatterns

func (f CatThreadPool) WithThreadPoolPatterns(v ...string) func(*CatThreadPoolRequest)

WithThreadPoolPatterns - a list of regular-expressions to filter the thread pools in the output.

func (CatThreadPool) WithV

func (f CatThreadPool) WithV(v bool) func(*CatThreadPoolRequest)

WithV - verbose mode. display column headers.

type CatThreadPoolRequest

type CatThreadPoolRequest struct {
	ThreadPoolPatterns []string
	Format             string
	H                  []string
	Help               *bool
	Local              *bool
	MasterTimeout      time.Duration
	S                  []string
	Size               string
	V                  *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CatThreadPoolRequest configures the Cat Thread Pool API request.

func (CatThreadPoolRequest) Do

func (r CatThreadPoolRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type ClearScroll

type ClearScroll func(o ...func(*ClearScrollRequest)) (*Response, error)

ClearScroll explicitely clears the search context for a scroll.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html.

func (ClearScroll) WithBody

func (f ClearScroll) WithBody(v io.Reader) func(*ClearScrollRequest)

WithBody - A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter.

func (ClearScroll) WithContext

func (f ClearScroll) WithContext(v context.Context) func(*ClearScrollRequest)

WithContext sets the request context.

func (ClearScroll) WithErrorTrace

func (f ClearScroll) WithErrorTrace() func(*ClearScrollRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (ClearScroll) WithFilterPath

func (f ClearScroll) WithFilterPath(v ...string) func(*ClearScrollRequest)

WithFilterPath filters the properties of the response body.

func (ClearScroll) WithHuman

func (f ClearScroll) WithHuman() func(*ClearScrollRequest)

WithHuman makes statistical values human-readable.

func (ClearScroll) WithPretty

func (f ClearScroll) WithPretty() func(*ClearScrollRequest)

WithPretty makes the response body pretty-printed.

func (ClearScroll) WithScrollID

func (f ClearScroll) WithScrollID(v ...string) func(*ClearScrollRequest)

WithScrollID - a list of scroll ids to clear.

type ClearScrollRequest

type ClearScrollRequest struct {
	Body io.Reader

	ScrollID []string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

ClearScrollRequest configures the Clear Scroll API request.

func (ClearScrollRequest) Do

func (r ClearScrollRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Cluster

type Cluster struct {
	AllocationExplain ClusterAllocationExplain
	GetSettings       ClusterGetSettings
	Health            ClusterHealth
	PendingTasks      ClusterPendingTasks
	PutSettings       ClusterPutSettings
	RemoteInfo        ClusterRemoteInfo
	Reroute           ClusterReroute
	State             ClusterState
	Stats             ClusterStats
}

Cluster contains the Cluster APIs

type ClusterAllocationExplain

type ClusterAllocationExplain func(o ...func(*ClusterAllocationExplainRequest)) (*Response, error)

ClusterAllocationExplain provides explanations for shard allocations in the cluster.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html.

func (ClusterAllocationExplain) WithBody

WithBody - The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'.

func (ClusterAllocationExplain) WithContext

WithContext sets the request context.

func (ClusterAllocationExplain) WithErrorTrace

WithErrorTrace includes the stack trace for errors in the response body.

func (ClusterAllocationExplain) WithFilterPath

func (f ClusterAllocationExplain) WithFilterPath(v ...string) func(*ClusterAllocationExplainRequest)

WithFilterPath filters the properties of the response body.

func (ClusterAllocationExplain) WithHuman

WithHuman makes statistical values human-readable.

func (ClusterAllocationExplain) WithIncludeDiskInfo

func (f ClusterAllocationExplain) WithIncludeDiskInfo(v bool) func(*ClusterAllocationExplainRequest)

WithIncludeDiskInfo - return information about disk usage and shard sizes (default: false).

func (ClusterAllocationExplain) WithIncludeYesDecisions

func (f ClusterAllocationExplain) WithIncludeYesDecisions(v bool) func(*ClusterAllocationExplainRequest)

WithIncludeYesDecisions - return 'yes' decisions in explanation (default: false).

func (ClusterAllocationExplain) WithPretty

WithPretty makes the response body pretty-printed.

type ClusterAllocationExplainRequest

type ClusterAllocationExplainRequest struct {
	Body io.Reader

	IncludeDiskInfo     *bool
	IncludeYesDecisions *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

ClusterAllocationExplainRequest configures the Cluster Allocation Explain API request.

func (ClusterAllocationExplainRequest) Do

Do executes the request and returns response or error.

type ClusterGetSettings

type ClusterGetSettings func(o ...func(*ClusterGetSettingsRequest)) (*Response, error)

ClusterGetSettings returns cluster settings.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html.

func (ClusterGetSettings) WithContext

WithContext sets the request context.

func (ClusterGetSettings) WithErrorTrace

func (f ClusterGetSettings) WithErrorTrace() func(*ClusterGetSettingsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (ClusterGetSettings) WithFilterPath

func (f ClusterGetSettings) WithFilterPath(v ...string) func(*ClusterGetSettingsRequest)

WithFilterPath filters the properties of the response body.

func (ClusterGetSettings) WithFlatSettings

func (f ClusterGetSettings) WithFlatSettings(v bool) func(*ClusterGetSettingsRequest)

WithFlatSettings - return settings in flat format (default: false).

func (ClusterGetSettings) WithHuman

func (f ClusterGetSettings) WithHuman() func(*ClusterGetSettingsRequest)

WithHuman makes statistical values human-readable.

func (ClusterGetSettings) WithIncludeDefaults

func (f ClusterGetSettings) WithIncludeDefaults(v bool) func(*ClusterGetSettingsRequest)

WithIncludeDefaults - whether to return all default clusters setting..

func (ClusterGetSettings) WithMasterTimeout

func (f ClusterGetSettings) WithMasterTimeout(v time.Duration) func(*ClusterGetSettingsRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (ClusterGetSettings) WithPretty

func (f ClusterGetSettings) WithPretty() func(*ClusterGetSettingsRequest)

WithPretty makes the response body pretty-printed.

func (ClusterGetSettings) WithTimeout

WithTimeout - explicit operation timeout.

type ClusterGetSettingsRequest

type ClusterGetSettingsRequest struct {
	FlatSettings    *bool
	IncludeDefaults *bool
	MasterTimeout   time.Duration
	Timeout         time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

ClusterGetSettingsRequest configures the Cluster Get Settings API request.

func (ClusterGetSettingsRequest) Do

Do executes the request and returns response or error.

type ClusterHealth

type ClusterHealth func(o ...func(*ClusterHealthRequest)) (*Response, error)

ClusterHealth returns basic information about the health of the cluster.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html.

func (ClusterHealth) WithContext

func (f ClusterHealth) WithContext(v context.Context) func(*ClusterHealthRequest)

WithContext sets the request context.

func (ClusterHealth) WithErrorTrace

func (f ClusterHealth) WithErrorTrace() func(*ClusterHealthRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (ClusterHealth) WithFilterPath

func (f ClusterHealth) WithFilterPath(v ...string) func(*ClusterHealthRequest)

WithFilterPath filters the properties of the response body.

func (ClusterHealth) WithHuman

func (f ClusterHealth) WithHuman() func(*ClusterHealthRequest)

WithHuman makes statistical values human-readable.

func (ClusterHealth) WithIndex

func (f ClusterHealth) WithIndex(v ...string) func(*ClusterHealthRequest)

WithIndex - limit the information returned to a specific index.

func (ClusterHealth) WithLevel

func (f ClusterHealth) WithLevel(v string) func(*ClusterHealthRequest)

WithLevel - specify the level of detail for returned information.

func (ClusterHealth) WithLocal

func (f ClusterHealth) WithLocal(v bool) func(*ClusterHealthRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (ClusterHealth) WithMasterTimeout

func (f ClusterHealth) WithMasterTimeout(v time.Duration) func(*ClusterHealthRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (ClusterHealth) WithPretty

func (f ClusterHealth) WithPretty() func(*ClusterHealthRequest)

WithPretty makes the response body pretty-printed.

func (ClusterHealth) WithTimeout

func (f ClusterHealth) WithTimeout(v time.Duration) func(*ClusterHealthRequest)

WithTimeout - explicit operation timeout.

func (ClusterHealth) WithWaitForActiveShards

func (f ClusterHealth) WithWaitForActiveShards(v string) func(*ClusterHealthRequest)

WithWaitForActiveShards - wait until the specified number of shards is active.

func (ClusterHealth) WithWaitForEvents

func (f ClusterHealth) WithWaitForEvents(v string) func(*ClusterHealthRequest)

WithWaitForEvents - wait until all currently queued events with the given priority are processed.

func (ClusterHealth) WithWaitForNoInitializingShards

func (f ClusterHealth) WithWaitForNoInitializingShards(v bool) func(*ClusterHealthRequest)

WithWaitForNoInitializingShards - whether to wait until there are no initializing shards in the cluster.

func (ClusterHealth) WithWaitForNoRelocatingShards

func (f ClusterHealth) WithWaitForNoRelocatingShards(v bool) func(*ClusterHealthRequest)

WithWaitForNoRelocatingShards - whether to wait until there are no relocating shards in the cluster.

func (ClusterHealth) WithWaitForNodes

func (f ClusterHealth) WithWaitForNodes(v string) func(*ClusterHealthRequest)

WithWaitForNodes - wait until the specified number of nodes is available.

func (ClusterHealth) WithWaitForStatus

func (f ClusterHealth) WithWaitForStatus(v string) func(*ClusterHealthRequest)

WithWaitForStatus - wait until cluster is in a specific state.

type ClusterHealthRequest

type ClusterHealthRequest struct {
	Index []string

	Level                       string
	Local                       *bool
	MasterTimeout               time.Duration
	Timeout                     time.Duration
	WaitForActiveShards         string
	WaitForEvents               string
	WaitForNoInitializingShards *bool
	WaitForNoRelocatingShards   *bool
	WaitForNodes                string
	WaitForStatus               string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

ClusterHealthRequest configures the Cluster Health API request.

func (ClusterHealthRequest) Do

func (r ClusterHealthRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type ClusterPendingTasks

type ClusterPendingTasks func(o ...func(*ClusterPendingTasksRequest)) (*Response, error)

ClusterPendingTasks returns a list of any cluster-level changes (e.g. create index, update mapping, allocate or fail shard) which have not yet been executed.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html.

func (ClusterPendingTasks) WithContext

WithContext sets the request context.

func (ClusterPendingTasks) WithErrorTrace

func (f ClusterPendingTasks) WithErrorTrace() func(*ClusterPendingTasksRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (ClusterPendingTasks) WithFilterPath

func (f ClusterPendingTasks) WithFilterPath(v ...string) func(*ClusterPendingTasksRequest)

WithFilterPath filters the properties of the response body.

func (ClusterPendingTasks) WithHuman

func (f ClusterPendingTasks) WithHuman() func(*ClusterPendingTasksRequest)

WithHuman makes statistical values human-readable.

func (ClusterPendingTasks) WithLocal

func (f ClusterPendingTasks) WithLocal(v bool) func(*ClusterPendingTasksRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (ClusterPendingTasks) WithMasterTimeout

func (f ClusterPendingTasks) WithMasterTimeout(v time.Duration) func(*ClusterPendingTasksRequest)

WithMasterTimeout - specify timeout for connection to master.

func (ClusterPendingTasks) WithPretty

func (f ClusterPendingTasks) WithPretty() func(*ClusterPendingTasksRequest)

WithPretty makes the response body pretty-printed.

type ClusterPendingTasksRequest

type ClusterPendingTasksRequest struct {
	Local         *bool
	MasterTimeout time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

ClusterPendingTasksRequest configures the Cluster Pending Tasks API request.

func (ClusterPendingTasksRequest) Do

Do executes the request and returns response or error.

type ClusterPutSettings

type ClusterPutSettings func(body io.Reader, o ...func(*ClusterPutSettingsRequest)) (*Response, error)

ClusterPutSettings updates the cluster settings.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html.

func (ClusterPutSettings) WithContext

WithContext sets the request context.

func (ClusterPutSettings) WithErrorTrace

func (f ClusterPutSettings) WithErrorTrace() func(*ClusterPutSettingsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (ClusterPutSettings) WithFilterPath

func (f ClusterPutSettings) WithFilterPath(v ...string) func(*ClusterPutSettingsRequest)

WithFilterPath filters the properties of the response body.

func (ClusterPutSettings) WithFlatSettings

func (f ClusterPutSettings) WithFlatSettings(v bool) func(*ClusterPutSettingsRequest)

WithFlatSettings - return settings in flat format (default: false).

func (ClusterPutSettings) WithHuman

func (f ClusterPutSettings) WithHuman() func(*ClusterPutSettingsRequest)

WithHuman makes statistical values human-readable.

func (ClusterPutSettings) WithMasterTimeout

func (f ClusterPutSettings) WithMasterTimeout(v time.Duration) func(*ClusterPutSettingsRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (ClusterPutSettings) WithPretty

func (f ClusterPutSettings) WithPretty() func(*ClusterPutSettingsRequest)

WithPretty makes the response body pretty-printed.

func (ClusterPutSettings) WithTimeout

WithTimeout - explicit operation timeout.

type ClusterPutSettingsRequest

type ClusterPutSettingsRequest struct {
	Body io.Reader

	FlatSettings  *bool
	MasterTimeout time.Duration
	Timeout       time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

ClusterPutSettingsRequest configures the Cluster Put Settings API request.

func (ClusterPutSettingsRequest) Do

Do executes the request and returns response or error.

type ClusterRemoteInfo

type ClusterRemoteInfo func(o ...func(*ClusterRemoteInfoRequest)) (*Response, error)

ClusterRemoteInfo returns the information about configured remote clusters.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html.

func (ClusterRemoteInfo) WithContext

WithContext sets the request context.

func (ClusterRemoteInfo) WithErrorTrace

func (f ClusterRemoteInfo) WithErrorTrace() func(*ClusterRemoteInfoRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (ClusterRemoteInfo) WithFilterPath

func (f ClusterRemoteInfo) WithFilterPath(v ...string) func(*ClusterRemoteInfoRequest)

WithFilterPath filters the properties of the response body.

func (ClusterRemoteInfo) WithHuman

func (f ClusterRemoteInfo) WithHuman() func(*ClusterRemoteInfoRequest)

WithHuman makes statistical values human-readable.

func (ClusterRemoteInfo) WithPretty

func (f ClusterRemoteInfo) WithPretty() func(*ClusterRemoteInfoRequest)

WithPretty makes the response body pretty-printed.

type ClusterRemoteInfoRequest

type ClusterRemoteInfoRequest struct {
	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

ClusterRemoteInfoRequest configures the Cluster Remote Info API request.

func (ClusterRemoteInfoRequest) Do

Do executes the request and returns response or error.

type ClusterReroute

type ClusterReroute func(o ...func(*ClusterRerouteRequest)) (*Response, error)

ClusterReroute allows to manually change the allocation of individual shards in the cluster.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html.

func (ClusterReroute) WithBody

func (f ClusterReroute) WithBody(v io.Reader) func(*ClusterRerouteRequest)

WithBody - The definition of `commands` to perform (`move`, `cancel`, `allocate`).

func (ClusterReroute) WithContext

func (f ClusterReroute) WithContext(v context.Context) func(*ClusterRerouteRequest)

WithContext sets the request context.

func (ClusterReroute) WithDryRun

func (f ClusterReroute) WithDryRun(v bool) func(*ClusterRerouteRequest)

WithDryRun - simulate the operation only and return the resulting state.

func (ClusterReroute) WithErrorTrace

func (f ClusterReroute) WithErrorTrace() func(*ClusterRerouteRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (ClusterReroute) WithExplain

func (f ClusterReroute) WithExplain(v bool) func(*ClusterRerouteRequest)

WithExplain - return an explanation of why the commands can or cannot be executed.

func (ClusterReroute) WithFilterPath

func (f ClusterReroute) WithFilterPath(v ...string) func(*ClusterRerouteRequest)

WithFilterPath filters the properties of the response body.

func (ClusterReroute) WithHuman

func (f ClusterReroute) WithHuman() func(*ClusterRerouteRequest)

WithHuman makes statistical values human-readable.

func (ClusterReroute) WithMasterTimeout

func (f ClusterReroute) WithMasterTimeout(v time.Duration) func(*ClusterRerouteRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (ClusterReroute) WithMetric

func (f ClusterReroute) WithMetric(v ...string) func(*ClusterRerouteRequest)

WithMetric - limit the information returned to the specified metrics. defaults to all but metadata.

func (ClusterReroute) WithPretty

func (f ClusterReroute) WithPretty() func(*ClusterRerouteRequest)

WithPretty makes the response body pretty-printed.

func (ClusterReroute) WithRetryFailed

func (f ClusterReroute) WithRetryFailed(v bool) func(*ClusterRerouteRequest)

WithRetryFailed - retries allocation of shards that are blocked due to too many subsequent allocation failures.

func (ClusterReroute) WithTimeout

func (f ClusterReroute) WithTimeout(v time.Duration) func(*ClusterRerouteRequest)

WithTimeout - explicit operation timeout.

type ClusterRerouteRequest

type ClusterRerouteRequest struct {
	Body io.Reader

	DryRun        *bool
	Explain       *bool
	MasterTimeout time.Duration
	Metric        []string
	RetryFailed   *bool
	Timeout       time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

ClusterRerouteRequest configures the Cluster Reroute API request.

func (ClusterRerouteRequest) Do

func (r ClusterRerouteRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type ClusterState

type ClusterState func(o ...func(*ClusterStateRequest)) (*Response, error)

ClusterState returns a comprehensive information about the state of the cluster.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html.

func (ClusterState) WithAllowNoIndices

func (f ClusterState) WithAllowNoIndices(v bool) func(*ClusterStateRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (ClusterState) WithContext

func (f ClusterState) WithContext(v context.Context) func(*ClusterStateRequest)

WithContext sets the request context.

func (ClusterState) WithErrorTrace

func (f ClusterState) WithErrorTrace() func(*ClusterStateRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (ClusterState) WithExpandWildcards

func (f ClusterState) WithExpandWildcards(v string) func(*ClusterStateRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (ClusterState) WithFilterPath

func (f ClusterState) WithFilterPath(v ...string) func(*ClusterStateRequest)

WithFilterPath filters the properties of the response body.

func (ClusterState) WithFlatSettings

func (f ClusterState) WithFlatSettings(v bool) func(*ClusterStateRequest)

WithFlatSettings - return settings in flat format (default: false).

func (ClusterState) WithHuman

func (f ClusterState) WithHuman() func(*ClusterStateRequest)

WithHuman makes statistical values human-readable.

func (ClusterState) WithIgnoreUnavailable

func (f ClusterState) WithIgnoreUnavailable(v bool) func(*ClusterStateRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (ClusterState) WithIndex

func (f ClusterState) WithIndex(v ...string) func(*ClusterStateRequest)

WithIndex - a list of index names; use _all to perform the operation on all indices.

func (ClusterState) WithLocal

func (f ClusterState) WithLocal(v bool) func(*ClusterStateRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (ClusterState) WithMasterTimeout

func (f ClusterState) WithMasterTimeout(v time.Duration) func(*ClusterStateRequest)

WithMasterTimeout - specify timeout for connection to master.

func (ClusterState) WithMetric

func (f ClusterState) WithMetric(v ...string) func(*ClusterStateRequest)

WithMetric - limit the information returned to the specified metrics.

func (ClusterState) WithPretty

func (f ClusterState) WithPretty() func(*ClusterStateRequest)

WithPretty makes the response body pretty-printed.

func (ClusterState) WithWaitForMetadataVersion

func (f ClusterState) WithWaitForMetadataVersion(v int) func(*ClusterStateRequest)

WithWaitForMetadataVersion - wait for the metadata version to be equal or greater than the specified metadata version.

func (ClusterState) WithWaitForTimeout

func (f ClusterState) WithWaitForTimeout(v time.Duration) func(*ClusterStateRequest)

WithWaitForTimeout - the maximum time to wait for wait_for_metadata_version before timing out.

type ClusterStateRequest

type ClusterStateRequest struct {
	Index []string

	Metric                 []string
	AllowNoIndices         *bool
	ExpandWildcards        string
	FlatSettings           *bool
	IgnoreUnavailable      *bool
	Local                  *bool
	MasterTimeout          time.Duration
	WaitForMetadataVersion *int
	WaitForTimeout         time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

ClusterStateRequest configures the Cluster State API request.

func (ClusterStateRequest) Do

func (r ClusterStateRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type ClusterStats

type ClusterStats func(o ...func(*ClusterStatsRequest)) (*Response, error)

ClusterStats returns high-level overview of cluster statistics.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html.

func (ClusterStats) WithContext

func (f ClusterStats) WithContext(v context.Context) func(*ClusterStatsRequest)

WithContext sets the request context.

func (ClusterStats) WithErrorTrace

func (f ClusterStats) WithErrorTrace() func(*ClusterStatsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (ClusterStats) WithFilterPath

func (f ClusterStats) WithFilterPath(v ...string) func(*ClusterStatsRequest)

WithFilterPath filters the properties of the response body.

func (ClusterStats) WithFlatSettings

func (f ClusterStats) WithFlatSettings(v bool) func(*ClusterStatsRequest)

WithFlatSettings - return settings in flat format (default: false).

func (ClusterStats) WithHuman

func (f ClusterStats) WithHuman() func(*ClusterStatsRequest)

WithHuman makes statistical values human-readable.

func (ClusterStats) WithNodeID

func (f ClusterStats) WithNodeID(v ...string) func(*ClusterStatsRequest)

WithNodeID - a list of node ids or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes.

func (ClusterStats) WithPretty

func (f ClusterStats) WithPretty() func(*ClusterStatsRequest)

WithPretty makes the response body pretty-printed.

func (ClusterStats) WithTimeout

func (f ClusterStats) WithTimeout(v time.Duration) func(*ClusterStatsRequest)

WithTimeout - explicit operation timeout.

type ClusterStatsRequest

type ClusterStatsRequest struct {
	NodeID       []string
	FlatSettings *bool
	Timeout      time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

ClusterStatsRequest configures the Cluster Stats API request.

func (ClusterStatsRequest) Do

func (r ClusterStatsRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Count

type Count func(o ...func(*CountRequest)) (*Response, error)

Count returns number of documents matching a query.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html.

func (Count) WithAllowNoIndices

func (f Count) WithAllowNoIndices(v bool) func(*CountRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (Count) WithAnalyzeWildcard

func (f Count) WithAnalyzeWildcard(v bool) func(*CountRequest)

WithAnalyzeWildcard - specify whether wildcard and prefix queries should be analyzed (default: false).

func (Count) WithAnalyzer

func (f Count) WithAnalyzer(v string) func(*CountRequest)

WithAnalyzer - the analyzer to use for the query string.

func (Count) WithBody

func (f Count) WithBody(v io.Reader) func(*CountRequest)

WithBody - A query to restrict the results specified with the Query DSL (optional).

func (Count) WithContext

func (f Count) WithContext(v context.Context) func(*CountRequest)

WithContext sets the request context.

func (Count) WithDefaultOperator

func (f Count) WithDefaultOperator(v string) func(*CountRequest)

WithDefaultOperator - the default operator for query string query (and or or).

func (Count) WithDf

func (f Count) WithDf(v string) func(*CountRequest)

WithDf - the field to use as default where no field prefix is given in the query string.

func (Count) WithDocumentType

func (f Count) WithDocumentType(v ...string) func(*CountRequest)

WithDocumentType - a list of types to restrict the results.

func (Count) WithErrorTrace

func (f Count) WithErrorTrace() func(*CountRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (Count) WithExpandWildcards

func (f Count) WithExpandWildcards(v string) func(*CountRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (Count) WithFilterPath

func (f Count) WithFilterPath(v ...string) func(*CountRequest)

WithFilterPath filters the properties of the response body.

func (Count) WithHuman

func (f Count) WithHuman() func(*CountRequest)

WithHuman makes statistical values human-readable.

func (Count) WithIgnoreThrottled

func (f Count) WithIgnoreThrottled(v bool) func(*CountRequest)

WithIgnoreThrottled - whether specified concrete, expanded or aliased indices should be ignored when throttled.

func (Count) WithIgnoreUnavailable

func (f Count) WithIgnoreUnavailable(v bool) func(*CountRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (Count) WithIndex

func (f Count) WithIndex(v ...string) func(*CountRequest)

WithIndex - a list of indices to restrict the results.

func (Count) WithLenient

func (f Count) WithLenient(v bool) func(*CountRequest)

WithLenient - specify whether format-based query failures (such as providing text to a numeric field) should be ignored.

func (Count) WithMinScore

func (f Count) WithMinScore(v int) func(*CountRequest)

WithMinScore - include only documents with a specific `_score` value in the result.

func (Count) WithPreference

func (f Count) WithPreference(v string) func(*CountRequest)

WithPreference - specify the node or shard the operation should be performed on (default: random).

func (Count) WithPretty

func (f Count) WithPretty() func(*CountRequest)

WithPretty makes the response body pretty-printed.

func (Count) WithQuery

func (f Count) WithQuery(v string) func(*CountRequest)

WithQuery - query in the lucene query string syntax.

func (Count) WithRouting

func (f Count) WithRouting(v ...string) func(*CountRequest)

WithRouting - a list of specific routing values.

func (Count) WithTerminateAfter

func (f Count) WithTerminateAfter(v int) func(*CountRequest)

WithTerminateAfter - the maximum count for each shard, upon reaching which the query execution will terminate early.

type CountRequest

type CountRequest struct {
	Index        []string
	DocumentType []string
	Body         io.Reader

	AllowNoIndices    *bool
	Analyzer          string
	AnalyzeWildcard   *bool
	DefaultOperator   string
	Df                string
	ExpandWildcards   string
	IgnoreThrottled   *bool
	IgnoreUnavailable *bool
	Lenient           *bool
	MinScore          *int
	Preference        string
	Query             string
	Routing           []string
	TerminateAfter    *int

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CountRequest configures the Count API request.

func (CountRequest) Do

func (r CountRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Create

type Create func(index string, id string, body io.Reader, o ...func(*CreateRequest)) (*Response, error)

Create creates a new document in the index.

Returns a 409 response when a document with a same ID already exists in the index.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html.

func (Create) WithContext

func (f Create) WithContext(v context.Context) func(*CreateRequest)

WithContext sets the request context.

func (Create) WithDocumentType

func (f Create) WithDocumentType(v string) func(*CreateRequest)

WithDocumentType - the type of the document.

func (Create) WithErrorTrace

func (f Create) WithErrorTrace() func(*CreateRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (Create) WithFilterPath

func (f Create) WithFilterPath(v ...string) func(*CreateRequest)

WithFilterPath filters the properties of the response body.

func (Create) WithHuman

func (f Create) WithHuman() func(*CreateRequest)

WithHuman makes statistical values human-readable.

func (Create) WithParent

func (f Create) WithParent(v string) func(*CreateRequest)

WithParent - ID of the parent document.

func (Create) WithPipeline

func (f Create) WithPipeline(v string) func(*CreateRequest)

WithPipeline - the pipeline ID to preprocess incoming documents with.

func (Create) WithPretty

func (f Create) WithPretty() func(*CreateRequest)

WithPretty makes the response body pretty-printed.

func (Create) WithRefresh

func (f Create) WithRefresh(v string) func(*CreateRequest)

WithRefresh - if `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes..

func (Create) WithRouting

func (f Create) WithRouting(v string) func(*CreateRequest)

WithRouting - specific routing value.

func (Create) WithTimeout

func (f Create) WithTimeout(v time.Duration) func(*CreateRequest)

WithTimeout - explicit operation timeout.

func (Create) WithVersion

func (f Create) WithVersion(v int) func(*CreateRequest)

WithVersion - explicit version number for concurrency control.

func (Create) WithVersionType

func (f Create) WithVersionType(v string) func(*CreateRequest)

WithVersionType - specific version type.

func (Create) WithWaitForActiveShards

func (f Create) WithWaitForActiveShards(v string) func(*CreateRequest)

WithWaitForActiveShards - sets the number of shard copies that must be active before proceeding with the index operation. defaults to 1, meaning the primary shard only. set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1).

type CreateRequest

type CreateRequest struct {
	Index        string
	DocumentType string
	DocumentID   string
	Body         io.Reader

	Parent              string
	Pipeline            string
	Refresh             string
	Routing             string
	Timeout             time.Duration
	Version             *int
	VersionType         string
	WaitForActiveShards string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

CreateRequest configures the Create API request.

func (CreateRequest) Do

func (r CreateRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Delete

type Delete func(index string, id string, o ...func(*DeleteRequest)) (*Response, error)

Delete removes a document from the index.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html.

func (Delete) WithContext

func (f Delete) WithContext(v context.Context) func(*DeleteRequest)

WithContext sets the request context.

func (Delete) WithDocumentType

func (f Delete) WithDocumentType(v string) func(*DeleteRequest)

WithDocumentType - the type of the document.

func (Delete) WithErrorTrace

func (f Delete) WithErrorTrace() func(*DeleteRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (Delete) WithFilterPath

func (f Delete) WithFilterPath(v ...string) func(*DeleteRequest)

WithFilterPath filters the properties of the response body.

func (Delete) WithHuman

func (f Delete) WithHuman() func(*DeleteRequest)

WithHuman makes statistical values human-readable.

func (Delete) WithIfPrimaryTerm

func (f Delete) WithIfPrimaryTerm(v int) func(*DeleteRequest)

WithIfPrimaryTerm - only perform the delete operation if the last operation that has changed the document has the specified primary term.

func (Delete) WithIfSeqNo

func (f Delete) WithIfSeqNo(v int) func(*DeleteRequest)

WithIfSeqNo - only perform the delete operation if the last operation that has changed the document has the specified sequence number.

func (Delete) WithParent

func (f Delete) WithParent(v string) func(*DeleteRequest)

WithParent - ID of parent document.

func (Delete) WithPretty

func (f Delete) WithPretty() func(*DeleteRequest)

WithPretty makes the response body pretty-printed.

func (Delete) WithRefresh

func (f Delete) WithRefresh(v string) func(*DeleteRequest)

WithRefresh - if `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes..

func (Delete) WithRouting

func (f Delete) WithRouting(v string) func(*DeleteRequest)

WithRouting - specific routing value.

func (Delete) WithTimeout

func (f Delete) WithTimeout(v time.Duration) func(*DeleteRequest)

WithTimeout - explicit operation timeout.

func (Delete) WithVersion

func (f Delete) WithVersion(v int) func(*DeleteRequest)

WithVersion - explicit version number for concurrency control.

func (Delete) WithVersionType

func (f Delete) WithVersionType(v string) func(*DeleteRequest)

WithVersionType - specific version type.

func (Delete) WithWaitForActiveShards

func (f Delete) WithWaitForActiveShards(v string) func(*DeleteRequest)

WithWaitForActiveShards - sets the number of shard copies that must be active before proceeding with the delete operation. defaults to 1, meaning the primary shard only. set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1).

type DeleteByQuery

type DeleteByQuery func(index []string, body io.Reader, o ...func(*DeleteByQueryRequest)) (*Response, error)

DeleteByQuery deletes documents matching the provided query.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html.

func (DeleteByQuery) WithAllowNoIndices

func (f DeleteByQuery) WithAllowNoIndices(v bool) func(*DeleteByQueryRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (DeleteByQuery) WithAnalyzeWildcard

func (f DeleteByQuery) WithAnalyzeWildcard(v bool) func(*DeleteByQueryRequest)

WithAnalyzeWildcard - specify whether wildcard and prefix queries should be analyzed (default: false).

func (DeleteByQuery) WithAnalyzer

func (f DeleteByQuery) WithAnalyzer(v string) func(*DeleteByQueryRequest)

WithAnalyzer - the analyzer to use for the query string.

func (DeleteByQuery) WithConflicts

func (f DeleteByQuery) WithConflicts(v string) func(*DeleteByQueryRequest)

WithConflicts - what to do when the delete by query hits version conflicts?.

func (DeleteByQuery) WithContext

func (f DeleteByQuery) WithContext(v context.Context) func(*DeleteByQueryRequest)

WithContext sets the request context.

func (DeleteByQuery) WithDefaultOperator

func (f DeleteByQuery) WithDefaultOperator(v string) func(*DeleteByQueryRequest)

WithDefaultOperator - the default operator for query string query (and or or).

func (DeleteByQuery) WithDf

func (f DeleteByQuery) WithDf(v string) func(*DeleteByQueryRequest)

WithDf - the field to use as default where no field prefix is given in the query string.

func (DeleteByQuery) WithDocumentType

func (f DeleteByQuery) WithDocumentType(v ...string) func(*DeleteByQueryRequest)

WithDocumentType - a list of document types to search; leave empty to perform the operation on all types.

func (DeleteByQuery) WithErrorTrace

func (f DeleteByQuery) WithErrorTrace() func(*DeleteByQueryRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (DeleteByQuery) WithExpandWildcards

func (f DeleteByQuery) WithExpandWildcards(v string) func(*DeleteByQueryRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (DeleteByQuery) WithFilterPath

func (f DeleteByQuery) WithFilterPath(v ...string) func(*DeleteByQueryRequest)

WithFilterPath filters the properties of the response body.

func (DeleteByQuery) WithFrom

func (f DeleteByQuery) WithFrom(v int) func(*DeleteByQueryRequest)

WithFrom - starting offset (default: 0).

func (DeleteByQuery) WithHuman

func (f DeleteByQuery) WithHuman() func(*DeleteByQueryRequest)

WithHuman makes statistical values human-readable.

func (DeleteByQuery) WithIgnoreUnavailable

func (f DeleteByQuery) WithIgnoreUnavailable(v bool) func(*DeleteByQueryRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (DeleteByQuery) WithLenient

func (f DeleteByQuery) WithLenient(v bool) func(*DeleteByQueryRequest)

WithLenient - specify whether format-based query failures (such as providing text to a numeric field) should be ignored.

func (DeleteByQuery) WithPreference

func (f DeleteByQuery) WithPreference(v string) func(*DeleteByQueryRequest)

WithPreference - specify the node or shard the operation should be performed on (default: random).

func (DeleteByQuery) WithPretty

func (f DeleteByQuery) WithPretty() func(*DeleteByQueryRequest)

WithPretty makes the response body pretty-printed.

func (DeleteByQuery) WithQuery

func (f DeleteByQuery) WithQuery(v string) func(*DeleteByQueryRequest)

WithQuery - query in the lucene query string syntax.

func (DeleteByQuery) WithRefresh

func (f DeleteByQuery) WithRefresh(v bool) func(*DeleteByQueryRequest)

WithRefresh - should the effected indexes be refreshed?.

func (DeleteByQuery) WithRequestCache

func (f DeleteByQuery) WithRequestCache(v bool) func(*DeleteByQueryRequest)

WithRequestCache - specify if request cache should be used for this request or not, defaults to index level setting.

func (DeleteByQuery) WithRequestsPerSecond

func (f DeleteByQuery) WithRequestsPerSecond(v int) func(*DeleteByQueryRequest)

WithRequestsPerSecond - the throttle for this request in sub-requests per second. -1 means no throttle..

func (DeleteByQuery) WithRouting

func (f DeleteByQuery) WithRouting(v ...string) func(*DeleteByQueryRequest)

WithRouting - a list of specific routing values.

func (DeleteByQuery) WithScroll

func (f DeleteByQuery) WithScroll(v time.Duration) func(*DeleteByQueryRequest)

WithScroll - specify how long a consistent view of the index should be maintained for scrolled search.

func (DeleteByQuery) WithScrollSize

func (f DeleteByQuery) WithScrollSize(v int) func(*DeleteByQueryRequest)

WithScrollSize - size on the scroll request powering the delete by query.

func (DeleteByQuery) WithSearchTimeout

func (f DeleteByQuery) WithSearchTimeout(v time.Duration) func(*DeleteByQueryRequest)

WithSearchTimeout - explicit timeout for each search request. defaults to no timeout..

func (DeleteByQuery) WithSearchType

func (f DeleteByQuery) WithSearchType(v string) func(*DeleteByQueryRequest)

WithSearchType - search operation type.

func (DeleteByQuery) WithSize

func (f DeleteByQuery) WithSize(v int) func(*DeleteByQueryRequest)

WithSize - number of hits to return (default: 10).

func (DeleteByQuery) WithSlices

func (f DeleteByQuery) WithSlices(v int) func(*DeleteByQueryRequest)

WithSlices - the number of slices this task should be divided into. defaults to 1 meaning the task isn't sliced into subtasks..

func (DeleteByQuery) WithSort

func (f DeleteByQuery) WithSort(v ...string) func(*DeleteByQueryRequest)

WithSort - a list of <field>:<direction> pairs.

func (DeleteByQuery) WithSource

func (f DeleteByQuery) WithSource(v ...string) func(*DeleteByQueryRequest)

WithSource - true or false to return the _source field or not, or a list of fields to return.

func (DeleteByQuery) WithSourceExcludes

func (f DeleteByQuery) WithSourceExcludes(v ...string) func(*DeleteByQueryRequest)

WithSourceExcludes - a list of fields to exclude from the returned _source field.

func (DeleteByQuery) WithSourceIncludes

func (f DeleteByQuery) WithSourceIncludes(v ...string) func(*DeleteByQueryRequest)

WithSourceIncludes - a list of fields to extract and return from the _source field.

func (DeleteByQuery) WithStats

func (f DeleteByQuery) WithStats(v ...string) func(*DeleteByQueryRequest)

WithStats - specific 'tag' of the request for logging and statistical purposes.

func (DeleteByQuery) WithTerminateAfter

func (f DeleteByQuery) WithTerminateAfter(v int) func(*DeleteByQueryRequest)

WithTerminateAfter - the maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early..

func (DeleteByQuery) WithTimeout

func (f DeleteByQuery) WithTimeout(v time.Duration) func(*DeleteByQueryRequest)

WithTimeout - time each individual bulk request should wait for shards that are unavailable..

func (DeleteByQuery) WithVersion

func (f DeleteByQuery) WithVersion(v bool) func(*DeleteByQueryRequest)

WithVersion - specify whether to return document version as part of a hit.

func (DeleteByQuery) WithWaitForActiveShards

func (f DeleteByQuery) WithWaitForActiveShards(v string) func(*DeleteByQueryRequest)

WithWaitForActiveShards - sets the number of shard copies that must be active before proceeding with the delete by query operation. defaults to 1, meaning the primary shard only. set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1).

func (DeleteByQuery) WithWaitForCompletion

func (f DeleteByQuery) WithWaitForCompletion(v bool) func(*DeleteByQueryRequest)

WithWaitForCompletion - should the request should block until the delete by query is complete..

type DeleteByQueryRequest

type DeleteByQueryRequest struct {
	Index        []string
	DocumentType []string
	Body         io.Reader

	AllowNoIndices      *bool
	Analyzer            string
	AnalyzeWildcard     *bool
	Conflicts           string
	DefaultOperator     string
	Df                  string
	ExpandWildcards     string
	From                *int
	IgnoreUnavailable   *bool
	Lenient             *bool
	Preference          string
	Query               string
	Refresh             *bool
	RequestCache        *bool
	RequestsPerSecond   *int
	Routing             []string
	Scroll              time.Duration
	ScrollSize          *int
	SearchTimeout       time.Duration
	SearchType          string
	Size                *int
	Slices              *int
	Sort                []string
	Source              []string
	SourceExcludes      []string
	SourceIncludes      []string
	Stats               []string
	TerminateAfter      *int
	Timeout             time.Duration
	Version             *bool
	WaitForActiveShards string
	WaitForCompletion   *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

DeleteByQueryRequest configures the Delete By Query API request.

func (DeleteByQueryRequest) Do

func (r DeleteByQueryRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type DeleteByQueryRethrottle

type DeleteByQueryRethrottle func(task_id string, requests_per_second *int, o ...func(*DeleteByQueryRethrottleRequest)) (*Response, error)

DeleteByQueryRethrottle changes the number of requests per second for a particular Delete By Query operation.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html.

func (DeleteByQueryRethrottle) WithContext

WithContext sets the request context.

func (DeleteByQueryRethrottle) WithErrorTrace

func (f DeleteByQueryRethrottle) WithErrorTrace() func(*DeleteByQueryRethrottleRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (DeleteByQueryRethrottle) WithFilterPath

func (f DeleteByQueryRethrottle) WithFilterPath(v ...string) func(*DeleteByQueryRethrottleRequest)

WithFilterPath filters the properties of the response body.

func (DeleteByQueryRethrottle) WithHuman

WithHuman makes statistical values human-readable.

func (DeleteByQueryRethrottle) WithPretty

WithPretty makes the response body pretty-printed.

func (DeleteByQueryRethrottle) WithRequestsPerSecond

func (f DeleteByQueryRethrottle) WithRequestsPerSecond(v int) func(*DeleteByQueryRethrottleRequest)

WithRequestsPerSecond - the throttle to set on this request in floating sub-requests per second. -1 means set no throttle..

type DeleteByQueryRethrottleRequest

type DeleteByQueryRethrottleRequest struct {
	TaskID            string
	RequestsPerSecond *int

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

DeleteByQueryRethrottleRequest configures the Delete By Query Rethrottle API request.

func (DeleteByQueryRethrottleRequest) Do

Do executes the request and returns response or error.

type DeleteRequest

type DeleteRequest struct {
	Index        string
	DocumentType string
	DocumentID   string

	IfPrimaryTerm       *int
	IfSeqNo             *int
	Parent              string
	Refresh             string
	Routing             string
	Timeout             time.Duration
	Version             *int
	VersionType         string
	WaitForActiveShards string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

DeleteRequest configures the Delete API request.

func (DeleteRequest) Do

func (r DeleteRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type DeleteScript

type DeleteScript func(id string, o ...func(*DeleteScriptRequest)) (*Response, error)

DeleteScript deletes a script.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html.

func (DeleteScript) WithContext

func (f DeleteScript) WithContext(v context.Context) func(*DeleteScriptRequest)

WithContext sets the request context.

func (DeleteScript) WithErrorTrace

func (f DeleteScript) WithErrorTrace() func(*DeleteScriptRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (DeleteScript) WithFilterPath

func (f DeleteScript) WithFilterPath(v ...string) func(*DeleteScriptRequest)

WithFilterPath filters the properties of the response body.

func (DeleteScript) WithHuman

func (f DeleteScript) WithHuman() func(*DeleteScriptRequest)

WithHuman makes statistical values human-readable.

func (DeleteScript) WithMasterTimeout

func (f DeleteScript) WithMasterTimeout(v time.Duration) func(*DeleteScriptRequest)

WithMasterTimeout - specify timeout for connection to master.

func (DeleteScript) WithPretty

func (f DeleteScript) WithPretty() func(*DeleteScriptRequest)

WithPretty makes the response body pretty-printed.

func (DeleteScript) WithTimeout

func (f DeleteScript) WithTimeout(v time.Duration) func(*DeleteScriptRequest)

WithTimeout - explicit operation timeout.

type DeleteScriptRequest

type DeleteScriptRequest struct {
	DocumentID string

	MasterTimeout time.Duration
	Timeout       time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

DeleteScriptRequest configures the Delete Script API request.

func (DeleteScriptRequest) Do

func (r DeleteScriptRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Exists

type Exists func(index string, id string, o ...func(*ExistsRequest)) (*Response, error)

Exists returns information about whether a document exists in an index.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html.

func (Exists) WithContext

func (f Exists) WithContext(v context.Context) func(*ExistsRequest)

WithContext sets the request context.

func (Exists) WithDocumentType

func (f Exists) WithDocumentType(v string) func(*ExistsRequest)

WithDocumentType - the type of the document (use `_all` to fetch the first document matching the ID across all types).

func (Exists) WithErrorTrace

func (f Exists) WithErrorTrace() func(*ExistsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (Exists) WithFilterPath

func (f Exists) WithFilterPath(v ...string) func(*ExistsRequest)

WithFilterPath filters the properties of the response body.

func (Exists) WithHuman

func (f Exists) WithHuman() func(*ExistsRequest)

WithHuman makes statistical values human-readable.

func (Exists) WithParent

func (f Exists) WithParent(v string) func(*ExistsRequest)

WithParent - the ID of the parent document.

func (Exists) WithPreference

func (f Exists) WithPreference(v string) func(*ExistsRequest)

WithPreference - specify the node or shard the operation should be performed on (default: random).

func (Exists) WithPretty

func (f Exists) WithPretty() func(*ExistsRequest)

WithPretty makes the response body pretty-printed.

func (Exists) WithRealtime

func (f Exists) WithRealtime(v bool) func(*ExistsRequest)

WithRealtime - specify whether to perform the operation in realtime or search mode.

func (Exists) WithRefresh

func (f Exists) WithRefresh(v bool) func(*ExistsRequest)

WithRefresh - refresh the shard containing the document before performing the operation.

func (Exists) WithRouting

func (f Exists) WithRouting(v string) func(*ExistsRequest)

WithRouting - specific routing value.

func (Exists) WithSource

func (f Exists) WithSource(v ...string) func(*ExistsRequest)

WithSource - true or false to return the _source field or not, or a list of fields to return.

func (Exists) WithSourceExcludes

func (f Exists) WithSourceExcludes(v ...string) func(*ExistsRequest)

WithSourceExcludes - a list of fields to exclude from the returned _source field.

func (Exists) WithSourceIncludes

func (f Exists) WithSourceIncludes(v ...string) func(*ExistsRequest)

WithSourceIncludes - a list of fields to extract and return from the _source field.

func (Exists) WithStoredFields

func (f Exists) WithStoredFields(v ...string) func(*ExistsRequest)

WithStoredFields - a list of stored fields to return in the response.

func (Exists) WithVersion

func (f Exists) WithVersion(v int) func(*ExistsRequest)

WithVersion - explicit version number for concurrency control.

func (Exists) WithVersionType

func (f Exists) WithVersionType(v string) func(*ExistsRequest)

WithVersionType - specific version type.

type ExistsRequest

type ExistsRequest struct {
	Index        string
	DocumentType string
	DocumentID   string

	Parent         string
	Preference     string
	Realtime       *bool
	Refresh        *bool
	Routing        string
	Source         []string
	SourceExcludes []string
	SourceIncludes []string
	StoredFields   []string
	Version        *int
	VersionType    string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

ExistsRequest configures the Exists API request.

func (ExistsRequest) Do

func (r ExistsRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type ExistsSource

type ExistsSource func(index string, id string, o ...func(*ExistsSourceRequest)) (*Response, error)

ExistsSource returns information about whether a document source exists in an index.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html.

func (ExistsSource) WithContext

func (f ExistsSource) WithContext(v context.Context) func(*ExistsSourceRequest)

WithContext sets the request context.

func (ExistsSource) WithDocumentType

func (f ExistsSource) WithDocumentType(v string) func(*ExistsSourceRequest)

WithDocumentType - the type of the document; deprecated and optional starting with 7.0.

func (ExistsSource) WithErrorTrace

func (f ExistsSource) WithErrorTrace() func(*ExistsSourceRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (ExistsSource) WithFilterPath

func (f ExistsSource) WithFilterPath(v ...string) func(*ExistsSourceRequest)

WithFilterPath filters the properties of the response body.

func (ExistsSource) WithHuman

func (f ExistsSource) WithHuman() func(*ExistsSourceRequest)

WithHuman makes statistical values human-readable.

func (ExistsSource) WithParent

func (f ExistsSource) WithParent(v string) func(*ExistsSourceRequest)

WithParent - the ID of the parent document.

func (ExistsSource) WithPreference

func (f ExistsSource) WithPreference(v string) func(*ExistsSourceRequest)

WithPreference - specify the node or shard the operation should be performed on (default: random).

func (ExistsSource) WithPretty

func (f ExistsSource) WithPretty() func(*ExistsSourceRequest)

WithPretty makes the response body pretty-printed.

func (ExistsSource) WithRealtime

func (f ExistsSource) WithRealtime(v bool) func(*ExistsSourceRequest)

WithRealtime - specify whether to perform the operation in realtime or search mode.

func (ExistsSource) WithRefresh

func (f ExistsSource) WithRefresh(v bool) func(*ExistsSourceRequest)

WithRefresh - refresh the shard containing the document before performing the operation.

func (ExistsSource) WithRouting

func (f ExistsSource) WithRouting(v string) func(*ExistsSourceRequest)

WithRouting - specific routing value.

func (ExistsSource) WithSource

func (f ExistsSource) WithSource(v ...string) func(*ExistsSourceRequest)

WithSource - true or false to return the _source field or not, or a list of fields to return.

func (ExistsSource) WithSourceExcludes

func (f ExistsSource) WithSourceExcludes(v ...string) func(*ExistsSourceRequest)

WithSourceExcludes - a list of fields to exclude from the returned _source field.

func (ExistsSource) WithSourceIncludes

func (f ExistsSource) WithSourceIncludes(v ...string) func(*ExistsSourceRequest)

WithSourceIncludes - a list of fields to extract and return from the _source field.

func (ExistsSource) WithVersion

func (f ExistsSource) WithVersion(v int) func(*ExistsSourceRequest)

WithVersion - explicit version number for concurrency control.

func (ExistsSource) WithVersionType

func (f ExistsSource) WithVersionType(v string) func(*ExistsSourceRequest)

WithVersionType - specific version type.

type ExistsSourceRequest

type ExistsSourceRequest struct {
	Index        string
	DocumentType string
	DocumentID   string

	Parent         string
	Preference     string
	Realtime       *bool
	Refresh        *bool
	Routing        string
	Source         []string
	SourceExcludes []string
	SourceIncludes []string
	Version        *int
	VersionType    string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

ExistsSourceRequest configures the Exists Source API request.

func (ExistsSourceRequest) Do

func (r ExistsSourceRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Explain

type Explain func(index string, id string, o ...func(*ExplainRequest)) (*Response, error)

Explain returns information about why a specific matches (or doesn't match) a query.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html.

func (Explain) WithAnalyzeWildcard

func (f Explain) WithAnalyzeWildcard(v bool) func(*ExplainRequest)

WithAnalyzeWildcard - specify whether wildcards and prefix queries in the query string query should be analyzed (default: false).

func (Explain) WithAnalyzer

func (f Explain) WithAnalyzer(v string) func(*ExplainRequest)

WithAnalyzer - the analyzer for the query string query.

func (Explain) WithBody

func (f Explain) WithBody(v io.Reader) func(*ExplainRequest)

WithBody - The query definition using the Query DSL.

func (Explain) WithContext

func (f Explain) WithContext(v context.Context) func(*ExplainRequest)

WithContext sets the request context.

func (Explain) WithDefaultOperator

func (f Explain) WithDefaultOperator(v string) func(*ExplainRequest)

WithDefaultOperator - the default operator for query string query (and or or).

func (Explain) WithDf

func (f Explain) WithDf(v string) func(*ExplainRequest)

WithDf - the default field for query string query (default: _all).

func (Explain) WithDocumentType

func (f Explain) WithDocumentType(v string) func(*ExplainRequest)

WithDocumentType - the type of the document.

func (Explain) WithErrorTrace

func (f Explain) WithErrorTrace() func(*ExplainRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (Explain) WithFilterPath

func (f Explain) WithFilterPath(v ...string) func(*ExplainRequest)

WithFilterPath filters the properties of the response body.

func (Explain) WithHuman

func (f Explain) WithHuman() func(*ExplainRequest)

WithHuman makes statistical values human-readable.

func (Explain) WithLenient

func (f Explain) WithLenient(v bool) func(*ExplainRequest)

WithLenient - specify whether format-based query failures (such as providing text to a numeric field) should be ignored.

func (Explain) WithParent

func (f Explain) WithParent(v string) func(*ExplainRequest)

WithParent - the ID of the parent document.

func (Explain) WithPreference

func (f Explain) WithPreference(v string) func(*ExplainRequest)

WithPreference - specify the node or shard the operation should be performed on (default: random).

func (Explain) WithPretty

func (f Explain) WithPretty() func(*ExplainRequest)

WithPretty makes the response body pretty-printed.

func (Explain) WithQuery

func (f Explain) WithQuery(v string) func(*ExplainRequest)

WithQuery - query in the lucene query string syntax.

func (Explain) WithRouting

func (f Explain) WithRouting(v string) func(*ExplainRequest)

WithRouting - specific routing value.

func (Explain) WithSource

func (f Explain) WithSource(v ...string) func(*ExplainRequest)

WithSource - true or false to return the _source field or not, or a list of fields to return.

func (Explain) WithSourceExcludes

func (f Explain) WithSourceExcludes(v ...string) func(*ExplainRequest)

WithSourceExcludes - a list of fields to exclude from the returned _source field.

func (Explain) WithSourceIncludes

func (f Explain) WithSourceIncludes(v ...string) func(*ExplainRequest)

WithSourceIncludes - a list of fields to extract and return from the _source field.

func (Explain) WithStoredFields

func (f Explain) WithStoredFields(v ...string) func(*ExplainRequest)

WithStoredFields - a list of stored fields to return in the response.

type ExplainRequest

type ExplainRequest struct {
	Index        string
	DocumentType string
	DocumentID   string
	Body         io.Reader

	Analyzer        string
	AnalyzeWildcard *bool
	DefaultOperator string
	Df              string
	Lenient         *bool
	Parent          string
	Preference      string
	Query           string
	Routing         string
	Source          []string
	SourceExcludes  []string
	SourceIncludes  []string
	StoredFields    []string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

ExplainRequest configures the Explain API request.

func (ExplainRequest) Do

func (r ExplainRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type FieldCaps

type FieldCaps func(o ...func(*FieldCapsRequest)) (*Response, error)

FieldCaps returns the information about the capabilities of fields among multiple indices.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html.

func (FieldCaps) WithAllowNoIndices

func (f FieldCaps) WithAllowNoIndices(v bool) func(*FieldCapsRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (FieldCaps) WithContext

func (f FieldCaps) WithContext(v context.Context) func(*FieldCapsRequest)

WithContext sets the request context.

func (FieldCaps) WithErrorTrace

func (f FieldCaps) WithErrorTrace() func(*FieldCapsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (FieldCaps) WithExpandWildcards

func (f FieldCaps) WithExpandWildcards(v string) func(*FieldCapsRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (FieldCaps) WithFields

func (f FieldCaps) WithFields(v ...string) func(*FieldCapsRequest)

WithFields - a list of field names.

func (FieldCaps) WithFilterPath

func (f FieldCaps) WithFilterPath(v ...string) func(*FieldCapsRequest)

WithFilterPath filters the properties of the response body.

func (FieldCaps) WithHuman

func (f FieldCaps) WithHuman() func(*FieldCapsRequest)

WithHuman makes statistical values human-readable.

func (FieldCaps) WithIgnoreUnavailable

func (f FieldCaps) WithIgnoreUnavailable(v bool) func(*FieldCapsRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (FieldCaps) WithIndex

func (f FieldCaps) WithIndex(v ...string) func(*FieldCapsRequest)

WithIndex - a list of index names; use _all to perform the operation on all indices.

func (FieldCaps) WithPretty

func (f FieldCaps) WithPretty() func(*FieldCapsRequest)

WithPretty makes the response body pretty-printed.

type FieldCapsRequest

type FieldCapsRequest struct {
	Index []string

	AllowNoIndices    *bool
	ExpandWildcards   string
	Fields            []string
	IgnoreUnavailable *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

FieldCapsRequest configures the Field Caps API request.

func (FieldCapsRequest) Do

func (r FieldCapsRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Get

type Get func(index string, id string, o ...func(*GetRequest)) (*Response, error)

Get returns a document.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html.

func (Get) WithContext

func (f Get) WithContext(v context.Context) func(*GetRequest)

WithContext sets the request context.

func (Get) WithDocumentType

func (f Get) WithDocumentType(v string) func(*GetRequest)

WithDocumentType - the type of the document (use `_all` to fetch the first document matching the ID across all types).

func (Get) WithErrorTrace

func (f Get) WithErrorTrace() func(*GetRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (Get) WithFilterPath

func (f Get) WithFilterPath(v ...string) func(*GetRequest)

WithFilterPath filters the properties of the response body.

func (Get) WithHuman

func (f Get) WithHuman() func(*GetRequest)

WithHuman makes statistical values human-readable.

func (Get) WithParent

func (f Get) WithParent(v string) func(*GetRequest)

WithParent - the ID of the parent document.

func (Get) WithPreference

func (f Get) WithPreference(v string) func(*GetRequest)

WithPreference - specify the node or shard the operation should be performed on (default: random).

func (Get) WithPretty

func (f Get) WithPretty() func(*GetRequest)

WithPretty makes the response body pretty-printed.

func (Get) WithRealtime

func (f Get) WithRealtime(v bool) func(*GetRequest)

WithRealtime - specify whether to perform the operation in realtime or search mode.

func (Get) WithRefresh

func (f Get) WithRefresh(v bool) func(*GetRequest)

WithRefresh - refresh the shard containing the document before performing the operation.

func (Get) WithRouting

func (f Get) WithRouting(v string) func(*GetRequest)

WithRouting - specific routing value.

func (Get) WithSource

func (f Get) WithSource(v ...string) func(*GetRequest)

WithSource - true or false to return the _source field or not, or a list of fields to return.

func (Get) WithSourceExclude

func (f Get) WithSourceExclude(v ...string) func(*GetRequest)

WithSourceExclude - a list of fields to exclude from the returned _source field.

func (Get) WithSourceExcludes

func (f Get) WithSourceExcludes(v ...string) func(*GetRequest)

WithSourceExcludes - a list of fields to exclude from the returned _source field.

func (Get) WithSourceInclude

func (f Get) WithSourceInclude(v ...string) func(*GetRequest)

WithSourceInclude - a list of fields to extract and return from the _source field.

func (Get) WithSourceIncludes

func (f Get) WithSourceIncludes(v ...string) func(*GetRequest)

WithSourceIncludes - a list of fields to extract and return from the _source field.

func (Get) WithStoredFields

func (f Get) WithStoredFields(v ...string) func(*GetRequest)

WithStoredFields - a list of stored fields to return in the response.

func (Get) WithVersion

func (f Get) WithVersion(v int) func(*GetRequest)

WithVersion - explicit version number for concurrency control.

func (Get) WithVersionType

func (f Get) WithVersionType(v string) func(*GetRequest)

WithVersionType - specific version type.

type GetRequest

type GetRequest struct {
	Index        string
	DocumentType string
	DocumentID   string

	Parent         string
	Preference     string
	Realtime       *bool
	Refresh        *bool
	Routing        string
	Source         []string
	SourceExclude  []string
	SourceExcludes []string
	SourceInclude  []string
	SourceIncludes []string
	StoredFields   []string
	Version        *int
	VersionType    string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

GetRequest configures the Get API request.

func (GetRequest) Do

func (r GetRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type GetScript

type GetScript func(id string, o ...func(*GetScriptRequest)) (*Response, error)

GetScript returns a script.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html.

func (GetScript) WithContext

func (f GetScript) WithContext(v context.Context) func(*GetScriptRequest)

WithContext sets the request context.

func (GetScript) WithErrorTrace

func (f GetScript) WithErrorTrace() func(*GetScriptRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (GetScript) WithFilterPath

func (f GetScript) WithFilterPath(v ...string) func(*GetScriptRequest)

WithFilterPath filters the properties of the response body.

func (GetScript) WithHuman

func (f GetScript) WithHuman() func(*GetScriptRequest)

WithHuman makes statistical values human-readable.

func (GetScript) WithMasterTimeout

func (f GetScript) WithMasterTimeout(v time.Duration) func(*GetScriptRequest)

WithMasterTimeout - specify timeout for connection to master.

func (GetScript) WithPretty

func (f GetScript) WithPretty() func(*GetScriptRequest)

WithPretty makes the response body pretty-printed.

type GetScriptRequest

type GetScriptRequest struct {
	DocumentID string

	MasterTimeout time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

GetScriptRequest configures the Get Script API request.

func (GetScriptRequest) Do

func (r GetScriptRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type GetSource

type GetSource func(index string, id string, o ...func(*GetSourceRequest)) (*Response, error)

GetSource returns the source of a document.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html.

func (GetSource) WithContext

func (f GetSource) WithContext(v context.Context) func(*GetSourceRequest)

WithContext sets the request context.

func (GetSource) WithDocumentType

func (f GetSource) WithDocumentType(v string) func(*GetSourceRequest)

WithDocumentType - the type of the document; deprecated and optional starting with 7.0.

func (GetSource) WithErrorTrace

func (f GetSource) WithErrorTrace() func(*GetSourceRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (GetSource) WithFilterPath

func (f GetSource) WithFilterPath(v ...string) func(*GetSourceRequest)

WithFilterPath filters the properties of the response body.

func (GetSource) WithHuman

func (f GetSource) WithHuman() func(*GetSourceRequest)

WithHuman makes statistical values human-readable.

func (GetSource) WithParent

func (f GetSource) WithParent(v string) func(*GetSourceRequest)

WithParent - the ID of the parent document.

func (GetSource) WithPreference

func (f GetSource) WithPreference(v string) func(*GetSourceRequest)

WithPreference - specify the node or shard the operation should be performed on (default: random).

func (GetSource) WithPretty

func (f GetSource) WithPretty() func(*GetSourceRequest)

WithPretty makes the response body pretty-printed.

func (GetSource) WithRealtime

func (f GetSource) WithRealtime(v bool) func(*GetSourceRequest)

WithRealtime - specify whether to perform the operation in realtime or search mode.

func (GetSource) WithRefresh

func (f GetSource) WithRefresh(v bool) func(*GetSourceRequest)

WithRefresh - refresh the shard containing the document before performing the operation.

func (GetSource) WithRouting

func (f GetSource) WithRouting(v string) func(*GetSourceRequest)

WithRouting - specific routing value.

func (GetSource) WithSource

func (f GetSource) WithSource(v ...string) func(*GetSourceRequest)

WithSource - true or false to return the _source field or not, or a list of fields to return.

func (GetSource) WithSourceExcludes

func (f GetSource) WithSourceExcludes(v ...string) func(*GetSourceRequest)

WithSourceExcludes - a list of fields to exclude from the returned _source field.

func (GetSource) WithSourceIncludes

func (f GetSource) WithSourceIncludes(v ...string) func(*GetSourceRequest)

WithSourceIncludes - a list of fields to extract and return from the _source field.

func (GetSource) WithVersion

func (f GetSource) WithVersion(v int) func(*GetSourceRequest)

WithVersion - explicit version number for concurrency control.

func (GetSource) WithVersionType

func (f GetSource) WithVersionType(v string) func(*GetSourceRequest)

WithVersionType - specific version type.

type GetSourceRequest

type GetSourceRequest struct {
	Index        string
	DocumentType string
	DocumentID   string

	Parent         string
	Preference     string
	Realtime       *bool
	Refresh        *bool
	Routing        string
	Source         []string
	SourceExcludes []string
	SourceIncludes []string
	Version        *int
	VersionType    string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

GetSourceRequest configures the Get Source API request.

func (GetSourceRequest) Do

func (r GetSourceRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Index

type Index func(index string, body io.Reader, o ...func(*IndexRequest)) (*Response, error)

Index creates or updates a document in an index.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html.

func (Index) WithContext

func (f Index) WithContext(v context.Context) func(*IndexRequest)

WithContext sets the request context.

func (Index) WithDocumentID

func (f Index) WithDocumentID(v string) func(*IndexRequest)

WithDocumentID - document ID.

func (Index) WithDocumentType

func (f Index) WithDocumentType(v string) func(*IndexRequest)

WithDocumentType - the type of the document.

func (Index) WithErrorTrace

func (f Index) WithErrorTrace() func(*IndexRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (Index) WithFilterPath

func (f Index) WithFilterPath(v ...string) func(*IndexRequest)

WithFilterPath filters the properties of the response body.

func (Index) WithHuman

func (f Index) WithHuman() func(*IndexRequest)

WithHuman makes statistical values human-readable.

func (Index) WithIfPrimaryTerm

func (f Index) WithIfPrimaryTerm(v int) func(*IndexRequest)

WithIfPrimaryTerm - only perform the index operation if the last operation that has changed the document has the specified primary term.

func (Index) WithIfSeqNo

func (f Index) WithIfSeqNo(v int) func(*IndexRequest)

WithIfSeqNo - only perform the index operation if the last operation that has changed the document has the specified sequence number.

func (Index) WithOpType

func (f Index) WithOpType(v string) func(*IndexRequest)

WithOpType - explicit operation type.

func (Index) WithParent

func (f Index) WithParent(v string) func(*IndexRequest)

WithParent - ID of the parent document.

func (Index) WithPipeline

func (f Index) WithPipeline(v string) func(*IndexRequest)

WithPipeline - the pipeline ID to preprocess incoming documents with.

func (Index) WithPretty

func (f Index) WithPretty() func(*IndexRequest)

WithPretty makes the response body pretty-printed.

func (Index) WithRefresh

func (f Index) WithRefresh(v string) func(*IndexRequest)

WithRefresh - if `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes..

func (Index) WithRouting

func (f Index) WithRouting(v string) func(*IndexRequest)

WithRouting - specific routing value.

func (Index) WithTimeout

func (f Index) WithTimeout(v time.Duration) func(*IndexRequest)

WithTimeout - explicit operation timeout.

func (Index) WithVersion

func (f Index) WithVersion(v int) func(*IndexRequest)

WithVersion - explicit version number for concurrency control.

func (Index) WithVersionType

func (f Index) WithVersionType(v string) func(*IndexRequest)

WithVersionType - specific version type.

func (Index) WithWaitForActiveShards

func (f Index) WithWaitForActiveShards(v string) func(*IndexRequest)

WithWaitForActiveShards - sets the number of shard copies that must be active before proceeding with the index operation. defaults to 1, meaning the primary shard only. set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1).

type IndexRequest

type IndexRequest struct {
	Index        string
	DocumentType string
	DocumentID   string
	Body         io.Reader

	IfPrimaryTerm       *int
	IfSeqNo             *int
	OpType              string
	Parent              string
	Pipeline            string
	Refresh             string
	Routing             string
	Timeout             time.Duration
	Version             *int
	VersionType         string
	WaitForActiveShards string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndexRequest configures the Index API request.

func (IndexRequest) Do

func (r IndexRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Indices

type Indices struct {
	Analyze         IndicesAnalyze
	ClearCache      IndicesClearCache
	Close           IndicesClose
	Create          IndicesCreate
	Delete          IndicesDelete
	DeleteAlias     IndicesDeleteAlias
	DeleteTemplate  IndicesDeleteTemplate
	Exists          IndicesExists
	ExistsAlias     IndicesExistsAlias
	ExistsTemplate  IndicesExistsTemplate
	ExistsType      IndicesExistsType
	Flush           IndicesFlush
	FlushSynced     IndicesFlushSynced
	Forcemerge      IndicesForcemerge
	Get             IndicesGet
	GetAlias        IndicesGetAlias
	GetFieldMapping IndicesGetFieldMapping
	GetMapping      IndicesGetMapping
	GetSettings     IndicesGetSettings
	GetTemplate     IndicesGetTemplate
	GetUpgrade      IndicesGetUpgrade
	Open            IndicesOpen
	PutAlias        IndicesPutAlias
	PutMapping      IndicesPutMapping
	PutSettings     IndicesPutSettings
	PutTemplate     IndicesPutTemplate
	Recovery        IndicesRecovery
	Refresh         IndicesRefresh
	Rollover        IndicesRollover
	Segments        IndicesSegments
	ShardStores     IndicesShardStores
	Shrink          IndicesShrink
	Split           IndicesSplit
	Stats           IndicesStats
	UpdateAliases   IndicesUpdateAliases
	Upgrade         IndicesUpgrade
	ValidateQuery   IndicesValidateQuery
}

Indices contains the Indices APIs

type IndicesAnalyze

type IndicesAnalyze func(o ...func(*IndicesAnalyzeRequest)) (*Response, error)

IndicesAnalyze performs the analysis process on a text and return the tokens breakdown of the text.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html.

func (IndicesAnalyze) WithBody

func (f IndicesAnalyze) WithBody(v io.Reader) func(*IndicesAnalyzeRequest)

WithBody - Define analyzer/tokenizer parameters and the text on which the analysis should be performed.

func (IndicesAnalyze) WithContext

func (f IndicesAnalyze) WithContext(v context.Context) func(*IndicesAnalyzeRequest)

WithContext sets the request context.

func (IndicesAnalyze) WithErrorTrace

func (f IndicesAnalyze) WithErrorTrace() func(*IndicesAnalyzeRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesAnalyze) WithFilterPath

func (f IndicesAnalyze) WithFilterPath(v ...string) func(*IndicesAnalyzeRequest)

WithFilterPath filters the properties of the response body.

func (IndicesAnalyze) WithHuman

func (f IndicesAnalyze) WithHuman() func(*IndicesAnalyzeRequest)

WithHuman makes statistical values human-readable.

func (IndicesAnalyze) WithIndex

func (f IndicesAnalyze) WithIndex(v string) func(*IndicesAnalyzeRequest)

WithIndex - the name of the index to scope the operation.

func (IndicesAnalyze) WithPretty

func (f IndicesAnalyze) WithPretty() func(*IndicesAnalyzeRequest)

WithPretty makes the response body pretty-printed.

type IndicesAnalyzeRequest

type IndicesAnalyzeRequest struct {
	Index string
	Body  io.Reader

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesAnalyzeRequest configures the Indices Analyze API request.

func (IndicesAnalyzeRequest) Do

func (r IndicesAnalyzeRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type IndicesClearCache

type IndicesClearCache func(o ...func(*IndicesClearCacheRequest)) (*Response, error)

IndicesClearCache clears all or specific caches for one or more indices.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html.

func (IndicesClearCache) WithAllowNoIndices

func (f IndicesClearCache) WithAllowNoIndices(v bool) func(*IndicesClearCacheRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (IndicesClearCache) WithContext

WithContext sets the request context.

func (IndicesClearCache) WithErrorTrace

func (f IndicesClearCache) WithErrorTrace() func(*IndicesClearCacheRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesClearCache) WithExpandWildcards

func (f IndicesClearCache) WithExpandWildcards(v string) func(*IndicesClearCacheRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (IndicesClearCache) WithFielddata

func (f IndicesClearCache) WithFielddata(v bool) func(*IndicesClearCacheRequest)

WithFielddata - clear field data.

func (IndicesClearCache) WithFields

func (f IndicesClearCache) WithFields(v ...string) func(*IndicesClearCacheRequest)

WithFields - a list of fields to clear when using the `fielddata` parameter (default: all).

func (IndicesClearCache) WithFilterPath

func (f IndicesClearCache) WithFilterPath(v ...string) func(*IndicesClearCacheRequest)

WithFilterPath filters the properties of the response body.

func (IndicesClearCache) WithHuman

func (f IndicesClearCache) WithHuman() func(*IndicesClearCacheRequest)

WithHuman makes statistical values human-readable.

func (IndicesClearCache) WithIgnoreUnavailable

func (f IndicesClearCache) WithIgnoreUnavailable(v bool) func(*IndicesClearCacheRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (IndicesClearCache) WithIndex

func (f IndicesClearCache) WithIndex(v ...string) func(*IndicesClearCacheRequest)

WithIndex - a list of index name to limit the operation.

func (IndicesClearCache) WithPretty

func (f IndicesClearCache) WithPretty() func(*IndicesClearCacheRequest)

WithPretty makes the response body pretty-printed.

func (IndicesClearCache) WithQuery

func (f IndicesClearCache) WithQuery(v bool) func(*IndicesClearCacheRequest)

WithQuery - clear query caches.

func (IndicesClearCache) WithRequest

func (f IndicesClearCache) WithRequest(v bool) func(*IndicesClearCacheRequest)

WithRequest - clear request cache.

type IndicesClearCacheRequest

type IndicesClearCacheRequest struct {
	Index []string

	AllowNoIndices    *bool
	ExpandWildcards   string
	Fielddata         *bool
	Fields            []string
	IgnoreUnavailable *bool
	Query             *bool
	Request           *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesClearCacheRequest configures the Indices Clear Cache API request.

func (IndicesClearCacheRequest) Do

Do executes the request and returns response or error.

type IndicesClose

type IndicesClose func(index []string, o ...func(*IndicesCloseRequest)) (*Response, error)

IndicesClose closes an index.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html.

func (IndicesClose) WithAllowNoIndices

func (f IndicesClose) WithAllowNoIndices(v bool) func(*IndicesCloseRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (IndicesClose) WithContext

func (f IndicesClose) WithContext(v context.Context) func(*IndicesCloseRequest)

WithContext sets the request context.

func (IndicesClose) WithErrorTrace

func (f IndicesClose) WithErrorTrace() func(*IndicesCloseRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesClose) WithExpandWildcards

func (f IndicesClose) WithExpandWildcards(v string) func(*IndicesCloseRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (IndicesClose) WithFilterPath

func (f IndicesClose) WithFilterPath(v ...string) func(*IndicesCloseRequest)

WithFilterPath filters the properties of the response body.

func (IndicesClose) WithHuman

func (f IndicesClose) WithHuman() func(*IndicesCloseRequest)

WithHuman makes statistical values human-readable.

func (IndicesClose) WithIgnoreUnavailable

func (f IndicesClose) WithIgnoreUnavailable(v bool) func(*IndicesCloseRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (IndicesClose) WithMasterTimeout

func (f IndicesClose) WithMasterTimeout(v time.Duration) func(*IndicesCloseRequest)

WithMasterTimeout - specify timeout for connection to master.

func (IndicesClose) WithPretty

func (f IndicesClose) WithPretty() func(*IndicesCloseRequest)

WithPretty makes the response body pretty-printed.

func (IndicesClose) WithTimeout

func (f IndicesClose) WithTimeout(v time.Duration) func(*IndicesCloseRequest)

WithTimeout - explicit operation timeout.

type IndicesCloseRequest

type IndicesCloseRequest struct {
	Index []string

	AllowNoIndices    *bool
	ExpandWildcards   string
	IgnoreUnavailable *bool
	MasterTimeout     time.Duration
	Timeout           time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesCloseRequest configures the Indices Close API request.

func (IndicesCloseRequest) Do

func (r IndicesCloseRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type IndicesCreate

type IndicesCreate func(index string, o ...func(*IndicesCreateRequest)) (*Response, error)

IndicesCreate creates an index with optional settings and mappings.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html.

func (IndicesCreate) WithBody

func (f IndicesCreate) WithBody(v io.Reader) func(*IndicesCreateRequest)

WithBody - The configuration for the index (`settings` and `mappings`).

func (IndicesCreate) WithContext

func (f IndicesCreate) WithContext(v context.Context) func(*IndicesCreateRequest)

WithContext sets the request context.

func (IndicesCreate) WithErrorTrace

func (f IndicesCreate) WithErrorTrace() func(*IndicesCreateRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesCreate) WithFilterPath

func (f IndicesCreate) WithFilterPath(v ...string) func(*IndicesCreateRequest)

WithFilterPath filters the properties of the response body.

func (IndicesCreate) WithHuman

func (f IndicesCreate) WithHuman() func(*IndicesCreateRequest)

WithHuman makes statistical values human-readable.

func (IndicesCreate) WithIncludeTypeName

func (f IndicesCreate) WithIncludeTypeName(v bool) func(*IndicesCreateRequest)

WithIncludeTypeName - whether a type should be expected in the body of the mappings..

func (IndicesCreate) WithMasterTimeout

func (f IndicesCreate) WithMasterTimeout(v time.Duration) func(*IndicesCreateRequest)

WithMasterTimeout - specify timeout for connection to master.

func (IndicesCreate) WithPretty

func (f IndicesCreate) WithPretty() func(*IndicesCreateRequest)

WithPretty makes the response body pretty-printed.

func (IndicesCreate) WithTimeout

func (f IndicesCreate) WithTimeout(v time.Duration) func(*IndicesCreateRequest)

WithTimeout - explicit operation timeout.

func (IndicesCreate) WithWaitForActiveShards

func (f IndicesCreate) WithWaitForActiveShards(v string) func(*IndicesCreateRequest)

WithWaitForActiveShards - set the number of active shards to wait for before the operation returns..

type IndicesCreateRequest

type IndicesCreateRequest struct {
	Index string
	Body  io.Reader

	IncludeTypeName     *bool
	MasterTimeout       time.Duration
	Timeout             time.Duration
	WaitForActiveShards string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesCreateRequest configures the Indices Create API request.

func (IndicesCreateRequest) Do

func (r IndicesCreateRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type IndicesDelete

type IndicesDelete func(index []string, o ...func(*IndicesDeleteRequest)) (*Response, error)

IndicesDelete deletes an index.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html.

func (IndicesDelete) WithAllowNoIndices

func (f IndicesDelete) WithAllowNoIndices(v bool) func(*IndicesDeleteRequest)

WithAllowNoIndices - ignore if a wildcard expression resolves to no concrete indices (default: false).

func (IndicesDelete) WithContext

func (f IndicesDelete) WithContext(v context.Context) func(*IndicesDeleteRequest)

WithContext sets the request context.

func (IndicesDelete) WithErrorTrace

func (f IndicesDelete) WithErrorTrace() func(*IndicesDeleteRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesDelete) WithExpandWildcards

func (f IndicesDelete) WithExpandWildcards(v string) func(*IndicesDeleteRequest)

WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open).

func (IndicesDelete) WithFilterPath

func (f IndicesDelete) WithFilterPath(v ...string) func(*IndicesDeleteRequest)

WithFilterPath filters the properties of the response body.

func (IndicesDelete) WithHuman

func (f IndicesDelete) WithHuman() func(*IndicesDeleteRequest)

WithHuman makes statistical values human-readable.

func (IndicesDelete) WithIgnoreUnavailable

func (f IndicesDelete) WithIgnoreUnavailable(v bool) func(*IndicesDeleteRequest)

WithIgnoreUnavailable - ignore unavailable indexes (default: false).

func (IndicesDelete) WithMasterTimeout

func (f IndicesDelete) WithMasterTimeout(v time.Duration) func(*IndicesDeleteRequest)

WithMasterTimeout - specify timeout for connection to master.

func (IndicesDelete) WithPretty

func (f IndicesDelete) WithPretty() func(*IndicesDeleteRequest)

WithPretty makes the response body pretty-printed.

func (IndicesDelete) WithTimeout

func (f IndicesDelete) WithTimeout(v time.Duration) func(*IndicesDeleteRequest)

WithTimeout - explicit operation timeout.

type IndicesDeleteAlias

type IndicesDeleteAlias func(index []string, name []string, o ...func(*IndicesDeleteAliasRequest)) (*Response, error)

IndicesDeleteAlias deletes an alias.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html.

func (IndicesDeleteAlias) WithContext

WithContext sets the request context.

func (IndicesDeleteAlias) WithErrorTrace

func (f IndicesDeleteAlias) WithErrorTrace() func(*IndicesDeleteAliasRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesDeleteAlias) WithFilterPath

func (f IndicesDeleteAlias) WithFilterPath(v ...string) func(*IndicesDeleteAliasRequest)

WithFilterPath filters the properties of the response body.

func (IndicesDeleteAlias) WithHuman

func (f IndicesDeleteAlias) WithHuman() func(*IndicesDeleteAliasRequest)

WithHuman makes statistical values human-readable.

func (IndicesDeleteAlias) WithMasterTimeout

func (f IndicesDeleteAlias) WithMasterTimeout(v time.Duration) func(*IndicesDeleteAliasRequest)

WithMasterTimeout - specify timeout for connection to master.

func (IndicesDeleteAlias) WithPretty

func (f IndicesDeleteAlias) WithPretty() func(*IndicesDeleteAliasRequest)

WithPretty makes the response body pretty-printed.

func (IndicesDeleteAlias) WithTimeout

WithTimeout - explicit timestamp for the document.

type IndicesDeleteAliasRequest

type IndicesDeleteAliasRequest struct {
	Index []string

	Name          []string
	MasterTimeout time.Duration
	Timeout       time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesDeleteAliasRequest configures the Indices Delete Alias API request.

func (IndicesDeleteAliasRequest) Do

Do executes the request and returns response or error.

type IndicesDeleteRequest

type IndicesDeleteRequest struct {
	Index []string

	AllowNoIndices    *bool
	ExpandWildcards   string
	IgnoreUnavailable *bool
	MasterTimeout     time.Duration
	Timeout           time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesDeleteRequest configures the Indices Delete API request.

func (IndicesDeleteRequest) Do

func (r IndicesDeleteRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type IndicesDeleteTemplate

type IndicesDeleteTemplate func(name string, o ...func(*IndicesDeleteTemplateRequest)) (*Response, error)

IndicesDeleteTemplate deletes an index template.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html.

func (IndicesDeleteTemplate) WithContext

WithContext sets the request context.

func (IndicesDeleteTemplate) WithErrorTrace

func (f IndicesDeleteTemplate) WithErrorTrace() func(*IndicesDeleteTemplateRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesDeleteTemplate) WithFilterPath

func (f IndicesDeleteTemplate) WithFilterPath(v ...string) func(*IndicesDeleteTemplateRequest)

WithFilterPath filters the properties of the response body.

func (IndicesDeleteTemplate) WithHuman

WithHuman makes statistical values human-readable.

func (IndicesDeleteTemplate) WithMasterTimeout

func (f IndicesDeleteTemplate) WithMasterTimeout(v time.Duration) func(*IndicesDeleteTemplateRequest)

WithMasterTimeout - specify timeout for connection to master.

func (IndicesDeleteTemplate) WithPretty

WithPretty makes the response body pretty-printed.

func (IndicesDeleteTemplate) WithTimeout

WithTimeout - explicit operation timeout.

type IndicesDeleteTemplateRequest

type IndicesDeleteTemplateRequest struct {
	Name          string
	MasterTimeout time.Duration
	Timeout       time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesDeleteTemplateRequest configures the Indices Delete Template API request.

func (IndicesDeleteTemplateRequest) Do

Do executes the request and returns response or error.

type IndicesExists

type IndicesExists func(index []string, o ...func(*IndicesExistsRequest)) (*Response, error)

IndicesExists returns information about whether a particular index exists.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html.

func (IndicesExists) WithAllowNoIndices

func (f IndicesExists) WithAllowNoIndices(v bool) func(*IndicesExistsRequest)

WithAllowNoIndices - ignore if a wildcard expression resolves to no concrete indices (default: false).

func (IndicesExists) WithContext

func (f IndicesExists) WithContext(v context.Context) func(*IndicesExistsRequest)

WithContext sets the request context.

func (IndicesExists) WithErrorTrace

func (f IndicesExists) WithErrorTrace() func(*IndicesExistsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesExists) WithExpandWildcards

func (f IndicesExists) WithExpandWildcards(v string) func(*IndicesExistsRequest)

WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open).

func (IndicesExists) WithFilterPath

func (f IndicesExists) WithFilterPath(v ...string) func(*IndicesExistsRequest)

WithFilterPath filters the properties of the response body.

func (IndicesExists) WithFlatSettings

func (f IndicesExists) WithFlatSettings(v bool) func(*IndicesExistsRequest)

WithFlatSettings - return settings in flat format (default: false).

func (IndicesExists) WithHuman

func (f IndicesExists) WithHuman() func(*IndicesExistsRequest)

WithHuman makes statistical values human-readable.

func (IndicesExists) WithIgnoreUnavailable

func (f IndicesExists) WithIgnoreUnavailable(v bool) func(*IndicesExistsRequest)

WithIgnoreUnavailable - ignore unavailable indexes (default: false).

func (IndicesExists) WithIncludeDefaults

func (f IndicesExists) WithIncludeDefaults(v bool) func(*IndicesExistsRequest)

WithIncludeDefaults - whether to return all default setting for each of the indices..

func (IndicesExists) WithLocal

func (f IndicesExists) WithLocal(v bool) func(*IndicesExistsRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (IndicesExists) WithPretty

func (f IndicesExists) WithPretty() func(*IndicesExistsRequest)

WithPretty makes the response body pretty-printed.

type IndicesExistsAlias

type IndicesExistsAlias func(name []string, o ...func(*IndicesExistsAliasRequest)) (*Response, error)

IndicesExistsAlias returns information about whether a particular alias exists.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html.

func (IndicesExistsAlias) WithAllowNoIndices

func (f IndicesExistsAlias) WithAllowNoIndices(v bool) func(*IndicesExistsAliasRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (IndicesExistsAlias) WithContext

WithContext sets the request context.

func (IndicesExistsAlias) WithErrorTrace

func (f IndicesExistsAlias) WithErrorTrace() func(*IndicesExistsAliasRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesExistsAlias) WithExpandWildcards

func (f IndicesExistsAlias) WithExpandWildcards(v string) func(*IndicesExistsAliasRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (IndicesExistsAlias) WithFilterPath

func (f IndicesExistsAlias) WithFilterPath(v ...string) func(*IndicesExistsAliasRequest)

WithFilterPath filters the properties of the response body.

func (IndicesExistsAlias) WithHuman

func (f IndicesExistsAlias) WithHuman() func(*IndicesExistsAliasRequest)

WithHuman makes statistical values human-readable.

func (IndicesExistsAlias) WithIgnoreUnavailable

func (f IndicesExistsAlias) WithIgnoreUnavailable(v bool) func(*IndicesExistsAliasRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (IndicesExistsAlias) WithIndex

func (f IndicesExistsAlias) WithIndex(v ...string) func(*IndicesExistsAliasRequest)

WithIndex - a list of index names to filter aliases.

func (IndicesExistsAlias) WithLocal

func (f IndicesExistsAlias) WithLocal(v bool) func(*IndicesExistsAliasRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (IndicesExistsAlias) WithPretty

func (f IndicesExistsAlias) WithPretty() func(*IndicesExistsAliasRequest)

WithPretty makes the response body pretty-printed.

type IndicesExistsAliasRequest

type IndicesExistsAliasRequest struct {
	Index []string

	Name              []string
	AllowNoIndices    *bool
	ExpandWildcards   string
	IgnoreUnavailable *bool
	Local             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesExistsAliasRequest configures the Indices Exists Alias API request.

func (IndicesExistsAliasRequest) Do

Do executes the request and returns response or error.

type IndicesExistsRequest

type IndicesExistsRequest struct {
	Index []string

	AllowNoIndices    *bool
	ExpandWildcards   string
	FlatSettings      *bool
	IgnoreUnavailable *bool
	IncludeDefaults   *bool
	Local             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesExistsRequest configures the Indices Exists API request.

func (IndicesExistsRequest) Do

func (r IndicesExistsRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type IndicesExistsTemplate

type IndicesExistsTemplate func(name []string, o ...func(*IndicesExistsTemplateRequest)) (*Response, error)

IndicesExistsTemplate returns information about whether a particular index template exists.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html.

func (IndicesExistsTemplate) WithContext

WithContext sets the request context.

func (IndicesExistsTemplate) WithErrorTrace

func (f IndicesExistsTemplate) WithErrorTrace() func(*IndicesExistsTemplateRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesExistsTemplate) WithFilterPath

func (f IndicesExistsTemplate) WithFilterPath(v ...string) func(*IndicesExistsTemplateRequest)

WithFilterPath filters the properties of the response body.

func (IndicesExistsTemplate) WithFlatSettings

func (f IndicesExistsTemplate) WithFlatSettings(v bool) func(*IndicesExistsTemplateRequest)

WithFlatSettings - return settings in flat format (default: false).

func (IndicesExistsTemplate) WithHuman

WithHuman makes statistical values human-readable.

func (IndicesExistsTemplate) WithLocal

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (IndicesExistsTemplate) WithMasterTimeout

func (f IndicesExistsTemplate) WithMasterTimeout(v time.Duration) func(*IndicesExistsTemplateRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (IndicesExistsTemplate) WithPretty

WithPretty makes the response body pretty-printed.

type IndicesExistsTemplateRequest

type IndicesExistsTemplateRequest struct {
	Name          []string
	FlatSettings  *bool
	Local         *bool
	MasterTimeout time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesExistsTemplateRequest configures the Indices Exists Template API request.

func (IndicesExistsTemplateRequest) Do

Do executes the request and returns response or error.

type IndicesExistsType

type IndicesExistsType func(index []string, o ...func(*IndicesExistsTypeRequest)) (*Response, error)

IndicesExistsType returns information about whether a particular document type exists. (DEPRECATED)

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html.

func (IndicesExistsType) WithAllowNoIndices

func (f IndicesExistsType) WithAllowNoIndices(v bool) func(*IndicesExistsTypeRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (IndicesExistsType) WithContext

WithContext sets the request context.

func (IndicesExistsType) WithDocumentType

func (f IndicesExistsType) WithDocumentType(v ...string) func(*IndicesExistsTypeRequest)

WithDocumentType - a list of document types to check.

func (IndicesExistsType) WithErrorTrace

func (f IndicesExistsType) WithErrorTrace() func(*IndicesExistsTypeRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesExistsType) WithExpandWildcards

func (f IndicesExistsType) WithExpandWildcards(v string) func(*IndicesExistsTypeRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (IndicesExistsType) WithFilterPath

func (f IndicesExistsType) WithFilterPath(v ...string) func(*IndicesExistsTypeRequest)

WithFilterPath filters the properties of the response body.

func (IndicesExistsType) WithHuman

func (f IndicesExistsType) WithHuman() func(*IndicesExistsTypeRequest)

WithHuman makes statistical values human-readable.

func (IndicesExistsType) WithIgnoreUnavailable

func (f IndicesExistsType) WithIgnoreUnavailable(v bool) func(*IndicesExistsTypeRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (IndicesExistsType) WithLocal

func (f IndicesExistsType) WithLocal(v bool) func(*IndicesExistsTypeRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (IndicesExistsType) WithPretty

func (f IndicesExistsType) WithPretty() func(*IndicesExistsTypeRequest)

WithPretty makes the response body pretty-printed.

type IndicesExistsTypeRequest

type IndicesExistsTypeRequest struct {
	Index        []string
	DocumentType []string

	AllowNoIndices    *bool
	ExpandWildcards   string
	IgnoreUnavailable *bool
	Local             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesExistsTypeRequest configures the Indices Exists Type API request.

func (IndicesExistsTypeRequest) Do

Do executes the request and returns response or error.

type IndicesFlush

type IndicesFlush func(o ...func(*IndicesFlushRequest)) (*Response, error)

IndicesFlush performs the flush operation on one or more indices.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html.

func (IndicesFlush) WithAllowNoIndices

func (f IndicesFlush) WithAllowNoIndices(v bool) func(*IndicesFlushRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (IndicesFlush) WithContext

func (f IndicesFlush) WithContext(v context.Context) func(*IndicesFlushRequest)

WithContext sets the request context.

func (IndicesFlush) WithErrorTrace

func (f IndicesFlush) WithErrorTrace() func(*IndicesFlushRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesFlush) WithExpandWildcards

func (f IndicesFlush) WithExpandWildcards(v string) func(*IndicesFlushRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (IndicesFlush) WithFilterPath

func (f IndicesFlush) WithFilterPath(v ...string) func(*IndicesFlushRequest)

WithFilterPath filters the properties of the response body.

func (IndicesFlush) WithForce

func (f IndicesFlush) WithForce(v bool) func(*IndicesFlushRequest)

WithForce - 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).

func (IndicesFlush) WithHuman

func (f IndicesFlush) WithHuman() func(*IndicesFlushRequest)

WithHuman makes statistical values human-readable.

func (IndicesFlush) WithIgnoreUnavailable

func (f IndicesFlush) WithIgnoreUnavailable(v bool) func(*IndicesFlushRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (IndicesFlush) WithIndex

func (f IndicesFlush) WithIndex(v ...string) func(*IndicesFlushRequest)

WithIndex - a list of index names; use _all for all indices.

func (IndicesFlush) WithPretty

func (f IndicesFlush) WithPretty() func(*IndicesFlushRequest)

WithPretty makes the response body pretty-printed.

func (IndicesFlush) WithWaitIfOngoing

func (f IndicesFlush) WithWaitIfOngoing(v bool) func(*IndicesFlushRequest)

WithWaitIfOngoing - 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..

type IndicesFlushRequest

type IndicesFlushRequest struct {
	Index []string

	AllowNoIndices    *bool
	ExpandWildcards   string
	Force             *bool
	IgnoreUnavailable *bool
	WaitIfOngoing     *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesFlushRequest configures the Indices Flush API request.

func (IndicesFlushRequest) Do

func (r IndicesFlushRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type IndicesFlushSynced

type IndicesFlushSynced func(o ...func(*IndicesFlushSyncedRequest)) (*Response, error)

IndicesFlushSynced performs a synced flush operation on one or more indices.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush.html.

func (IndicesFlushSynced) WithAllowNoIndices

func (f IndicesFlushSynced) WithAllowNoIndices(v bool) func(*IndicesFlushSyncedRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (IndicesFlushSynced) WithContext

WithContext sets the request context.

func (IndicesFlushSynced) WithErrorTrace

func (f IndicesFlushSynced) WithErrorTrace() func(*IndicesFlushSyncedRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesFlushSynced) WithExpandWildcards

func (f IndicesFlushSynced) WithExpandWildcards(v string) func(*IndicesFlushSyncedRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (IndicesFlushSynced) WithFilterPath

func (f IndicesFlushSynced) WithFilterPath(v ...string) func(*IndicesFlushSyncedRequest)

WithFilterPath filters the properties of the response body.

func (IndicesFlushSynced) WithHuman

func (f IndicesFlushSynced) WithHuman() func(*IndicesFlushSyncedRequest)

WithHuman makes statistical values human-readable.

func (IndicesFlushSynced) WithIgnoreUnavailable

func (f IndicesFlushSynced) WithIgnoreUnavailable(v bool) func(*IndicesFlushSyncedRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (IndicesFlushSynced) WithIndex

func (f IndicesFlushSynced) WithIndex(v ...string) func(*IndicesFlushSyncedRequest)

WithIndex - a list of index names; use _all for all indices.

func (IndicesFlushSynced) WithPretty

func (f IndicesFlushSynced) WithPretty() func(*IndicesFlushSyncedRequest)

WithPretty makes the response body pretty-printed.

type IndicesFlushSyncedRequest

type IndicesFlushSyncedRequest struct {
	Index []string

	AllowNoIndices    *bool
	ExpandWildcards   string
	IgnoreUnavailable *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesFlushSyncedRequest configures the Indices Flush Synced API request.

func (IndicesFlushSyncedRequest) Do

Do executes the request and returns response or error.

type IndicesForcemerge

type IndicesForcemerge func(o ...func(*IndicesForcemergeRequest)) (*Response, error)

IndicesForcemerge performs the force merge operation on one or more indices.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html.

func (IndicesForcemerge) WithAllowNoIndices

func (f IndicesForcemerge) WithAllowNoIndices(v bool) func(*IndicesForcemergeRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (IndicesForcemerge) WithContext

WithContext sets the request context.

func (IndicesForcemerge) WithErrorTrace

func (f IndicesForcemerge) WithErrorTrace() func(*IndicesForcemergeRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesForcemerge) WithExpandWildcards

func (f IndicesForcemerge) WithExpandWildcards(v string) func(*IndicesForcemergeRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (IndicesForcemerge) WithFilterPath

func (f IndicesForcemerge) WithFilterPath(v ...string) func(*IndicesForcemergeRequest)

WithFilterPath filters the properties of the response body.

func (IndicesForcemerge) WithFlush

func (f IndicesForcemerge) WithFlush(v bool) func(*IndicesForcemergeRequest)

WithFlush - specify whether the index should be flushed after performing the operation (default: true).

func (IndicesForcemerge) WithHuman

func (f IndicesForcemerge) WithHuman() func(*IndicesForcemergeRequest)

WithHuman makes statistical values human-readable.

func (IndicesForcemerge) WithIgnoreUnavailable

func (f IndicesForcemerge) WithIgnoreUnavailable(v bool) func(*IndicesForcemergeRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (IndicesForcemerge) WithIndex

func (f IndicesForcemerge) WithIndex(v ...string) func(*IndicesForcemergeRequest)

WithIndex - a list of index names; use _all to perform the operation on all indices.

func (IndicesForcemerge) WithMaxNumSegments

func (f IndicesForcemerge) WithMaxNumSegments(v int) func(*IndicesForcemergeRequest)

WithMaxNumSegments - the number of segments the index should be merged into (default: dynamic).

func (IndicesForcemerge) WithOnlyExpungeDeletes

func (f IndicesForcemerge) WithOnlyExpungeDeletes(v bool) func(*IndicesForcemergeRequest)

WithOnlyExpungeDeletes - specify whether the operation should only expunge deleted documents.

func (IndicesForcemerge) WithPretty

func (f IndicesForcemerge) WithPretty() func(*IndicesForcemergeRequest)

WithPretty makes the response body pretty-printed.

type IndicesForcemergeRequest

type IndicesForcemergeRequest struct {
	Index []string

	AllowNoIndices     *bool
	ExpandWildcards    string
	Flush              *bool
	IgnoreUnavailable  *bool
	MaxNumSegments     *int
	OnlyExpungeDeletes *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesForcemergeRequest configures the Indices Forcemerge API request.

func (IndicesForcemergeRequest) Do

Do executes the request and returns response or error.

type IndicesGet

type IndicesGet func(index []string, o ...func(*IndicesGetRequest)) (*Response, error)

IndicesGet returns information about one or more indices.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html.

func (IndicesGet) WithAllowNoIndices

func (f IndicesGet) WithAllowNoIndices(v bool) func(*IndicesGetRequest)

WithAllowNoIndices - ignore if a wildcard expression resolves to no concrete indices (default: false).

func (IndicesGet) WithContext

func (f IndicesGet) WithContext(v context.Context) func(*IndicesGetRequest)

WithContext sets the request context.

func (IndicesGet) WithErrorTrace

func (f IndicesGet) WithErrorTrace() func(*IndicesGetRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesGet) WithExpandWildcards

func (f IndicesGet) WithExpandWildcards(v string) func(*IndicesGetRequest)

WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open).

func (IndicesGet) WithFilterPath

func (f IndicesGet) WithFilterPath(v ...string) func(*IndicesGetRequest)

WithFilterPath filters the properties of the response body.

func (IndicesGet) WithFlatSettings

func (f IndicesGet) WithFlatSettings(v bool) func(*IndicesGetRequest)

WithFlatSettings - return settings in flat format (default: false).

func (IndicesGet) WithHuman

func (f IndicesGet) WithHuman() func(*IndicesGetRequest)

WithHuman makes statistical values human-readable.

func (IndicesGet) WithIgnoreUnavailable

func (f IndicesGet) WithIgnoreUnavailable(v bool) func(*IndicesGetRequest)

WithIgnoreUnavailable - ignore unavailable indexes (default: false).

func (IndicesGet) WithIncludeDefaults

func (f IndicesGet) WithIncludeDefaults(v bool) func(*IndicesGetRequest)

WithIncludeDefaults - whether to return all default setting for each of the indices..

func (IndicesGet) WithIncludeTypeName

func (f IndicesGet) WithIncludeTypeName(v bool) func(*IndicesGetRequest)

WithIncludeTypeName - whether to add the type name to the response (default: false).

func (IndicesGet) WithLocal

func (f IndicesGet) WithLocal(v bool) func(*IndicesGetRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (IndicesGet) WithMasterTimeout

func (f IndicesGet) WithMasterTimeout(v time.Duration) func(*IndicesGetRequest)

WithMasterTimeout - specify timeout for connection to master.

func (IndicesGet) WithPretty

func (f IndicesGet) WithPretty() func(*IndicesGetRequest)

WithPretty makes the response body pretty-printed.

type IndicesGetAlias

type IndicesGetAlias func(o ...func(*IndicesGetAliasRequest)) (*Response, error)

IndicesGetAlias returns an alias.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html.

func (IndicesGetAlias) WithAllowNoIndices

func (f IndicesGetAlias) WithAllowNoIndices(v bool) func(*IndicesGetAliasRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (IndicesGetAlias) WithContext

func (f IndicesGetAlias) WithContext(v context.Context) func(*IndicesGetAliasRequest)

WithContext sets the request context.

func (IndicesGetAlias) WithErrorTrace

func (f IndicesGetAlias) WithErrorTrace() func(*IndicesGetAliasRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesGetAlias) WithExpandWildcards

func (f IndicesGetAlias) WithExpandWildcards(v string) func(*IndicesGetAliasRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (IndicesGetAlias) WithFilterPath

func (f IndicesGetAlias) WithFilterPath(v ...string) func(*IndicesGetAliasRequest)

WithFilterPath filters the properties of the response body.

func (IndicesGetAlias) WithHuman

func (f IndicesGetAlias) WithHuman() func(*IndicesGetAliasRequest)

WithHuman makes statistical values human-readable.

func (IndicesGetAlias) WithIgnoreUnavailable

func (f IndicesGetAlias) WithIgnoreUnavailable(v bool) func(*IndicesGetAliasRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (IndicesGetAlias) WithIndex

func (f IndicesGetAlias) WithIndex(v ...string) func(*IndicesGetAliasRequest)

WithIndex - a list of index names to filter aliases.

func (IndicesGetAlias) WithLocal

func (f IndicesGetAlias) WithLocal(v bool) func(*IndicesGetAliasRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (IndicesGetAlias) WithName

func (f IndicesGetAlias) WithName(v ...string) func(*IndicesGetAliasRequest)

WithName - a list of alias names to return.

func (IndicesGetAlias) WithPretty

func (f IndicesGetAlias) WithPretty() func(*IndicesGetAliasRequest)

WithPretty makes the response body pretty-printed.

type IndicesGetAliasRequest

type IndicesGetAliasRequest struct {
	Index []string

	Name              []string
	AllowNoIndices    *bool
	ExpandWildcards   string
	IgnoreUnavailable *bool
	Local             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesGetAliasRequest configures the Indices Get Alias API request.

func (IndicesGetAliasRequest) Do

func (r IndicesGetAliasRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type IndicesGetFieldMapping

type IndicesGetFieldMapping func(fields []string, o ...func(*IndicesGetFieldMappingRequest)) (*Response, error)

IndicesGetFieldMapping returns mapping for one or more fields.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html.

func (IndicesGetFieldMapping) WithAllowNoIndices

func (f IndicesGetFieldMapping) WithAllowNoIndices(v bool) func(*IndicesGetFieldMappingRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (IndicesGetFieldMapping) WithContext

WithContext sets the request context.

func (IndicesGetFieldMapping) WithDocumentType

func (f IndicesGetFieldMapping) WithDocumentType(v ...string) func(*IndicesGetFieldMappingRequest)

WithDocumentType - a list of document types.

func (IndicesGetFieldMapping) WithErrorTrace

func (f IndicesGetFieldMapping) WithErrorTrace() func(*IndicesGetFieldMappingRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesGetFieldMapping) WithExpandWildcards

func (f IndicesGetFieldMapping) WithExpandWildcards(v string) func(*IndicesGetFieldMappingRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (IndicesGetFieldMapping) WithFilterPath

func (f IndicesGetFieldMapping) WithFilterPath(v ...string) func(*IndicesGetFieldMappingRequest)

WithFilterPath filters the properties of the response body.

func (IndicesGetFieldMapping) WithHuman

WithHuman makes statistical values human-readable.

func (IndicesGetFieldMapping) WithIgnoreUnavailable

func (f IndicesGetFieldMapping) WithIgnoreUnavailable(v bool) func(*IndicesGetFieldMappingRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (IndicesGetFieldMapping) WithIncludeDefaults

func (f IndicesGetFieldMapping) WithIncludeDefaults(v bool) func(*IndicesGetFieldMappingRequest)

WithIncludeDefaults - whether the default mapping values should be returned as well.

func (IndicesGetFieldMapping) WithIncludeTypeName

func (f IndicesGetFieldMapping) WithIncludeTypeName(v bool) func(*IndicesGetFieldMappingRequest)

WithIncludeTypeName - whether a type should be returned in the body of the mappings..

func (IndicesGetFieldMapping) WithIndex

WithIndex - a list of index names.

func (IndicesGetFieldMapping) WithLocal

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (IndicesGetFieldMapping) WithPretty

WithPretty makes the response body pretty-printed.

type IndicesGetFieldMappingRequest

type IndicesGetFieldMappingRequest struct {
	Index        []string
	DocumentType []string

	Fields            []string
	AllowNoIndices    *bool
	ExpandWildcards   string
	IgnoreUnavailable *bool
	IncludeDefaults   *bool
	IncludeTypeName   *bool
	Local             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesGetFieldMappingRequest configures the Indices Get Field Mapping API request.

func (IndicesGetFieldMappingRequest) Do

Do executes the request and returns response or error.

type IndicesGetMapping

type IndicesGetMapping func(o ...func(*IndicesGetMappingRequest)) (*Response, error)

IndicesGetMapping returns mappings for one or more indices.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html.

func (IndicesGetMapping) WithAllowNoIndices

func (f IndicesGetMapping) WithAllowNoIndices(v bool) func(*IndicesGetMappingRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (IndicesGetMapping) WithContext

WithContext sets the request context.

func (IndicesGetMapping) WithDocumentType

func (f IndicesGetMapping) WithDocumentType(v ...string) func(*IndicesGetMappingRequest)

WithDocumentType - a list of document types.

func (IndicesGetMapping) WithErrorTrace

func (f IndicesGetMapping) WithErrorTrace() func(*IndicesGetMappingRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesGetMapping) WithExpandWildcards

func (f IndicesGetMapping) WithExpandWildcards(v string) func(*IndicesGetMappingRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (IndicesGetMapping) WithFilterPath

func (f IndicesGetMapping) WithFilterPath(v ...string) func(*IndicesGetMappingRequest)

WithFilterPath filters the properties of the response body.

func (IndicesGetMapping) WithHuman

func (f IndicesGetMapping) WithHuman() func(*IndicesGetMappingRequest)

WithHuman makes statistical values human-readable.

func (IndicesGetMapping) WithIgnoreUnavailable

func (f IndicesGetMapping) WithIgnoreUnavailable(v bool) func(*IndicesGetMappingRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (IndicesGetMapping) WithIncludeTypeName

func (f IndicesGetMapping) WithIncludeTypeName(v bool) func(*IndicesGetMappingRequest)

WithIncludeTypeName - whether to add the type name to the response (default: false).

func (IndicesGetMapping) WithIndex

func (f IndicesGetMapping) WithIndex(v ...string) func(*IndicesGetMappingRequest)

WithIndex - a list of index names.

func (IndicesGetMapping) WithLocal

func (f IndicesGetMapping) WithLocal(v bool) func(*IndicesGetMappingRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (IndicesGetMapping) WithMasterTimeout

func (f IndicesGetMapping) WithMasterTimeout(v time.Duration) func(*IndicesGetMappingRequest)

WithMasterTimeout - specify timeout for connection to master.

func (IndicesGetMapping) WithPretty

func (f IndicesGetMapping) WithPretty() func(*IndicesGetMappingRequest)

WithPretty makes the response body pretty-printed.

type IndicesGetMappingRequest

type IndicesGetMappingRequest struct {
	Index        []string
	DocumentType []string

	AllowNoIndices    *bool
	ExpandWildcards   string
	IgnoreUnavailable *bool
	IncludeTypeName   *bool
	Local             *bool
	MasterTimeout     time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesGetMappingRequest configures the Indices Get Mapping API request.

func (IndicesGetMappingRequest) Do

Do executes the request and returns response or error.

type IndicesGetRequest

type IndicesGetRequest struct {
	Index []string

	AllowNoIndices    *bool
	ExpandWildcards   string
	FlatSettings      *bool
	IgnoreUnavailable *bool
	IncludeDefaults   *bool
	IncludeTypeName   *bool
	Local             *bool
	MasterTimeout     time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesGetRequest configures the Indices Get API request.

func (IndicesGetRequest) Do

func (r IndicesGetRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type IndicesGetSettings

type IndicesGetSettings func(o ...func(*IndicesGetSettingsRequest)) (*Response, error)

IndicesGetSettings returns settings for one or more indices.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html.

func (IndicesGetSettings) WithAllowNoIndices

func (f IndicesGetSettings) WithAllowNoIndices(v bool) func(*IndicesGetSettingsRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (IndicesGetSettings) WithContext

WithContext sets the request context.

func (IndicesGetSettings) WithErrorTrace

func (f IndicesGetSettings) WithErrorTrace() func(*IndicesGetSettingsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesGetSettings) WithExpandWildcards

func (f IndicesGetSettings) WithExpandWildcards(v string) func(*IndicesGetSettingsRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (IndicesGetSettings) WithFilterPath

func (f IndicesGetSettings) WithFilterPath(v ...string) func(*IndicesGetSettingsRequest)

WithFilterPath filters the properties of the response body.

func (IndicesGetSettings) WithFlatSettings

func (f IndicesGetSettings) WithFlatSettings(v bool) func(*IndicesGetSettingsRequest)

WithFlatSettings - return settings in flat format (default: false).

func (IndicesGetSettings) WithHuman

func (f IndicesGetSettings) WithHuman() func(*IndicesGetSettingsRequest)

WithHuman makes statistical values human-readable.

func (IndicesGetSettings) WithIgnoreUnavailable

func (f IndicesGetSettings) WithIgnoreUnavailable(v bool) func(*IndicesGetSettingsRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (IndicesGetSettings) WithIncludeDefaults

func (f IndicesGetSettings) WithIncludeDefaults(v bool) func(*IndicesGetSettingsRequest)

WithIncludeDefaults - whether to return all default setting for each of the indices..

func (IndicesGetSettings) WithIndex

func (f IndicesGetSettings) WithIndex(v ...string) func(*IndicesGetSettingsRequest)

WithIndex - a list of index names; use _all to perform the operation on all indices.

func (IndicesGetSettings) WithLocal

func (f IndicesGetSettings) WithLocal(v bool) func(*IndicesGetSettingsRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (IndicesGetSettings) WithMasterTimeout

func (f IndicesGetSettings) WithMasterTimeout(v time.Duration) func(*IndicesGetSettingsRequest)

WithMasterTimeout - specify timeout for connection to master.

func (IndicesGetSettings) WithName

func (f IndicesGetSettings) WithName(v ...string) func(*IndicesGetSettingsRequest)

WithName - the name of the settings that should be included.

func (IndicesGetSettings) WithPretty

func (f IndicesGetSettings) WithPretty() func(*IndicesGetSettingsRequest)

WithPretty makes the response body pretty-printed.

type IndicesGetSettingsRequest

type IndicesGetSettingsRequest struct {
	Index []string

	Name              []string
	AllowNoIndices    *bool
	ExpandWildcards   string
	FlatSettings      *bool
	IgnoreUnavailable *bool
	IncludeDefaults   *bool
	Local             *bool
	MasterTimeout     time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesGetSettingsRequest configures the Indices Get Settings API request.

func (IndicesGetSettingsRequest) Do

Do executes the request and returns response or error.

type IndicesGetTemplate

type IndicesGetTemplate func(o ...func(*IndicesGetTemplateRequest)) (*Response, error)

IndicesGetTemplate returns an index template.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html.

func (IndicesGetTemplate) WithContext

WithContext sets the request context.

func (IndicesGetTemplate) WithErrorTrace

func (f IndicesGetTemplate) WithErrorTrace() func(*IndicesGetTemplateRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesGetTemplate) WithFilterPath

func (f IndicesGetTemplate) WithFilterPath(v ...string) func(*IndicesGetTemplateRequest)

WithFilterPath filters the properties of the response body.

func (IndicesGetTemplate) WithFlatSettings

func (f IndicesGetTemplate) WithFlatSettings(v bool) func(*IndicesGetTemplateRequest)

WithFlatSettings - return settings in flat format (default: false).

func (IndicesGetTemplate) WithHuman

func (f IndicesGetTemplate) WithHuman() func(*IndicesGetTemplateRequest)

WithHuman makes statistical values human-readable.

func (IndicesGetTemplate) WithIncludeTypeName

func (f IndicesGetTemplate) WithIncludeTypeName(v bool) func(*IndicesGetTemplateRequest)

WithIncludeTypeName - whether a type should be returned in the body of the mappings..

func (IndicesGetTemplate) WithLocal

func (f IndicesGetTemplate) WithLocal(v bool) func(*IndicesGetTemplateRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (IndicesGetTemplate) WithMasterTimeout

func (f IndicesGetTemplate) WithMasterTimeout(v time.Duration) func(*IndicesGetTemplateRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (IndicesGetTemplate) WithName

func (f IndicesGetTemplate) WithName(v ...string) func(*IndicesGetTemplateRequest)

WithName - the comma separated names of the index templates.

func (IndicesGetTemplate) WithPretty

func (f IndicesGetTemplate) WithPretty() func(*IndicesGetTemplateRequest)

WithPretty makes the response body pretty-printed.

type IndicesGetTemplateRequest

type IndicesGetTemplateRequest struct {
	Name            []string
	FlatSettings    *bool
	IncludeTypeName *bool
	Local           *bool
	MasterTimeout   time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesGetTemplateRequest configures the Indices Get Template API request.

func (IndicesGetTemplateRequest) Do

Do executes the request and returns response or error.

type IndicesGetUpgrade

type IndicesGetUpgrade func(o ...func(*IndicesGetUpgradeRequest)) (*Response, error)

IndicesGetUpgrade the _upgrade API is no longer useful and will be removed.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html.

func (IndicesGetUpgrade) WithAllowNoIndices

func (f IndicesGetUpgrade) WithAllowNoIndices(v bool) func(*IndicesGetUpgradeRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (IndicesGetUpgrade) WithContext

WithContext sets the request context.

func (IndicesGetUpgrade) WithErrorTrace

func (f IndicesGetUpgrade) WithErrorTrace() func(*IndicesGetUpgradeRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesGetUpgrade) WithExpandWildcards

func (f IndicesGetUpgrade) WithExpandWildcards(v string) func(*IndicesGetUpgradeRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (IndicesGetUpgrade) WithFilterPath

func (f IndicesGetUpgrade) WithFilterPath(v ...string) func(*IndicesGetUpgradeRequest)

WithFilterPath filters the properties of the response body.

func (IndicesGetUpgrade) WithHuman

func (f IndicesGetUpgrade) WithHuman() func(*IndicesGetUpgradeRequest)

WithHuman makes statistical values human-readable.

func (IndicesGetUpgrade) WithIgnoreUnavailable

func (f IndicesGetUpgrade) WithIgnoreUnavailable(v bool) func(*IndicesGetUpgradeRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (IndicesGetUpgrade) WithIndex

func (f IndicesGetUpgrade) WithIndex(v ...string) func(*IndicesGetUpgradeRequest)

WithIndex - a list of index names; use _all to perform the operation on all indices.

func (IndicesGetUpgrade) WithPretty

func (f IndicesGetUpgrade) WithPretty() func(*IndicesGetUpgradeRequest)

WithPretty makes the response body pretty-printed.

type IndicesGetUpgradeRequest

type IndicesGetUpgradeRequest struct {
	Index []string

	AllowNoIndices    *bool
	ExpandWildcards   string
	IgnoreUnavailable *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesGetUpgradeRequest configures the Indices Get Upgrade API request.

func (IndicesGetUpgradeRequest) Do

Do executes the request and returns response or error.

type IndicesOpen

type IndicesOpen func(index []string, o ...func(*IndicesOpenRequest)) (*Response, error)

IndicesOpen opens an index.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html.

func (IndicesOpen) WithAllowNoIndices

func (f IndicesOpen) WithAllowNoIndices(v bool) func(*IndicesOpenRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (IndicesOpen) WithContext

func (f IndicesOpen) WithContext(v context.Context) func(*IndicesOpenRequest)

WithContext sets the request context.

func (IndicesOpen) WithErrorTrace

func (f IndicesOpen) WithErrorTrace() func(*IndicesOpenRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesOpen) WithExpandWildcards

func (f IndicesOpen) WithExpandWildcards(v string) func(*IndicesOpenRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (IndicesOpen) WithFilterPath

func (f IndicesOpen) WithFilterPath(v ...string) func(*IndicesOpenRequest)

WithFilterPath filters the properties of the response body.

func (IndicesOpen) WithHuman

func (f IndicesOpen) WithHuman() func(*IndicesOpenRequest)

WithHuman makes statistical values human-readable.

func (IndicesOpen) WithIgnoreUnavailable

func (f IndicesOpen) WithIgnoreUnavailable(v bool) func(*IndicesOpenRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (IndicesOpen) WithMasterTimeout

func (f IndicesOpen) WithMasterTimeout(v time.Duration) func(*IndicesOpenRequest)

WithMasterTimeout - specify timeout for connection to master.

func (IndicesOpen) WithPretty

func (f IndicesOpen) WithPretty() func(*IndicesOpenRequest)

WithPretty makes the response body pretty-printed.

func (IndicesOpen) WithTimeout

func (f IndicesOpen) WithTimeout(v time.Duration) func(*IndicesOpenRequest)

WithTimeout - explicit operation timeout.

func (IndicesOpen) WithWaitForActiveShards

func (f IndicesOpen) WithWaitForActiveShards(v string) func(*IndicesOpenRequest)

WithWaitForActiveShards - sets the number of active shards to wait for before the operation returns..

type IndicesOpenRequest

type IndicesOpenRequest struct {
	Index []string

	AllowNoIndices      *bool
	ExpandWildcards     string
	IgnoreUnavailable   *bool
	MasterTimeout       time.Duration
	Timeout             time.Duration
	WaitForActiveShards string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesOpenRequest configures the Indices Open API request.

func (IndicesOpenRequest) Do

func (r IndicesOpenRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type IndicesPutAlias

type IndicesPutAlias func(index []string, name string, o ...func(*IndicesPutAliasRequest)) (*Response, error)

IndicesPutAlias creates or updates an alias.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html.

func (IndicesPutAlias) WithBody

func (f IndicesPutAlias) WithBody(v io.Reader) func(*IndicesPutAliasRequest)

WithBody - The settings for the alias, such as `routing` or `filter`.

func (IndicesPutAlias) WithContext

func (f IndicesPutAlias) WithContext(v context.Context) func(*IndicesPutAliasRequest)

WithContext sets the request context.

func (IndicesPutAlias) WithErrorTrace

func (f IndicesPutAlias) WithErrorTrace() func(*IndicesPutAliasRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesPutAlias) WithFilterPath

func (f IndicesPutAlias) WithFilterPath(v ...string) func(*IndicesPutAliasRequest)

WithFilterPath filters the properties of the response body.

func (IndicesPutAlias) WithHuman

func (f IndicesPutAlias) WithHuman() func(*IndicesPutAliasRequest)

WithHuman makes statistical values human-readable.

func (IndicesPutAlias) WithMasterTimeout

func (f IndicesPutAlias) WithMasterTimeout(v time.Duration) func(*IndicesPutAliasRequest)

WithMasterTimeout - specify timeout for connection to master.

func (IndicesPutAlias) WithPretty

func (f IndicesPutAlias) WithPretty() func(*IndicesPutAliasRequest)

WithPretty makes the response body pretty-printed.

func (IndicesPutAlias) WithTimeout

func (f IndicesPutAlias) WithTimeout(v time.Duration) func(*IndicesPutAliasRequest)

WithTimeout - explicit timestamp for the document.

type IndicesPutAliasRequest

type IndicesPutAliasRequest struct {
	Index []string
	Body  io.Reader

	Name          string
	MasterTimeout time.Duration
	Timeout       time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesPutAliasRequest configures the Indices Put Alias API request.

func (IndicesPutAliasRequest) Do

func (r IndicesPutAliasRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type IndicesPutMapping

type IndicesPutMapping func(body io.Reader, o ...func(*IndicesPutMappingRequest)) (*Response, error)

IndicesPutMapping updates the index mappings.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html.

func (IndicesPutMapping) WithAllowNoIndices

func (f IndicesPutMapping) WithAllowNoIndices(v bool) func(*IndicesPutMappingRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (IndicesPutMapping) WithContext

WithContext sets the request context.

func (IndicesPutMapping) WithDocumentType

func (f IndicesPutMapping) WithDocumentType(v string) func(*IndicesPutMappingRequest)

WithDocumentType - the name of the document type.

func (IndicesPutMapping) WithErrorTrace

func (f IndicesPutMapping) WithErrorTrace() func(*IndicesPutMappingRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesPutMapping) WithExpandWildcards

func (f IndicesPutMapping) WithExpandWildcards(v string) func(*IndicesPutMappingRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (IndicesPutMapping) WithFilterPath

func (f IndicesPutMapping) WithFilterPath(v ...string) func(*IndicesPutMappingRequest)

WithFilterPath filters the properties of the response body.

func (IndicesPutMapping) WithHuman

func (f IndicesPutMapping) WithHuman() func(*IndicesPutMappingRequest)

WithHuman makes statistical values human-readable.

func (IndicesPutMapping) WithIgnoreUnavailable

func (f IndicesPutMapping) WithIgnoreUnavailable(v bool) func(*IndicesPutMappingRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (IndicesPutMapping) WithIncludeTypeName

func (f IndicesPutMapping) WithIncludeTypeName(v bool) func(*IndicesPutMappingRequest)

WithIncludeTypeName - whether a type should be expected in the body of the mappings..

func (IndicesPutMapping) WithIndex

func (f IndicesPutMapping) WithIndex(v ...string) func(*IndicesPutMappingRequest)

WithIndex - a list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices..

func (IndicesPutMapping) WithMasterTimeout

func (f IndicesPutMapping) WithMasterTimeout(v time.Duration) func(*IndicesPutMappingRequest)

WithMasterTimeout - specify timeout for connection to master.

func (IndicesPutMapping) WithPretty

func (f IndicesPutMapping) WithPretty() func(*IndicesPutMappingRequest)

WithPretty makes the response body pretty-printed.

func (IndicesPutMapping) WithTimeout

func (f IndicesPutMapping) WithTimeout(v time.Duration) func(*IndicesPutMappingRequest)

WithTimeout - explicit operation timeout.

type IndicesPutMappingRequest

type IndicesPutMappingRequest struct {
	Index        []string
	DocumentType string
	Body         io.Reader

	AllowNoIndices    *bool
	ExpandWildcards   string
	IgnoreUnavailable *bool
	IncludeTypeName   *bool
	MasterTimeout     time.Duration
	Timeout           time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesPutMappingRequest configures the Indices Put Mapping API request.

func (IndicesPutMappingRequest) Do

Do executes the request and returns response or error.

type IndicesPutSettings

type IndicesPutSettings func(body io.Reader, o ...func(*IndicesPutSettingsRequest)) (*Response, error)

IndicesPutSettings updates the index settings.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html.

func (IndicesPutSettings) WithAllowNoIndices

func (f IndicesPutSettings) WithAllowNoIndices(v bool) func(*IndicesPutSettingsRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (IndicesPutSettings) WithContext

WithContext sets the request context.

func (IndicesPutSettings) WithErrorTrace

func (f IndicesPutSettings) WithErrorTrace() func(*IndicesPutSettingsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesPutSettings) WithExpandWildcards

func (f IndicesPutSettings) WithExpandWildcards(v string) func(*IndicesPutSettingsRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (IndicesPutSettings) WithFilterPath

func (f IndicesPutSettings) WithFilterPath(v ...string) func(*IndicesPutSettingsRequest)

WithFilterPath filters the properties of the response body.

func (IndicesPutSettings) WithFlatSettings

func (f IndicesPutSettings) WithFlatSettings(v bool) func(*IndicesPutSettingsRequest)

WithFlatSettings - return settings in flat format (default: false).

func (IndicesPutSettings) WithHuman

func (f IndicesPutSettings) WithHuman() func(*IndicesPutSettingsRequest)

WithHuman makes statistical values human-readable.

func (IndicesPutSettings) WithIgnoreUnavailable

func (f IndicesPutSettings) WithIgnoreUnavailable(v bool) func(*IndicesPutSettingsRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (IndicesPutSettings) WithIndex

func (f IndicesPutSettings) WithIndex(v ...string) func(*IndicesPutSettingsRequest)

WithIndex - a list of index names; use _all to perform the operation on all indices.

func (IndicesPutSettings) WithMasterTimeout

func (f IndicesPutSettings) WithMasterTimeout(v time.Duration) func(*IndicesPutSettingsRequest)

WithMasterTimeout - specify timeout for connection to master.

func (IndicesPutSettings) WithPreserveExisting

func (f IndicesPutSettings) WithPreserveExisting(v bool) func(*IndicesPutSettingsRequest)

WithPreserveExisting - whether to update existing settings. if set to `true` existing settings on an index remain unchanged, the default is `false`.

func (IndicesPutSettings) WithPretty

func (f IndicesPutSettings) WithPretty() func(*IndicesPutSettingsRequest)

WithPretty makes the response body pretty-printed.

func (IndicesPutSettings) WithTimeout

WithTimeout - explicit operation timeout.

type IndicesPutSettingsRequest

type IndicesPutSettingsRequest struct {
	Index []string
	Body  io.Reader

	AllowNoIndices    *bool
	ExpandWildcards   string
	FlatSettings      *bool
	IgnoreUnavailable *bool
	MasterTimeout     time.Duration
	PreserveExisting  *bool
	Timeout           time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesPutSettingsRequest configures the Indices Put Settings API request.

func (IndicesPutSettingsRequest) Do

Do executes the request and returns response or error.

type IndicesPutTemplate

type IndicesPutTemplate func(body io.Reader, name string, o ...func(*IndicesPutTemplateRequest)) (*Response, error)

IndicesPutTemplate creates or updates an index template.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html.

func (IndicesPutTemplate) WithContext

WithContext sets the request context.

func (IndicesPutTemplate) WithCreate

func (f IndicesPutTemplate) WithCreate(v bool) func(*IndicesPutTemplateRequest)

WithCreate - whether the index template should only be added if new or can also replace an existing one.

func (IndicesPutTemplate) WithErrorTrace

func (f IndicesPutTemplate) WithErrorTrace() func(*IndicesPutTemplateRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesPutTemplate) WithFilterPath

func (f IndicesPutTemplate) WithFilterPath(v ...string) func(*IndicesPutTemplateRequest)

WithFilterPath filters the properties of the response body.

func (IndicesPutTemplate) WithFlatSettings

func (f IndicesPutTemplate) WithFlatSettings(v bool) func(*IndicesPutTemplateRequest)

WithFlatSettings - return settings in flat format (default: false).

func (IndicesPutTemplate) WithHuman

func (f IndicesPutTemplate) WithHuman() func(*IndicesPutTemplateRequest)

WithHuman makes statistical values human-readable.

func (IndicesPutTemplate) WithIncludeTypeName

func (f IndicesPutTemplate) WithIncludeTypeName(v bool) func(*IndicesPutTemplateRequest)

WithIncludeTypeName - whether a type should be returned in the body of the mappings..

func (IndicesPutTemplate) WithMasterTimeout

func (f IndicesPutTemplate) WithMasterTimeout(v time.Duration) func(*IndicesPutTemplateRequest)

WithMasterTimeout - specify timeout for connection to master.

func (IndicesPutTemplate) WithOrder

func (f IndicesPutTemplate) WithOrder(v int) func(*IndicesPutTemplateRequest)

WithOrder - the order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers).

func (IndicesPutTemplate) WithPretty

func (f IndicesPutTemplate) WithPretty() func(*IndicesPutTemplateRequest)

WithPretty makes the response body pretty-printed.

func (IndicesPutTemplate) WithTimeout

WithTimeout - explicit operation timeout.

type IndicesPutTemplateRequest

type IndicesPutTemplateRequest struct {
	Body io.Reader

	Name            string
	Create          *bool
	FlatSettings    *bool
	IncludeTypeName *bool
	MasterTimeout   time.Duration
	Order           *int
	Timeout         time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesPutTemplateRequest configures the Indices Put Template API request.

func (IndicesPutTemplateRequest) Do

Do executes the request and returns response or error.

type IndicesRecovery

type IndicesRecovery func(o ...func(*IndicesRecoveryRequest)) (*Response, error)

IndicesRecovery returns information about ongoing index shard recoveries.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html.

func (IndicesRecovery) WithActiveOnly

func (f IndicesRecovery) WithActiveOnly(v bool) func(*IndicesRecoveryRequest)

WithActiveOnly - display only those recoveries that are currently on-going.

func (IndicesRecovery) WithContext

func (f IndicesRecovery) WithContext(v context.Context) func(*IndicesRecoveryRequest)

WithContext sets the request context.

func (IndicesRecovery) WithDetailed

func (f IndicesRecovery) WithDetailed(v bool) func(*IndicesRecoveryRequest)

WithDetailed - whether to display detailed information about shard recovery.

func (IndicesRecovery) WithErrorTrace

func (f IndicesRecovery) WithErrorTrace() func(*IndicesRecoveryRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesRecovery) WithFilterPath

func (f IndicesRecovery) WithFilterPath(v ...string) func(*IndicesRecoveryRequest)

WithFilterPath filters the properties of the response body.

func (IndicesRecovery) WithHuman

func (f IndicesRecovery) WithHuman() func(*IndicesRecoveryRequest)

WithHuman makes statistical values human-readable.

func (IndicesRecovery) WithIndex

func (f IndicesRecovery) WithIndex(v ...string) func(*IndicesRecoveryRequest)

WithIndex - a list of index names; use _all to perform the operation on all indices.

func (IndicesRecovery) WithPretty

func (f IndicesRecovery) WithPretty() func(*IndicesRecoveryRequest)

WithPretty makes the response body pretty-printed.

type IndicesRecoveryRequest

type IndicesRecoveryRequest struct {
	Index []string

	ActiveOnly *bool
	Detailed   *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesRecoveryRequest configures the Indices Recovery API request.

func (IndicesRecoveryRequest) Do

func (r IndicesRecoveryRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type IndicesRefresh

type IndicesRefresh func(o ...func(*IndicesRefreshRequest)) (*Response, error)

IndicesRefresh performs the refresh operation in one or more indices.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html.

func (IndicesRefresh) WithAllowNoIndices

func (f IndicesRefresh) WithAllowNoIndices(v bool) func(*IndicesRefreshRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (IndicesRefresh) WithContext

func (f IndicesRefresh) WithContext(v context.Context) func(*IndicesRefreshRequest)

WithContext sets the request context.

func (IndicesRefresh) WithErrorTrace

func (f IndicesRefresh) WithErrorTrace() func(*IndicesRefreshRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesRefresh) WithExpandWildcards

func (f IndicesRefresh) WithExpandWildcards(v string) func(*IndicesRefreshRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (IndicesRefresh) WithFilterPath

func (f IndicesRefresh) WithFilterPath(v ...string) func(*IndicesRefreshRequest)

WithFilterPath filters the properties of the response body.

func (IndicesRefresh) WithHuman

func (f IndicesRefresh) WithHuman() func(*IndicesRefreshRequest)

WithHuman makes statistical values human-readable.

func (IndicesRefresh) WithIgnoreUnavailable

func (f IndicesRefresh) WithIgnoreUnavailable(v bool) func(*IndicesRefreshRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (IndicesRefresh) WithIndex

func (f IndicesRefresh) WithIndex(v ...string) func(*IndicesRefreshRequest)

WithIndex - a list of index names; use _all to perform the operation on all indices.

func (IndicesRefresh) WithPretty

func (f IndicesRefresh) WithPretty() func(*IndicesRefreshRequest)

WithPretty makes the response body pretty-printed.

type IndicesRefreshRequest

type IndicesRefreshRequest struct {
	Index []string

	AllowNoIndices    *bool
	ExpandWildcards   string
	IgnoreUnavailable *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesRefreshRequest configures the Indices Refresh API request.

func (IndicesRefreshRequest) Do

func (r IndicesRefreshRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type IndicesRollover

type IndicesRollover func(alias string, o ...func(*IndicesRolloverRequest)) (*Response, error)

IndicesRollover updates an alias to point to a new index when the existing index is considered to be too large or too old.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html.

func (IndicesRollover) WithBody

func (f IndicesRollover) WithBody(v io.Reader) func(*IndicesRolloverRequest)

WithBody - The conditions that needs to be met for executing rollover.

func (IndicesRollover) WithContext

func (f IndicesRollover) WithContext(v context.Context) func(*IndicesRolloverRequest)

WithContext sets the request context.

func (IndicesRollover) WithDryRun

func (f IndicesRollover) WithDryRun(v bool) func(*IndicesRolloverRequest)

WithDryRun - if set to true the rollover action will only be validated but not actually performed even if a condition matches. the default is false.

func (IndicesRollover) WithErrorTrace

func (f IndicesRollover) WithErrorTrace() func(*IndicesRolloverRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesRollover) WithFilterPath

func (f IndicesRollover) WithFilterPath(v ...string) func(*IndicesRolloverRequest)

WithFilterPath filters the properties of the response body.

func (IndicesRollover) WithHuman

func (f IndicesRollover) WithHuman() func(*IndicesRolloverRequest)

WithHuman makes statistical values human-readable.

func (IndicesRollover) WithIncludeTypeName

func (f IndicesRollover) WithIncludeTypeName(v bool) func(*IndicesRolloverRequest)

WithIncludeTypeName - whether a type should be included in the body of the mappings..

func (IndicesRollover) WithMasterTimeout

func (f IndicesRollover) WithMasterTimeout(v time.Duration) func(*IndicesRolloverRequest)

WithMasterTimeout - specify timeout for connection to master.

func (IndicesRollover) WithNewIndex

func (f IndicesRollover) WithNewIndex(v string) func(*IndicesRolloverRequest)

WithNewIndex - the name of the rollover index.

func (IndicesRollover) WithPretty

func (f IndicesRollover) WithPretty() func(*IndicesRolloverRequest)

WithPretty makes the response body pretty-printed.

func (IndicesRollover) WithTimeout

func (f IndicesRollover) WithTimeout(v time.Duration) func(*IndicesRolloverRequest)

WithTimeout - explicit operation timeout.

func (IndicesRollover) WithWaitForActiveShards

func (f IndicesRollover) WithWaitForActiveShards(v string) func(*IndicesRolloverRequest)

WithWaitForActiveShards - set the number of active shards to wait for on the newly created rollover index before the operation returns..

type IndicesRolloverRequest

type IndicesRolloverRequest struct {
	Body io.Reader

	Alias               string
	NewIndex            string
	DryRun              *bool
	IncludeTypeName     *bool
	MasterTimeout       time.Duration
	Timeout             time.Duration
	WaitForActiveShards string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesRolloverRequest configures the Indices Rollover API request.

func (IndicesRolloverRequest) Do

func (r IndicesRolloverRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type IndicesSegments

type IndicesSegments func(o ...func(*IndicesSegmentsRequest)) (*Response, error)

IndicesSegments provides low-level information about segments in a Lucene index.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html.

func (IndicesSegments) WithAllowNoIndices

func (f IndicesSegments) WithAllowNoIndices(v bool) func(*IndicesSegmentsRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (IndicesSegments) WithContext

func (f IndicesSegments) WithContext(v context.Context) func(*IndicesSegmentsRequest)

WithContext sets the request context.

func (IndicesSegments) WithErrorTrace

func (f IndicesSegments) WithErrorTrace() func(*IndicesSegmentsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesSegments) WithExpandWildcards

func (f IndicesSegments) WithExpandWildcards(v string) func(*IndicesSegmentsRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (IndicesSegments) WithFilterPath

func (f IndicesSegments) WithFilterPath(v ...string) func(*IndicesSegmentsRequest)

WithFilterPath filters the properties of the response body.

func (IndicesSegments) WithHuman

func (f IndicesSegments) WithHuman() func(*IndicesSegmentsRequest)

WithHuman makes statistical values human-readable.

func (IndicesSegments) WithIgnoreUnavailable

func (f IndicesSegments) WithIgnoreUnavailable(v bool) func(*IndicesSegmentsRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (IndicesSegments) WithIndex

func (f IndicesSegments) WithIndex(v ...string) func(*IndicesSegmentsRequest)

WithIndex - a list of index names; use _all to perform the operation on all indices.

func (IndicesSegments) WithPretty

func (f IndicesSegments) WithPretty() func(*IndicesSegmentsRequest)

WithPretty makes the response body pretty-printed.

func (IndicesSegments) WithVerbose

func (f IndicesSegments) WithVerbose(v bool) func(*IndicesSegmentsRequest)

WithVerbose - includes detailed memory usage by lucene..

type IndicesSegmentsRequest

type IndicesSegmentsRequest struct {
	Index []string

	AllowNoIndices    *bool
	ExpandWildcards   string
	IgnoreUnavailable *bool
	Verbose           *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesSegmentsRequest configures the Indices Segments API request.

func (IndicesSegmentsRequest) Do

func (r IndicesSegmentsRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type IndicesShardStores

type IndicesShardStores func(o ...func(*IndicesShardStoresRequest)) (*Response, error)

IndicesShardStores provides store information for shard copies of indices.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html.

func (IndicesShardStores) WithAllowNoIndices

func (f IndicesShardStores) WithAllowNoIndices(v bool) func(*IndicesShardStoresRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (IndicesShardStores) WithContext

WithContext sets the request context.

func (IndicesShardStores) WithErrorTrace

func (f IndicesShardStores) WithErrorTrace() func(*IndicesShardStoresRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesShardStores) WithExpandWildcards

func (f IndicesShardStores) WithExpandWildcards(v string) func(*IndicesShardStoresRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (IndicesShardStores) WithFilterPath

func (f IndicesShardStores) WithFilterPath(v ...string) func(*IndicesShardStoresRequest)

WithFilterPath filters the properties of the response body.

func (IndicesShardStores) WithHuman

func (f IndicesShardStores) WithHuman() func(*IndicesShardStoresRequest)

WithHuman makes statistical values human-readable.

func (IndicesShardStores) WithIgnoreUnavailable

func (f IndicesShardStores) WithIgnoreUnavailable(v bool) func(*IndicesShardStoresRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (IndicesShardStores) WithIndex

func (f IndicesShardStores) WithIndex(v ...string) func(*IndicesShardStoresRequest)

WithIndex - a list of index names; use _all to perform the operation on all indices.

func (IndicesShardStores) WithPretty

func (f IndicesShardStores) WithPretty() func(*IndicesShardStoresRequest)

WithPretty makes the response body pretty-printed.

func (IndicesShardStores) WithStatus

func (f IndicesShardStores) WithStatus(v ...string) func(*IndicesShardStoresRequest)

WithStatus - a list of statuses used to filter on shards to get store information for.

type IndicesShardStoresRequest

type IndicesShardStoresRequest struct {
	Index []string

	AllowNoIndices    *bool
	ExpandWildcards   string
	IgnoreUnavailable *bool
	Status            []string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesShardStoresRequest configures the Indices Shard Stores API request.

func (IndicesShardStoresRequest) Do

Do executes the request and returns response or error.

type IndicesShrink

type IndicesShrink func(index string, target string, o ...func(*IndicesShrinkRequest)) (*Response, error)

IndicesShrink allow to shrink an existing index into a new index with fewer primary shards.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html.

func (IndicesShrink) WithBody

func (f IndicesShrink) WithBody(v io.Reader) func(*IndicesShrinkRequest)

WithBody - The configuration for the target index (`settings` and `aliases`).

func (IndicesShrink) WithContext

func (f IndicesShrink) WithContext(v context.Context) func(*IndicesShrinkRequest)

WithContext sets the request context.

func (IndicesShrink) WithCopySettings

func (f IndicesShrink) WithCopySettings(v bool) func(*IndicesShrinkRequest)

WithCopySettings - whether or not to copy settings from the source index (defaults to false).

func (IndicesShrink) WithErrorTrace

func (f IndicesShrink) WithErrorTrace() func(*IndicesShrinkRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesShrink) WithFilterPath

func (f IndicesShrink) WithFilterPath(v ...string) func(*IndicesShrinkRequest)

WithFilterPath filters the properties of the response body.

func (IndicesShrink) WithHuman

func (f IndicesShrink) WithHuman() func(*IndicesShrinkRequest)

WithHuman makes statistical values human-readable.

func (IndicesShrink) WithMasterTimeout

func (f IndicesShrink) WithMasterTimeout(v time.Duration) func(*IndicesShrinkRequest)

WithMasterTimeout - specify timeout for connection to master.

func (IndicesShrink) WithPretty

func (f IndicesShrink) WithPretty() func(*IndicesShrinkRequest)

WithPretty makes the response body pretty-printed.

func (IndicesShrink) WithTimeout

func (f IndicesShrink) WithTimeout(v time.Duration) func(*IndicesShrinkRequest)

WithTimeout - explicit operation timeout.

func (IndicesShrink) WithWaitForActiveShards

func (f IndicesShrink) WithWaitForActiveShards(v string) func(*IndicesShrinkRequest)

WithWaitForActiveShards - set the number of active shards to wait for on the shrunken index before the operation returns..

type IndicesShrinkRequest

type IndicesShrinkRequest struct {
	Index string
	Body  io.Reader

	Target              string
	CopySettings        *bool
	MasterTimeout       time.Duration
	Timeout             time.Duration
	WaitForActiveShards string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesShrinkRequest configures the Indices Shrink API request.

func (IndicesShrinkRequest) Do

func (r IndicesShrinkRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type IndicesSplit

type IndicesSplit func(index string, target string, o ...func(*IndicesSplitRequest)) (*Response, error)

IndicesSplit allows you to split an existing index into a new index with more primary shards.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html.

func (IndicesSplit) WithBody

func (f IndicesSplit) WithBody(v io.Reader) func(*IndicesSplitRequest)

WithBody - The configuration for the target index (`settings` and `aliases`).

func (IndicesSplit) WithContext

func (f IndicesSplit) WithContext(v context.Context) func(*IndicesSplitRequest)

WithContext sets the request context.

func (IndicesSplit) WithCopySettings

func (f IndicesSplit) WithCopySettings(v bool) func(*IndicesSplitRequest)

WithCopySettings - whether or not to copy settings from the source index (defaults to false).

func (IndicesSplit) WithErrorTrace

func (f IndicesSplit) WithErrorTrace() func(*IndicesSplitRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesSplit) WithFilterPath

func (f IndicesSplit) WithFilterPath(v ...string) func(*IndicesSplitRequest)

WithFilterPath filters the properties of the response body.

func (IndicesSplit) WithHuman

func (f IndicesSplit) WithHuman() func(*IndicesSplitRequest)

WithHuman makes statistical values human-readable.

func (IndicesSplit) WithMasterTimeout

func (f IndicesSplit) WithMasterTimeout(v time.Duration) func(*IndicesSplitRequest)

WithMasterTimeout - specify timeout for connection to master.

func (IndicesSplit) WithPretty

func (f IndicesSplit) WithPretty() func(*IndicesSplitRequest)

WithPretty makes the response body pretty-printed.

func (IndicesSplit) WithTimeout

func (f IndicesSplit) WithTimeout(v time.Duration) func(*IndicesSplitRequest)

WithTimeout - explicit operation timeout.

func (IndicesSplit) WithWaitForActiveShards

func (f IndicesSplit) WithWaitForActiveShards(v string) func(*IndicesSplitRequest)

WithWaitForActiveShards - set the number of active shards to wait for on the shrunken index before the operation returns..

type IndicesSplitRequest

type IndicesSplitRequest struct {
	Index string
	Body  io.Reader

	Target              string
	CopySettings        *bool
	MasterTimeout       time.Duration
	Timeout             time.Duration
	WaitForActiveShards string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesSplitRequest configures the Indices Split API request.

func (IndicesSplitRequest) Do

func (r IndicesSplitRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type IndicesStats

type IndicesStats func(o ...func(*IndicesStatsRequest)) (*Response, error)

IndicesStats provides statistics on operations happening in an index.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html.

func (IndicesStats) WithCompletionFields

func (f IndicesStats) WithCompletionFields(v ...string) func(*IndicesStatsRequest)

WithCompletionFields - a list of fields for `fielddata` and `suggest` index metric (supports wildcards).

func (IndicesStats) WithContext

func (f IndicesStats) WithContext(v context.Context) func(*IndicesStatsRequest)

WithContext sets the request context.

func (IndicesStats) WithErrorTrace

func (f IndicesStats) WithErrorTrace() func(*IndicesStatsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesStats) WithFielddataFields

func (f IndicesStats) WithFielddataFields(v ...string) func(*IndicesStatsRequest)

WithFielddataFields - a list of fields for `fielddata` index metric (supports wildcards).

func (IndicesStats) WithFields

func (f IndicesStats) WithFields(v ...string) func(*IndicesStatsRequest)

WithFields - a list of fields for `fielddata` and `completion` index metric (supports wildcards).

func (IndicesStats) WithFilterPath

func (f IndicesStats) WithFilterPath(v ...string) func(*IndicesStatsRequest)

WithFilterPath filters the properties of the response body.

func (IndicesStats) WithGroups

func (f IndicesStats) WithGroups(v ...string) func(*IndicesStatsRequest)

WithGroups - a list of search groups for `search` index metric.

func (IndicesStats) WithHuman

func (f IndicesStats) WithHuman() func(*IndicesStatsRequest)

WithHuman makes statistical values human-readable.

func (IndicesStats) WithIncludeSegmentFileSizes

func (f IndicesStats) WithIncludeSegmentFileSizes(v bool) func(*IndicesStatsRequest)

WithIncludeSegmentFileSizes - whether to report the aggregated disk usage of each one of the lucene index files (only applies if segment stats are requested).

func (IndicesStats) WithIndex

func (f IndicesStats) WithIndex(v ...string) func(*IndicesStatsRequest)

WithIndex - a list of index names; use _all to perform the operation on all indices.

func (IndicesStats) WithLevel

func (f IndicesStats) WithLevel(v string) func(*IndicesStatsRequest)

WithLevel - return stats aggregated at cluster, index or shard level.

func (IndicesStats) WithMetric

func (f IndicesStats) WithMetric(v ...string) func(*IndicesStatsRequest)

WithMetric - limit the information returned the specific metrics..

func (IndicesStats) WithPretty

func (f IndicesStats) WithPretty() func(*IndicesStatsRequest)

WithPretty makes the response body pretty-printed.

func (IndicesStats) WithTypes

func (f IndicesStats) WithTypes(v ...string) func(*IndicesStatsRequest)

WithTypes - a list of document types for the `indexing` index metric.

type IndicesStatsRequest

type IndicesStatsRequest struct {
	Index []string

	Metric                  []string
	CompletionFields        []string
	FielddataFields         []string
	Fields                  []string
	Groups                  []string
	IncludeSegmentFileSizes *bool
	Level                   string
	Types                   []string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesStatsRequest configures the Indices Stats API request.

func (IndicesStatsRequest) Do

func (r IndicesStatsRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type IndicesUpdateAliases

type IndicesUpdateAliases func(body io.Reader, o ...func(*IndicesUpdateAliasesRequest)) (*Response, error)

IndicesUpdateAliases updates index aliases.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html.

func (IndicesUpdateAliases) WithContext

WithContext sets the request context.

func (IndicesUpdateAliases) WithErrorTrace

func (f IndicesUpdateAliases) WithErrorTrace() func(*IndicesUpdateAliasesRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesUpdateAliases) WithFilterPath

func (f IndicesUpdateAliases) WithFilterPath(v ...string) func(*IndicesUpdateAliasesRequest)

WithFilterPath filters the properties of the response body.

func (IndicesUpdateAliases) WithHuman

WithHuman makes statistical values human-readable.

func (IndicesUpdateAliases) WithMasterTimeout

func (f IndicesUpdateAliases) WithMasterTimeout(v time.Duration) func(*IndicesUpdateAliasesRequest)

WithMasterTimeout - specify timeout for connection to master.

func (IndicesUpdateAliases) WithPretty

func (f IndicesUpdateAliases) WithPretty() func(*IndicesUpdateAliasesRequest)

WithPretty makes the response body pretty-printed.

func (IndicesUpdateAliases) WithTimeout

WithTimeout - request timeout.

type IndicesUpdateAliasesRequest

type IndicesUpdateAliasesRequest struct {
	Body io.Reader

	MasterTimeout time.Duration
	Timeout       time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesUpdateAliasesRequest configures the Indices Update Aliases API request.

func (IndicesUpdateAliasesRequest) Do

Do executes the request and returns response or error.

type IndicesUpgrade

type IndicesUpgrade func(o ...func(*IndicesUpgradeRequest)) (*Response, error)

IndicesUpgrade the _upgrade API is no longer useful and will be removed.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html.

func (IndicesUpgrade) WithAllowNoIndices

func (f IndicesUpgrade) WithAllowNoIndices(v bool) func(*IndicesUpgradeRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (IndicesUpgrade) WithContext

func (f IndicesUpgrade) WithContext(v context.Context) func(*IndicesUpgradeRequest)

WithContext sets the request context.

func (IndicesUpgrade) WithErrorTrace

func (f IndicesUpgrade) WithErrorTrace() func(*IndicesUpgradeRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesUpgrade) WithExpandWildcards

func (f IndicesUpgrade) WithExpandWildcards(v string) func(*IndicesUpgradeRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (IndicesUpgrade) WithFilterPath

func (f IndicesUpgrade) WithFilterPath(v ...string) func(*IndicesUpgradeRequest)

WithFilterPath filters the properties of the response body.

func (IndicesUpgrade) WithHuman

func (f IndicesUpgrade) WithHuman() func(*IndicesUpgradeRequest)

WithHuman makes statistical values human-readable.

func (IndicesUpgrade) WithIgnoreUnavailable

func (f IndicesUpgrade) WithIgnoreUnavailable(v bool) func(*IndicesUpgradeRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (IndicesUpgrade) WithIndex

func (f IndicesUpgrade) WithIndex(v ...string) func(*IndicesUpgradeRequest)

WithIndex - a list of index names; use _all to perform the operation on all indices.

func (IndicesUpgrade) WithOnlyAncientSegments

func (f IndicesUpgrade) WithOnlyAncientSegments(v bool) func(*IndicesUpgradeRequest)

WithOnlyAncientSegments - if true, only ancient (an older lucene major release) segments will be upgraded.

func (IndicesUpgrade) WithPretty

func (f IndicesUpgrade) WithPretty() func(*IndicesUpgradeRequest)

WithPretty makes the response body pretty-printed.

func (IndicesUpgrade) WithWaitForCompletion

func (f IndicesUpgrade) WithWaitForCompletion(v bool) func(*IndicesUpgradeRequest)

WithWaitForCompletion - specify whether the request should block until the all segments are upgraded (default: false).

type IndicesUpgradeRequest

type IndicesUpgradeRequest struct {
	Index []string

	AllowNoIndices      *bool
	ExpandWildcards     string
	IgnoreUnavailable   *bool
	OnlyAncientSegments *bool
	WaitForCompletion   *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesUpgradeRequest configures the Indices Upgrade API request.

func (IndicesUpgradeRequest) Do

func (r IndicesUpgradeRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type IndicesValidateQuery

type IndicesValidateQuery func(o ...func(*IndicesValidateQueryRequest)) (*Response, error)

IndicesValidateQuery allows a user to validate a potentially expensive query without executing it.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html.

func (IndicesValidateQuery) WithAllShards

func (f IndicesValidateQuery) WithAllShards(v bool) func(*IndicesValidateQueryRequest)

WithAllShards - execute validation on all shards instead of one random shard per index.

func (IndicesValidateQuery) WithAllowNoIndices

func (f IndicesValidateQuery) WithAllowNoIndices(v bool) func(*IndicesValidateQueryRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (IndicesValidateQuery) WithAnalyzeWildcard

func (f IndicesValidateQuery) WithAnalyzeWildcard(v bool) func(*IndicesValidateQueryRequest)

WithAnalyzeWildcard - specify whether wildcard and prefix queries should be analyzed (default: false).

func (IndicesValidateQuery) WithAnalyzer

func (f IndicesValidateQuery) WithAnalyzer(v string) func(*IndicesValidateQueryRequest)

WithAnalyzer - the analyzer to use for the query string.

func (IndicesValidateQuery) WithBody

WithBody - The query definition specified with the Query DSL.

func (IndicesValidateQuery) WithContext

WithContext sets the request context.

func (IndicesValidateQuery) WithDefaultOperator

func (f IndicesValidateQuery) WithDefaultOperator(v string) func(*IndicesValidateQueryRequest)

WithDefaultOperator - the default operator for query string query (and or or).

func (IndicesValidateQuery) WithDf

WithDf - the field to use as default where no field prefix is given in the query string.

func (IndicesValidateQuery) WithDocumentType

func (f IndicesValidateQuery) WithDocumentType(v ...string) func(*IndicesValidateQueryRequest)

WithDocumentType - a list of document types to restrict the operation; leave empty to perform the operation on all types.

func (IndicesValidateQuery) WithErrorTrace

func (f IndicesValidateQuery) WithErrorTrace() func(*IndicesValidateQueryRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IndicesValidateQuery) WithExpandWildcards

func (f IndicesValidateQuery) WithExpandWildcards(v string) func(*IndicesValidateQueryRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (IndicesValidateQuery) WithExplain

func (f IndicesValidateQuery) WithExplain(v bool) func(*IndicesValidateQueryRequest)

WithExplain - return detailed information about the error.

func (IndicesValidateQuery) WithFilterPath

func (f IndicesValidateQuery) WithFilterPath(v ...string) func(*IndicesValidateQueryRequest)

WithFilterPath filters the properties of the response body.

func (IndicesValidateQuery) WithHuman

WithHuman makes statistical values human-readable.

func (IndicesValidateQuery) WithIgnoreUnavailable

func (f IndicesValidateQuery) WithIgnoreUnavailable(v bool) func(*IndicesValidateQueryRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (IndicesValidateQuery) WithIndex

func (f IndicesValidateQuery) WithIndex(v ...string) func(*IndicesValidateQueryRequest)

WithIndex - a list of index names to restrict the operation; use _all to perform the operation on all indices.

func (IndicesValidateQuery) WithLenient

func (f IndicesValidateQuery) WithLenient(v bool) func(*IndicesValidateQueryRequest)

WithLenient - specify whether format-based query failures (such as providing text to a numeric field) should be ignored.

func (IndicesValidateQuery) WithPretty

func (f IndicesValidateQuery) WithPretty() func(*IndicesValidateQueryRequest)

WithPretty makes the response body pretty-printed.

func (IndicesValidateQuery) WithQuery

WithQuery - query in the lucene query string syntax.

func (IndicesValidateQuery) WithRewrite

func (f IndicesValidateQuery) WithRewrite(v bool) func(*IndicesValidateQueryRequest)

WithRewrite - provide a more detailed explanation showing the actual lucene query that will be executed..

type IndicesValidateQueryRequest

type IndicesValidateQueryRequest struct {
	Index        []string
	DocumentType []string
	Body         io.Reader

	AllowNoIndices    *bool
	AllShards         *bool
	Analyzer          string
	AnalyzeWildcard   *bool
	DefaultOperator   string
	Df                string
	ExpandWildcards   string
	Explain           *bool
	IgnoreUnavailable *bool
	Lenient           *bool
	Query             string
	Rewrite           *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IndicesValidateQueryRequest configures the Indices Validate Query API request.

func (IndicesValidateQueryRequest) Do

Do executes the request and returns response or error.

type Info

type Info func(o ...func(*InfoRequest)) (*Response, error)

Info returns basic information about the cluster.

See full documentation at http://www.elastic.co/guide/.

func (Info) WithContext

func (f Info) WithContext(v context.Context) func(*InfoRequest)

WithContext sets the request context.

func (Info) WithErrorTrace

func (f Info) WithErrorTrace() func(*InfoRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (Info) WithFilterPath

func (f Info) WithFilterPath(v ...string) func(*InfoRequest)

WithFilterPath filters the properties of the response body.

func (Info) WithHuman

func (f Info) WithHuman() func(*InfoRequest)

WithHuman makes statistical values human-readable.

type InfoRequest

type InfoRequest struct {
	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

InfoRequest configures the Info API request.

func (InfoRequest) Do

func (r InfoRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Ingest

type Ingest struct {
	DeletePipeline IngestDeletePipeline
	GetPipeline    IngestGetPipeline
	ProcessorGrok  IngestProcessorGrok
	PutPipeline    IngestPutPipeline
	Simulate       IngestSimulate
}

Ingest contains the Ingest APIs

type IngestDeletePipeline

type IngestDeletePipeline func(id string, o ...func(*IngestDeletePipelineRequest)) (*Response, error)

IngestDeletePipeline deletes a pipeline.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html.

func (IngestDeletePipeline) WithContext

WithContext sets the request context.

func (IngestDeletePipeline) WithErrorTrace

func (f IngestDeletePipeline) WithErrorTrace() func(*IngestDeletePipelineRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IngestDeletePipeline) WithFilterPath

func (f IngestDeletePipeline) WithFilterPath(v ...string) func(*IngestDeletePipelineRequest)

WithFilterPath filters the properties of the response body.

func (IngestDeletePipeline) WithHuman

WithHuman makes statistical values human-readable.

func (IngestDeletePipeline) WithMasterTimeout

func (f IngestDeletePipeline) WithMasterTimeout(v time.Duration) func(*IngestDeletePipelineRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (IngestDeletePipeline) WithPretty

func (f IngestDeletePipeline) WithPretty() func(*IngestDeletePipelineRequest)

WithPretty makes the response body pretty-printed.

func (IngestDeletePipeline) WithTimeout

WithTimeout - explicit operation timeout.

type IngestDeletePipelineRequest

type IngestDeletePipelineRequest struct {
	DocumentID string

	MasterTimeout time.Duration
	Timeout       time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IngestDeletePipelineRequest configures the Ingest Delete Pipeline API request.

func (IngestDeletePipelineRequest) Do

Do executes the request and returns response or error.

type IngestGetPipeline

type IngestGetPipeline func(o ...func(*IngestGetPipelineRequest)) (*Response, error)

IngestGetPipeline returns a pipeline.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html.

func (IngestGetPipeline) WithContext

WithContext sets the request context.

func (IngestGetPipeline) WithDocumentID

func (f IngestGetPipeline) WithDocumentID(v string) func(*IngestGetPipelineRequest)

WithDocumentID - comma separated list of pipeline ids. wildcards supported.

func (IngestGetPipeline) WithErrorTrace

func (f IngestGetPipeline) WithErrorTrace() func(*IngestGetPipelineRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IngestGetPipeline) WithFilterPath

func (f IngestGetPipeline) WithFilterPath(v ...string) func(*IngestGetPipelineRequest)

WithFilterPath filters the properties of the response body.

func (IngestGetPipeline) WithHuman

func (f IngestGetPipeline) WithHuman() func(*IngestGetPipelineRequest)

WithHuman makes statistical values human-readable.

func (IngestGetPipeline) WithMasterTimeout

func (f IngestGetPipeline) WithMasterTimeout(v time.Duration) func(*IngestGetPipelineRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (IngestGetPipeline) WithPretty

func (f IngestGetPipeline) WithPretty() func(*IngestGetPipelineRequest)

WithPretty makes the response body pretty-printed.

type IngestGetPipelineRequest

type IngestGetPipelineRequest struct {
	DocumentID string

	MasterTimeout time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IngestGetPipelineRequest configures the Ingest Get Pipeline API request.

func (IngestGetPipelineRequest) Do

Do executes the request and returns response or error.

type IngestProcessorGrok

type IngestProcessorGrok func(o ...func(*IngestProcessorGrokRequest)) (*Response, error)

IngestProcessorGrok returns a list of the built-in patterns.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html.

func (IngestProcessorGrok) WithContext

WithContext sets the request context.

func (IngestProcessorGrok) WithErrorTrace

func (f IngestProcessorGrok) WithErrorTrace() func(*IngestProcessorGrokRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IngestProcessorGrok) WithFilterPath

func (f IngestProcessorGrok) WithFilterPath(v ...string) func(*IngestProcessorGrokRequest)

WithFilterPath filters the properties of the response body.

func (IngestProcessorGrok) WithHuman

func (f IngestProcessorGrok) WithHuman() func(*IngestProcessorGrokRequest)

WithHuman makes statistical values human-readable.

func (IngestProcessorGrok) WithPretty

func (f IngestProcessorGrok) WithPretty() func(*IngestProcessorGrokRequest)

WithPretty makes the response body pretty-printed.

type IngestProcessorGrokRequest

type IngestProcessorGrokRequest struct {
	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IngestProcessorGrokRequest configures the Ingest Processor Grok API request.

func (IngestProcessorGrokRequest) Do

Do executes the request and returns response or error.

type IngestPutPipeline

type IngestPutPipeline func(id string, body io.Reader, o ...func(*IngestPutPipelineRequest)) (*Response, error)

IngestPutPipeline creates or updates a pipeline.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html.

func (IngestPutPipeline) WithContext

WithContext sets the request context.

func (IngestPutPipeline) WithErrorTrace

func (f IngestPutPipeline) WithErrorTrace() func(*IngestPutPipelineRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IngestPutPipeline) WithFilterPath

func (f IngestPutPipeline) WithFilterPath(v ...string) func(*IngestPutPipelineRequest)

WithFilterPath filters the properties of the response body.

func (IngestPutPipeline) WithHuman

func (f IngestPutPipeline) WithHuman() func(*IngestPutPipelineRequest)

WithHuman makes statistical values human-readable.

func (IngestPutPipeline) WithMasterTimeout

func (f IngestPutPipeline) WithMasterTimeout(v time.Duration) func(*IngestPutPipelineRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (IngestPutPipeline) WithPretty

func (f IngestPutPipeline) WithPretty() func(*IngestPutPipelineRequest)

WithPretty makes the response body pretty-printed.

func (IngestPutPipeline) WithTimeout

func (f IngestPutPipeline) WithTimeout(v time.Duration) func(*IngestPutPipelineRequest)

WithTimeout - explicit operation timeout.

type IngestPutPipelineRequest

type IngestPutPipelineRequest struct {
	DocumentID string
	Body       io.Reader

	MasterTimeout time.Duration
	Timeout       time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IngestPutPipelineRequest configures the Ingest Put Pipeline API request.

func (IngestPutPipelineRequest) Do

Do executes the request and returns response or error.

type IngestSimulate

type IngestSimulate func(body io.Reader, o ...func(*IngestSimulateRequest)) (*Response, error)

IngestSimulate allows to simulate a pipeline with example documents.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html.

func (IngestSimulate) WithContext

func (f IngestSimulate) WithContext(v context.Context) func(*IngestSimulateRequest)

WithContext sets the request context.

func (IngestSimulate) WithDocumentID

func (f IngestSimulate) WithDocumentID(v string) func(*IngestSimulateRequest)

WithDocumentID - pipeline ID.

func (IngestSimulate) WithErrorTrace

func (f IngestSimulate) WithErrorTrace() func(*IngestSimulateRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (IngestSimulate) WithFilterPath

func (f IngestSimulate) WithFilterPath(v ...string) func(*IngestSimulateRequest)

WithFilterPath filters the properties of the response body.

func (IngestSimulate) WithHuman

func (f IngestSimulate) WithHuman() func(*IngestSimulateRequest)

WithHuman makes statistical values human-readable.

func (IngestSimulate) WithPretty

func (f IngestSimulate) WithPretty() func(*IngestSimulateRequest)

WithPretty makes the response body pretty-printed.

func (IngestSimulate) WithVerbose

func (f IngestSimulate) WithVerbose(v bool) func(*IngestSimulateRequest)

WithVerbose - verbose mode. display data output for each processor in executed pipeline.

type IngestSimulateRequest

type IngestSimulateRequest struct {
	DocumentID string
	Body       io.Reader

	Verbose *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

IngestSimulateRequest configures the Ingest Simulate API request.

func (IngestSimulateRequest) Do

func (r IngestSimulateRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Mget

type Mget func(body io.Reader, o ...func(*MgetRequest)) (*Response, error)

Mget allows to get multiple documents in one request.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html.

func (Mget) WithContext

func (f Mget) WithContext(v context.Context) func(*MgetRequest)

WithContext sets the request context.

func (Mget) WithDocumentType

func (f Mget) WithDocumentType(v string) func(*MgetRequest)

WithDocumentType - the type of the document.

func (Mget) WithErrorTrace

func (f Mget) WithErrorTrace() func(*MgetRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (Mget) WithFilterPath

func (f Mget) WithFilterPath(v ...string) func(*MgetRequest)

WithFilterPath filters the properties of the response body.

func (Mget) WithHuman

func (f Mget) WithHuman() func(*MgetRequest)

WithHuman makes statistical values human-readable.

func (Mget) WithIndex

func (f Mget) WithIndex(v string) func(*MgetRequest)

WithIndex - the name of the index.

func (Mget) WithPreference

func (f Mget) WithPreference(v string) func(*MgetRequest)

WithPreference - specify the node or shard the operation should be performed on (default: random).

func (Mget) WithPretty

func (f Mget) WithPretty() func(*MgetRequest)

WithPretty makes the response body pretty-printed.

func (Mget) WithRealtime

func (f Mget) WithRealtime(v bool) func(*MgetRequest)

WithRealtime - specify whether to perform the operation in realtime or search mode.

func (Mget) WithRefresh

func (f Mget) WithRefresh(v bool) func(*MgetRequest)

WithRefresh - refresh the shard containing the document before performing the operation.

func (Mget) WithRouting

func (f Mget) WithRouting(v string) func(*MgetRequest)

WithRouting - specific routing value.

func (Mget) WithSource

func (f Mget) WithSource(v ...string) func(*MgetRequest)

WithSource - true or false to return the _source field or not, or a list of fields to return.

func (Mget) WithSourceExcludes

func (f Mget) WithSourceExcludes(v ...string) func(*MgetRequest)

WithSourceExcludes - a list of fields to exclude from the returned _source field.

func (Mget) WithSourceIncludes

func (f Mget) WithSourceIncludes(v ...string) func(*MgetRequest)

WithSourceIncludes - a list of fields to extract and return from the _source field.

func (Mget) WithStoredFields

func (f Mget) WithStoredFields(v ...string) func(*MgetRequest)

WithStoredFields - a list of stored fields to return in the response.

type MgetRequest

type MgetRequest struct {
	Index        string
	DocumentType string
	Body         io.Reader

	Preference     string
	Realtime       *bool
	Refresh        *bool
	Routing        string
	Source         []string
	SourceExcludes []string
	SourceIncludes []string
	StoredFields   []string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

MgetRequest configures the Mget API request.

func (MgetRequest) Do

func (r MgetRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Msearch

type Msearch func(body io.Reader, o ...func(*MsearchRequest)) (*Response, error)

Msearch allows to execute several search operations in one request.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html.

func (Msearch) WithCcsMinimizeRoundtrips

func (f Msearch) WithCcsMinimizeRoundtrips(v bool) func(*MsearchRequest)

WithCcsMinimizeRoundtrips - indicates whether network round-trips should be minimized as part of cross-cluster search requests execution.

func (Msearch) WithContext

func (f Msearch) WithContext(v context.Context) func(*MsearchRequest)

WithContext sets the request context.

func (Msearch) WithDocumentType

func (f Msearch) WithDocumentType(v ...string) func(*MsearchRequest)

WithDocumentType - a list of document types to use as default.

func (Msearch) WithErrorTrace

func (f Msearch) WithErrorTrace() func(*MsearchRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (Msearch) WithFilterPath

func (f Msearch) WithFilterPath(v ...string) func(*MsearchRequest)

WithFilterPath filters the properties of the response body.

func (Msearch) WithHuman

func (f Msearch) WithHuman() func(*MsearchRequest)

WithHuman makes statistical values human-readable.

func (Msearch) WithIndex

func (f Msearch) WithIndex(v ...string) func(*MsearchRequest)

WithIndex - a list of index names to use as default.

func (Msearch) WithMaxConcurrentSearches

func (f Msearch) WithMaxConcurrentSearches(v int) func(*MsearchRequest)

WithMaxConcurrentSearches - controls the maximum number of concurrent searches the multi search api will execute.

func (Msearch) WithMaxConcurrentShardRequests

func (f Msearch) WithMaxConcurrentShardRequests(v int) func(*MsearchRequest)

WithMaxConcurrentShardRequests - the number of concurrent shard requests each sub search executes concurrently. this value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests.

func (Msearch) WithPreFilterShardSize

func (f Msearch) WithPreFilterShardSize(v int) func(*MsearchRequest)

WithPreFilterShardSize - a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. this filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint..

func (Msearch) WithPretty

func (f Msearch) WithPretty() func(*MsearchRequest)

WithPretty makes the response body pretty-printed.

func (Msearch) WithRestTotalHitsAsInt

func (f Msearch) WithRestTotalHitsAsInt(v bool) func(*MsearchRequest)

WithRestTotalHitsAsInt - indicates whether hits.total should be rendered as an integer or an object in the rest search response.

func (Msearch) WithSearchType

func (f Msearch) WithSearchType(v string) func(*MsearchRequest)

WithSearchType - search operation type.

func (Msearch) WithTypedKeys

func (f Msearch) WithTypedKeys(v bool) func(*MsearchRequest)

WithTypedKeys - specify whether aggregation and suggester names should be prefixed by their respective types in the response.

type MsearchRequest

type MsearchRequest struct {
	Index        []string
	DocumentType []string
	Body         io.Reader

	CcsMinimizeRoundtrips      *bool
	MaxConcurrentSearches      *int
	MaxConcurrentShardRequests *int
	PreFilterShardSize         *int
	RestTotalHitsAsInt         *bool
	SearchType                 string
	TypedKeys                  *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

MsearchRequest configures the Msearch API request.

func (MsearchRequest) Do

func (r MsearchRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type MsearchTemplate

type MsearchTemplate func(body io.Reader, o ...func(*MsearchTemplateRequest)) (*Response, error)

MsearchTemplate allows to execute several search template operations in one request.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html.

func (MsearchTemplate) WithCcsMinimizeRoundtrips

func (f MsearchTemplate) WithCcsMinimizeRoundtrips(v bool) func(*MsearchTemplateRequest)

WithCcsMinimizeRoundtrips - indicates whether network round-trips should be minimized as part of cross-cluster search requests execution.

func (MsearchTemplate) WithContext

func (f MsearchTemplate) WithContext(v context.Context) func(*MsearchTemplateRequest)

WithContext sets the request context.

func (MsearchTemplate) WithDocumentType

func (f MsearchTemplate) WithDocumentType(v ...string) func(*MsearchTemplateRequest)

WithDocumentType - a list of document types to use as default.

func (MsearchTemplate) WithErrorTrace

func (f MsearchTemplate) WithErrorTrace() func(*MsearchTemplateRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (MsearchTemplate) WithFilterPath

func (f MsearchTemplate) WithFilterPath(v ...string) func(*MsearchTemplateRequest)

WithFilterPath filters the properties of the response body.

func (MsearchTemplate) WithHuman

func (f MsearchTemplate) WithHuman() func(*MsearchTemplateRequest)

WithHuman makes statistical values human-readable.

func (MsearchTemplate) WithIndex

func (f MsearchTemplate) WithIndex(v ...string) func(*MsearchTemplateRequest)

WithIndex - a list of index names to use as default.

func (MsearchTemplate) WithMaxConcurrentSearches

func (f MsearchTemplate) WithMaxConcurrentSearches(v int) func(*MsearchTemplateRequest)

WithMaxConcurrentSearches - controls the maximum number of concurrent searches the multi search api will execute.

func (MsearchTemplate) WithPretty

func (f MsearchTemplate) WithPretty() func(*MsearchTemplateRequest)

WithPretty makes the response body pretty-printed.

func (MsearchTemplate) WithRestTotalHitsAsInt

func (f MsearchTemplate) WithRestTotalHitsAsInt(v bool) func(*MsearchTemplateRequest)

WithRestTotalHitsAsInt - indicates whether hits.total should be rendered as an integer or an object in the rest search response.

func (MsearchTemplate) WithSearchType

func (f MsearchTemplate) WithSearchType(v string) func(*MsearchTemplateRequest)

WithSearchType - search operation type.

func (MsearchTemplate) WithTypedKeys

func (f MsearchTemplate) WithTypedKeys(v bool) func(*MsearchTemplateRequest)

WithTypedKeys - specify whether aggregation and suggester names should be prefixed by their respective types in the response.

type MsearchTemplateRequest

type MsearchTemplateRequest struct {
	Index        []string
	DocumentType []string
	Body         io.Reader

	CcsMinimizeRoundtrips *bool
	MaxConcurrentSearches *int
	RestTotalHitsAsInt    *bool
	SearchType            string
	TypedKeys             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

MsearchTemplateRequest configures the Msearch Template API request.

func (MsearchTemplateRequest) Do

func (r MsearchTemplateRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Mtermvectors

type Mtermvectors func(o ...func(*MtermvectorsRequest)) (*Response, error)

Mtermvectors returns multiple termvectors in one request.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html.

func (Mtermvectors) WithBody

func (f Mtermvectors) WithBody(v io.Reader) func(*MtermvectorsRequest)

WithBody - Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation..

func (Mtermvectors) WithContext

func (f Mtermvectors) WithContext(v context.Context) func(*MtermvectorsRequest)

WithContext sets the request context.

func (Mtermvectors) WithDocumentType

func (f Mtermvectors) WithDocumentType(v string) func(*MtermvectorsRequest)

WithDocumentType - the type of the document..

func (Mtermvectors) WithErrorTrace

func (f Mtermvectors) WithErrorTrace() func(*MtermvectorsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (Mtermvectors) WithFieldStatistics

func (f Mtermvectors) WithFieldStatistics(v bool) func(*MtermvectorsRequest)

WithFieldStatistics - specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. applies to all returned documents unless otherwise specified in body "params" or "docs"..

func (Mtermvectors) WithFields

func (f Mtermvectors) WithFields(v ...string) func(*MtermvectorsRequest)

WithFields - a list of fields to return. applies to all returned documents unless otherwise specified in body "params" or "docs"..

func (Mtermvectors) WithFilterPath

func (f Mtermvectors) WithFilterPath(v ...string) func(*MtermvectorsRequest)

WithFilterPath filters the properties of the response body.

func (Mtermvectors) WithHuman

func (f Mtermvectors) WithHuman() func(*MtermvectorsRequest)

WithHuman makes statistical values human-readable.

func (Mtermvectors) WithIds

func (f Mtermvectors) WithIds(v ...string) func(*MtermvectorsRequest)

WithIds - a list of documents ids. you must define ids as parameter or set "ids" or "docs" in the request body.

func (Mtermvectors) WithIndex

func (f Mtermvectors) WithIndex(v string) func(*MtermvectorsRequest)

WithIndex - the index in which the document resides..

func (Mtermvectors) WithOffsets

func (f Mtermvectors) WithOffsets(v bool) func(*MtermvectorsRequest)

WithOffsets - specifies if term offsets should be returned. applies to all returned documents unless otherwise specified in body "params" or "docs"..

func (Mtermvectors) WithParent

func (f Mtermvectors) WithParent(v string) func(*MtermvectorsRequest)

WithParent - parent ID of documents. applies to all returned documents unless otherwise specified in body "params" or "docs"..

func (Mtermvectors) WithPayloads

func (f Mtermvectors) WithPayloads(v bool) func(*MtermvectorsRequest)

WithPayloads - specifies if term payloads should be returned. applies to all returned documents unless otherwise specified in body "params" or "docs"..

func (Mtermvectors) WithPositions

func (f Mtermvectors) WithPositions(v bool) func(*MtermvectorsRequest)

WithPositions - specifies if term positions should be returned. applies to all returned documents unless otherwise specified in body "params" or "docs"..

func (Mtermvectors) WithPreference

func (f Mtermvectors) WithPreference(v string) func(*MtermvectorsRequest)

WithPreference - specify the node or shard the operation should be performed on (default: random) .applies to all returned documents unless otherwise specified in body "params" or "docs"..

func (Mtermvectors) WithPretty

func (f Mtermvectors) WithPretty() func(*MtermvectorsRequest)

WithPretty makes the response body pretty-printed.

func (Mtermvectors) WithRealtime

func (f Mtermvectors) WithRealtime(v bool) func(*MtermvectorsRequest)

WithRealtime - specifies if requests are real-time as opposed to near-real-time (default: true)..

func (Mtermvectors) WithRouting

func (f Mtermvectors) WithRouting(v string) func(*MtermvectorsRequest)

WithRouting - specific routing value. applies to all returned documents unless otherwise specified in body "params" or "docs"..

func (Mtermvectors) WithTermStatistics

func (f Mtermvectors) WithTermStatistics(v bool) func(*MtermvectorsRequest)

WithTermStatistics - specifies if total term frequency and document frequency should be returned. applies to all returned documents unless otherwise specified in body "params" or "docs"..

func (Mtermvectors) WithVersion

func (f Mtermvectors) WithVersion(v int) func(*MtermvectorsRequest)

WithVersion - explicit version number for concurrency control.

func (Mtermvectors) WithVersionType

func (f Mtermvectors) WithVersionType(v string) func(*MtermvectorsRequest)

WithVersionType - specific version type.

type MtermvectorsRequest

type MtermvectorsRequest struct {
	Index        string
	DocumentType string
	Body         io.Reader

	Fields          []string
	FieldStatistics *bool
	Ids             []string
	Offsets         *bool
	Parent          string
	Payloads        *bool
	Positions       *bool
	Preference      string
	Realtime        *bool
	Routing         string
	TermStatistics  *bool
	Version         *int
	VersionType     string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

MtermvectorsRequest configures the Mtermvectors API request.

func (MtermvectorsRequest) Do

func (r MtermvectorsRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Nodes

type Nodes struct {
	HotThreads           NodesHotThreads
	Info                 NodesInfo
	ReloadSecureSettings NodesReloadSecureSettings
	Stats                NodesStats
	Usage                NodesUsage
}

Nodes contains the Nodes APIs

type NodesHotThreads

type NodesHotThreads func(o ...func(*NodesHotThreadsRequest)) (*Response, error)

NodesHotThreads returns information about hot threads on each node in the cluster.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html.

func (NodesHotThreads) WithContext

func (f NodesHotThreads) WithContext(v context.Context) func(*NodesHotThreadsRequest)

WithContext sets the request context.

func (NodesHotThreads) WithDocumentType

func (f NodesHotThreads) WithDocumentType(v string) func(*NodesHotThreadsRequest)

WithDocumentType - the type to sample (default: cpu).

func (NodesHotThreads) WithErrorTrace

func (f NodesHotThreads) WithErrorTrace() func(*NodesHotThreadsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (NodesHotThreads) WithFilterPath

func (f NodesHotThreads) WithFilterPath(v ...string) func(*NodesHotThreadsRequest)

WithFilterPath filters the properties of the response body.

func (NodesHotThreads) WithHuman

func (f NodesHotThreads) WithHuman() func(*NodesHotThreadsRequest)

WithHuman makes statistical values human-readable.

func (NodesHotThreads) WithIgnoreIdleThreads

func (f NodesHotThreads) WithIgnoreIdleThreads(v bool) func(*NodesHotThreadsRequest)

WithIgnoreIdleThreads - don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true).

func (NodesHotThreads) WithInterval

func (f NodesHotThreads) WithInterval(v time.Duration) func(*NodesHotThreadsRequest)

WithInterval - the interval for the second sampling of threads.

func (NodesHotThreads) WithNodeID

func (f NodesHotThreads) WithNodeID(v ...string) func(*NodesHotThreadsRequest)

WithNodeID - a list of node ids or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes.

func (NodesHotThreads) WithPretty

func (f NodesHotThreads) WithPretty() func(*NodesHotThreadsRequest)

WithPretty makes the response body pretty-printed.

func (NodesHotThreads) WithSnapshots

func (f NodesHotThreads) WithSnapshots(v int) func(*NodesHotThreadsRequest)

WithSnapshots - number of samples of thread stacktrace (default: 10).

func (NodesHotThreads) WithThreads

func (f NodesHotThreads) WithThreads(v int) func(*NodesHotThreadsRequest)

WithThreads - specify the number of threads to provide information for (default: 3).

func (NodesHotThreads) WithTimeout

func (f NodesHotThreads) WithTimeout(v time.Duration) func(*NodesHotThreadsRequest)

WithTimeout - explicit operation timeout.

type NodesHotThreadsRequest

type NodesHotThreadsRequest struct {
	NodeID            []string
	IgnoreIdleThreads *bool
	Interval          time.Duration
	Snapshots         *int
	Threads           *int
	Timeout           time.Duration
	DocumentType      string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

NodesHotThreadsRequest configures the Nodes Hot Threads API request.

func (NodesHotThreadsRequest) Do

func (r NodesHotThreadsRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type NodesInfo

type NodesInfo func(o ...func(*NodesInfoRequest)) (*Response, error)

NodesInfo returns information about nodes in the cluster.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html.

func (NodesInfo) WithContext

func (f NodesInfo) WithContext(v context.Context) func(*NodesInfoRequest)

WithContext sets the request context.

func (NodesInfo) WithErrorTrace

func (f NodesInfo) WithErrorTrace() func(*NodesInfoRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (NodesInfo) WithFilterPath

func (f NodesInfo) WithFilterPath(v ...string) func(*NodesInfoRequest)

WithFilterPath filters the properties of the response body.

func (NodesInfo) WithFlatSettings

func (f NodesInfo) WithFlatSettings(v bool) func(*NodesInfoRequest)

WithFlatSettings - return settings in flat format (default: false).

func (NodesInfo) WithHuman

func (f NodesInfo) WithHuman() func(*NodesInfoRequest)

WithHuman makes statistical values human-readable.

func (NodesInfo) WithMetric

func (f NodesInfo) WithMetric(v ...string) func(*NodesInfoRequest)

WithMetric - a list of metrics you wish returned. leave empty to return all..

func (NodesInfo) WithNodeID

func (f NodesInfo) WithNodeID(v ...string) func(*NodesInfoRequest)

WithNodeID - a list of node ids or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes.

func (NodesInfo) WithPretty

func (f NodesInfo) WithPretty() func(*NodesInfoRequest)

WithPretty makes the response body pretty-printed.

func (NodesInfo) WithTimeout

func (f NodesInfo) WithTimeout(v time.Duration) func(*NodesInfoRequest)

WithTimeout - explicit operation timeout.

type NodesInfoRequest

type NodesInfoRequest struct {
	NodeID       []string
	Metric       []string
	FlatSettings *bool
	Timeout      time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

NodesInfoRequest configures the Nodes Info API request.

func (NodesInfoRequest) Do

func (r NodesInfoRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type NodesReloadSecureSettings

type NodesReloadSecureSettings func(o ...func(*NodesReloadSecureSettingsRequest)) (*Response, error)

NodesReloadSecureSettings reloads secure settings.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings.

func (NodesReloadSecureSettings) WithContext

WithContext sets the request context.

func (NodesReloadSecureSettings) WithErrorTrace

WithErrorTrace includes the stack trace for errors in the response body.

func (NodesReloadSecureSettings) WithFilterPath

WithFilterPath filters the properties of the response body.

func (NodesReloadSecureSettings) WithHuman

WithHuman makes statistical values human-readable.

func (NodesReloadSecureSettings) WithNodeID

WithNodeID - a list of node ids to span the reload/reinit call. should stay empty because reloading usually involves all cluster nodes..

func (NodesReloadSecureSettings) WithPretty

WithPretty makes the response body pretty-printed.

func (NodesReloadSecureSettings) WithTimeout

WithTimeout - explicit operation timeout.

type NodesReloadSecureSettingsRequest

type NodesReloadSecureSettingsRequest struct {
	NodeID  []string
	Timeout time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

NodesReloadSecureSettingsRequest configures the Nodes Reload Secure Settings API request.

func (NodesReloadSecureSettingsRequest) Do

Do executes the request and returns response or error.

type NodesStats

type NodesStats func(o ...func(*NodesStatsRequest)) (*Response, error)

NodesStats returns statistical information about nodes in the cluster.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html.

func (NodesStats) WithCompletionFields

func (f NodesStats) WithCompletionFields(v ...string) func(*NodesStatsRequest)

WithCompletionFields - a list of fields for `fielddata` and `suggest` index metric (supports wildcards).

func (NodesStats) WithContext

func (f NodesStats) WithContext(v context.Context) func(*NodesStatsRequest)

WithContext sets the request context.

func (NodesStats) WithErrorTrace

func (f NodesStats) WithErrorTrace() func(*NodesStatsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (NodesStats) WithFielddataFields

func (f NodesStats) WithFielddataFields(v ...string) func(*NodesStatsRequest)

WithFielddataFields - a list of fields for `fielddata` index metric (supports wildcards).

func (NodesStats) WithFields

func (f NodesStats) WithFields(v ...string) func(*NodesStatsRequest)

WithFields - a list of fields for `fielddata` and `completion` index metric (supports wildcards).

func (NodesStats) WithFilterPath

func (f NodesStats) WithFilterPath(v ...string) func(*NodesStatsRequest)

WithFilterPath filters the properties of the response body.

func (NodesStats) WithGroups

func (f NodesStats) WithGroups(v bool) func(*NodesStatsRequest)

WithGroups - a list of search groups for `search` index metric.

func (NodesStats) WithHuman

func (f NodesStats) WithHuman() func(*NodesStatsRequest)

WithHuman makes statistical values human-readable.

func (NodesStats) WithIncludeSegmentFileSizes

func (f NodesStats) WithIncludeSegmentFileSizes(v bool) func(*NodesStatsRequest)

WithIncludeSegmentFileSizes - whether to report the aggregated disk usage of each one of the lucene index files (only applies if segment stats are requested).

func (NodesStats) WithIndexMetric

func (f NodesStats) WithIndexMetric(v ...string) func(*NodesStatsRequest)

WithIndexMetric - limit the information returned for `indices` metric to the specific index metrics. isn't used if `indices` (or `all`) metric isn't specified..

func (NodesStats) WithLevel

func (f NodesStats) WithLevel(v string) func(*NodesStatsRequest)

WithLevel - return indices stats aggregated at index, node or shard level.

func (NodesStats) WithMetric

func (f NodesStats) WithMetric(v ...string) func(*NodesStatsRequest)

WithMetric - limit the information returned to the specified metrics.

func (NodesStats) WithNodeID

func (f NodesStats) WithNodeID(v ...string) func(*NodesStatsRequest)

WithNodeID - a list of node ids or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes.

func (NodesStats) WithPretty

func (f NodesStats) WithPretty() func(*NodesStatsRequest)

WithPretty makes the response body pretty-printed.

func (NodesStats) WithTimeout

func (f NodesStats) WithTimeout(v time.Duration) func(*NodesStatsRequest)

WithTimeout - explicit operation timeout.

func (NodesStats) WithTypes

func (f NodesStats) WithTypes(v ...string) func(*NodesStatsRequest)

WithTypes - a list of document types for the `indexing` index metric.

type NodesStatsRequest

type NodesStatsRequest struct {
	NodeID                  []string
	Metric                  []string
	IndexMetric             []string
	CompletionFields        []string
	FielddataFields         []string
	Fields                  []string
	Groups                  *bool
	IncludeSegmentFileSizes *bool
	Level                   string
	Timeout                 time.Duration
	Types                   []string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

NodesStatsRequest configures the Nodes Stats API request.

func (NodesStatsRequest) Do

func (r NodesStatsRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type NodesUsage

type NodesUsage func(o ...func(*NodesUsageRequest)) (*Response, error)

NodesUsage returns low-level information about REST actions usage on nodes.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html.

func (NodesUsage) WithContext

func (f NodesUsage) WithContext(v context.Context) func(*NodesUsageRequest)

WithContext sets the request context.

func (NodesUsage) WithErrorTrace

func (f NodesUsage) WithErrorTrace() func(*NodesUsageRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (NodesUsage) WithFilterPath

func (f NodesUsage) WithFilterPath(v ...string) func(*NodesUsageRequest)

WithFilterPath filters the properties of the response body.

func (NodesUsage) WithHuman

func (f NodesUsage) WithHuman() func(*NodesUsageRequest)

WithHuman makes statistical values human-readable.

func (NodesUsage) WithMetric

func (f NodesUsage) WithMetric(v ...string) func(*NodesUsageRequest)

WithMetric - limit the information returned to the specified metrics.

func (NodesUsage) WithNodeID

func (f NodesUsage) WithNodeID(v ...string) func(*NodesUsageRequest)

WithNodeID - a list of node ids or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes.

func (NodesUsage) WithPretty

func (f NodesUsage) WithPretty() func(*NodesUsageRequest)

WithPretty makes the response body pretty-printed.

func (NodesUsage) WithTimeout

func (f NodesUsage) WithTimeout(v time.Duration) func(*NodesUsageRequest)

WithTimeout - explicit operation timeout.

type NodesUsageRequest

type NodesUsageRequest struct {
	Metric  []string
	NodeID  []string
	Timeout time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

NodesUsageRequest configures the Nodes Usage API request.

func (NodesUsageRequest) Do

func (r NodesUsageRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Ping

type Ping func(o ...func(*PingRequest)) (*Response, error)

Ping returns whether the cluster is running.

See full documentation at http://www.elastic.co/guide/.

func (Ping) WithContext

func (f Ping) WithContext(v context.Context) func(*PingRequest)

WithContext sets the request context.

func (Ping) WithErrorTrace

func (f Ping) WithErrorTrace() func(*PingRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (Ping) WithFilterPath

func (f Ping) WithFilterPath(v ...string) func(*PingRequest)

WithFilterPath filters the properties of the response body.

func (Ping) WithHuman

func (f Ping) WithHuman() func(*PingRequest)

WithHuman makes statistical values human-readable.

func (Ping) WithPretty

func (f Ping) WithPretty() func(*PingRequest)

WithPretty makes the response body pretty-printed.

type PingRequest

type PingRequest struct {
	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

PingRequest configures the Ping API request.

func (PingRequest) Do

func (r PingRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type PutScript

type PutScript func(id string, body io.Reader, o ...func(*PutScriptRequest)) (*Response, error)

PutScript creates or updates a script.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html.

func (PutScript) WithContext

func (f PutScript) WithContext(v context.Context) func(*PutScriptRequest)

WithContext sets the request context.

func (PutScript) WithErrorTrace

func (f PutScript) WithErrorTrace() func(*PutScriptRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (PutScript) WithFilterPath

func (f PutScript) WithFilterPath(v ...string) func(*PutScriptRequest)

WithFilterPath filters the properties of the response body.

func (PutScript) WithHuman

func (f PutScript) WithHuman() func(*PutScriptRequest)

WithHuman makes statistical values human-readable.

func (PutScript) WithMasterTimeout

func (f PutScript) WithMasterTimeout(v time.Duration) func(*PutScriptRequest)

WithMasterTimeout - specify timeout for connection to master.

func (PutScript) WithPretty

func (f PutScript) WithPretty() func(*PutScriptRequest)

WithPretty makes the response body pretty-printed.

func (PutScript) WithScriptContext

func (f PutScript) WithScriptContext(v string) func(*PutScriptRequest)

WithScriptContext - script context.

func (PutScript) WithTimeout

func (f PutScript) WithTimeout(v time.Duration) func(*PutScriptRequest)

WithTimeout - explicit operation timeout.

type PutScriptRequest

type PutScriptRequest struct {
	DocumentID string
	Body       io.Reader

	ScriptContext string
	MasterTimeout time.Duration
	Timeout       time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

PutScriptRequest configures the Put Script API request.

func (PutScriptRequest) Do

func (r PutScriptRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type RankEval

type RankEval func(body io.Reader, o ...func(*RankEvalRequest)) (*Response, error)

RankEval allows to evaluate the quality of ranked search results over a set of typical search queries

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html.

func (RankEval) WithAllowNoIndices

func (f RankEval) WithAllowNoIndices(v bool) func(*RankEvalRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (RankEval) WithContext

func (f RankEval) WithContext(v context.Context) func(*RankEvalRequest)

WithContext sets the request context.

func (RankEval) WithErrorTrace

func (f RankEval) WithErrorTrace() func(*RankEvalRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (RankEval) WithExpandWildcards

func (f RankEval) WithExpandWildcards(v string) func(*RankEvalRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (RankEval) WithFilterPath

func (f RankEval) WithFilterPath(v ...string) func(*RankEvalRequest)

WithFilterPath filters the properties of the response body.

func (RankEval) WithHuman

func (f RankEval) WithHuman() func(*RankEvalRequest)

WithHuman makes statistical values human-readable.

func (RankEval) WithIgnoreUnavailable

func (f RankEval) WithIgnoreUnavailable(v bool) func(*RankEvalRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (RankEval) WithIndex

func (f RankEval) WithIndex(v ...string) func(*RankEvalRequest)

WithIndex - a list of index names to search; use _all to perform the operation on all indices.

func (RankEval) WithPretty

func (f RankEval) WithPretty() func(*RankEvalRequest)

WithPretty makes the response body pretty-printed.

type RankEvalRequest

type RankEvalRequest struct {
	Index []string
	Body  io.Reader

	AllowNoIndices    *bool
	ExpandWildcards   string
	IgnoreUnavailable *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

RankEvalRequest configures the Rank Eval API request.

func (RankEvalRequest) Do

func (r RankEvalRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Reindex

type Reindex func(body io.Reader, o ...func(*ReindexRequest)) (*Response, error)

Reindex allows to copy documents from one index to another, optionally filtering the source documents by a query, changing the destination index settings, or fetching the documents from a remote cluster.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html.

func (Reindex) WithContext

func (f Reindex) WithContext(v context.Context) func(*ReindexRequest)

WithContext sets the request context.

func (Reindex) WithErrorTrace

func (f Reindex) WithErrorTrace() func(*ReindexRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (Reindex) WithFilterPath

func (f Reindex) WithFilterPath(v ...string) func(*ReindexRequest)

WithFilterPath filters the properties of the response body.

func (Reindex) WithHuman

func (f Reindex) WithHuman() func(*ReindexRequest)

WithHuman makes statistical values human-readable.

func (Reindex) WithPretty

func (f Reindex) WithPretty() func(*ReindexRequest)

WithPretty makes the response body pretty-printed.

func (Reindex) WithRefresh

func (f Reindex) WithRefresh(v bool) func(*ReindexRequest)

WithRefresh - should the effected indexes be refreshed?.

func (Reindex) WithRequestsPerSecond

func (f Reindex) WithRequestsPerSecond(v int) func(*ReindexRequest)

WithRequestsPerSecond - the throttle to set on this request in sub-requests per second. -1 means no throttle..

func (Reindex) WithSlices

func (f Reindex) WithSlices(v int) func(*ReindexRequest)

WithSlices - the number of slices this task should be divided into. defaults to 1 meaning the task isn't sliced into subtasks..

func (Reindex) WithTimeout

func (f Reindex) WithTimeout(v time.Duration) func(*ReindexRequest)

WithTimeout - time each individual bulk request should wait for shards that are unavailable..

func (Reindex) WithWaitForActiveShards

func (f Reindex) WithWaitForActiveShards(v string) func(*ReindexRequest)

WithWaitForActiveShards - sets the number of shard copies that must be active before proceeding with the reindex operation. defaults to 1, meaning the primary shard only. set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1).

func (Reindex) WithWaitForCompletion

func (f Reindex) WithWaitForCompletion(v bool) func(*ReindexRequest)

WithWaitForCompletion - should the request should block until the reindex is complete..

type ReindexRequest

type ReindexRequest struct {
	Body io.Reader

	Refresh             *bool
	RequestsPerSecond   *int
	Slices              *int
	Timeout             time.Duration
	WaitForActiveShards string
	WaitForCompletion   *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

ReindexRequest configures the Reindex API request.

func (ReindexRequest) Do

func (r ReindexRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type ReindexRethrottle

type ReindexRethrottle func(task_id string, requests_per_second *int, o ...func(*ReindexRethrottleRequest)) (*Response, error)

ReindexRethrottle changes the number of requests per second for a particular Reindex operation.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html.

func (ReindexRethrottle) WithContext

WithContext sets the request context.

func (ReindexRethrottle) WithErrorTrace

func (f ReindexRethrottle) WithErrorTrace() func(*ReindexRethrottleRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (ReindexRethrottle) WithFilterPath

func (f ReindexRethrottle) WithFilterPath(v ...string) func(*ReindexRethrottleRequest)

WithFilterPath filters the properties of the response body.

func (ReindexRethrottle) WithHuman

func (f ReindexRethrottle) WithHuman() func(*ReindexRethrottleRequest)

WithHuman makes statistical values human-readable.

func (ReindexRethrottle) WithPretty

func (f ReindexRethrottle) WithPretty() func(*ReindexRethrottleRequest)

WithPretty makes the response body pretty-printed.

func (ReindexRethrottle) WithRequestsPerSecond

func (f ReindexRethrottle) WithRequestsPerSecond(v int) func(*ReindexRethrottleRequest)

WithRequestsPerSecond - the throttle to set on this request in floating sub-requests per second. -1 means set no throttle..

type ReindexRethrottleRequest

type ReindexRethrottleRequest struct {
	TaskID            string
	RequestsPerSecond *int

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

ReindexRethrottleRequest configures the Reindex Rethrottle API request.

func (ReindexRethrottleRequest) Do

Do executes the request and returns response or error.

type Remote

type Remote struct {
}

Remote contains the Remote APIs

type RenderSearchTemplate

type RenderSearchTemplate func(o ...func(*RenderSearchTemplateRequest)) (*Response, error)

RenderSearchTemplate allows to use the Mustache language to pre-render a search definition.

See full documentation at http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html.

func (RenderSearchTemplate) WithBody

WithBody - The search definition template and its params.

func (RenderSearchTemplate) WithContext

WithContext sets the request context.

func (RenderSearchTemplate) WithDocumentID

func (f RenderSearchTemplate) WithDocumentID(v string) func(*RenderSearchTemplateRequest)

WithDocumentID - the ID of the stored search template.

func (RenderSearchTemplate) WithErrorTrace

func (f RenderSearchTemplate) WithErrorTrace() func(*RenderSearchTemplateRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (RenderSearchTemplate) WithFilterPath

func (f RenderSearchTemplate) WithFilterPath(v ...string) func(*RenderSearchTemplateRequest)

WithFilterPath filters the properties of the response body.

func (RenderSearchTemplate) WithHuman

WithHuman makes statistical values human-readable.

func (RenderSearchTemplate) WithPretty

func (f RenderSearchTemplate) WithPretty() func(*RenderSearchTemplateRequest)

WithPretty makes the response body pretty-printed.

type RenderSearchTemplateRequest

type RenderSearchTemplateRequest struct {
	DocumentID string
	Body       io.Reader

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

RenderSearchTemplateRequest configures the Render Search Template API request.

func (RenderSearchTemplateRequest) Do

Do executes the request and returns response or error.

type Request

type Request interface {
	Do(ctx context.Context, transport Transport) (*Response, error)
}

Request defines the API request.

type Response

type Response struct {
	StatusCode int
	Header     http.Header
	Body       io.ReadCloser
}

Response represents the API response.

func (*Response) IsError

func (r *Response) IsError() bool

IsError returns true when the response status indicates failure.

Example
es, _ := elasticsearch.NewDefaultClient()

res, err := es.Info()

// Handle connection errors
//
if err != nil {
	log.Fatalf("ERROR: %v", err)
}
defer res.Body.Close()

// Handle error response (4xx, 5xx)
//
if res.IsError() {
	log.Fatalf("ERROR: %s", res.Status())
}

// Handle successfull response (2xx)
//
log.Println(res)
Output:

func (*Response) Status

func (r *Response) Status() string

Status returns the response status as a string.

Example
es, _ := elasticsearch.NewDefaultClient()

res, _ := es.Info()
log.Println(res.Status())

// 200 OK
Output:

func (*Response) String

func (r *Response) String() string

String returns the response as a string.

The intended usage is for testing or debugging only.

Example
es, _ := elasticsearch.NewDefaultClient()

res, _ := es.Info()
log.Println(res.String())

// [200 OK] {
// "name" : "es1",
// "cluster_name" : "go-elasticsearch",
// ...
// }
Output:

type ScriptsPainlessExecute

type ScriptsPainlessExecute func(o ...func(*ScriptsPainlessExecuteRequest)) (*Response, error)

ScriptsPainlessExecute allows an arbitrary script to be executed and a result to be returned

See full documentation at https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html.

func (ScriptsPainlessExecute) WithBody

WithBody - The script to execute.

func (ScriptsPainlessExecute) WithContext

WithContext sets the request context.

func (ScriptsPainlessExecute) WithErrorTrace

func (f ScriptsPainlessExecute) WithErrorTrace() func(*ScriptsPainlessExecuteRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (ScriptsPainlessExecute) WithFilterPath

func (f ScriptsPainlessExecute) WithFilterPath(v ...string) func(*ScriptsPainlessExecuteRequest)

WithFilterPath filters the properties of the response body.

func (ScriptsPainlessExecute) WithHuman

WithHuman makes statistical values human-readable.

func (ScriptsPainlessExecute) WithPretty

WithPretty makes the response body pretty-printed.

type ScriptsPainlessExecuteRequest

type ScriptsPainlessExecuteRequest struct {
	Body io.Reader

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

ScriptsPainlessExecuteRequest configures the Scripts Painless Execute API request.

func (ScriptsPainlessExecuteRequest) Do

Do executes the request and returns response or error.

type Scroll

type Scroll func(o ...func(*ScrollRequest)) (*Response, error)

Scroll allows to retrieve a large numbers of results from a single search request.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html.

func (Scroll) WithBody

func (f Scroll) WithBody(v io.Reader) func(*ScrollRequest)

WithBody - The scroll ID if not passed by URL or query parameter..

func (Scroll) WithContext

func (f Scroll) WithContext(v context.Context) func(*ScrollRequest)

WithContext sets the request context.

func (Scroll) WithErrorTrace

func (f Scroll) WithErrorTrace() func(*ScrollRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (Scroll) WithFilterPath

func (f Scroll) WithFilterPath(v ...string) func(*ScrollRequest)

WithFilterPath filters the properties of the response body.

func (Scroll) WithHuman

func (f Scroll) WithHuman() func(*ScrollRequest)

WithHuman makes statistical values human-readable.

func (Scroll) WithPretty

func (f Scroll) WithPretty() func(*ScrollRequest)

WithPretty makes the response body pretty-printed.

func (Scroll) WithRestTotalHitsAsInt

func (f Scroll) WithRestTotalHitsAsInt(v bool) func(*ScrollRequest)

WithRestTotalHitsAsInt - indicates whether hits.total should be rendered as an integer or an object in the rest search response.

func (Scroll) WithScroll

func (f Scroll) WithScroll(v time.Duration) func(*ScrollRequest)

WithScroll - specify how long a consistent view of the index should be maintained for scrolled search.

func (Scroll) WithScrollID

func (f Scroll) WithScrollID(v string) func(*ScrollRequest)

WithScrollID - the scroll ID.

type ScrollRequest

type ScrollRequest struct {
	Body io.Reader

	ScrollID           string
	RestTotalHitsAsInt *bool
	Scroll             time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

ScrollRequest configures the Scroll API request.

func (ScrollRequest) Do

func (r ScrollRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Search func(o ...func(*SearchRequest)) (*Response, error)

Search returns results matching a query.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html.

func (Search) WithAllowNoIndices

func (f Search) WithAllowNoIndices(v bool) func(*SearchRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (Search) WithAllowPartialSearchResults

func (f Search) WithAllowPartialSearchResults(v bool) func(*SearchRequest)

WithAllowPartialSearchResults - indicate if an error should be returned if there is a partial search failure or timeout.

func (Search) WithAnalyzeWildcard

func (f Search) WithAnalyzeWildcard(v bool) func(*SearchRequest)

WithAnalyzeWildcard - specify whether wildcard and prefix queries should be analyzed (default: false).

func (Search) WithAnalyzer

func (f Search) WithAnalyzer(v string) func(*SearchRequest)

WithAnalyzer - the analyzer to use for the query string.

func (Search) WithBatchedReduceSize

func (f Search) WithBatchedReduceSize(v int) func(*SearchRequest)

WithBatchedReduceSize - the number of shard results that should be reduced at once on the coordinating node. this value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large..

func (Search) WithBody

func (f Search) WithBody(v io.Reader) func(*SearchRequest)

WithBody - The search definition using the Query DSL.

func (Search) WithCcsMinimizeRoundtrips

func (f Search) WithCcsMinimizeRoundtrips(v bool) func(*SearchRequest)

WithCcsMinimizeRoundtrips - indicates whether network round-trips should be minimized as part of cross-cluster search requests execution.

func (Search) WithContext

func (f Search) WithContext(v context.Context) func(*SearchRequest)

WithContext sets the request context.

func (Search) WithDefaultOperator

func (f Search) WithDefaultOperator(v string) func(*SearchRequest)

WithDefaultOperator - the default operator for query string query (and or or).

func (Search) WithDf

func (f Search) WithDf(v string) func(*SearchRequest)

WithDf - the field to use as default where no field prefix is given in the query string.

func (Search) WithDocumentType

func (f Search) WithDocumentType(v ...string) func(*SearchRequest)

WithDocumentType - a list of document types to search; leave empty to perform the operation on all types.

func (Search) WithDocvalueFields

func (f Search) WithDocvalueFields(v ...string) func(*SearchRequest)

WithDocvalueFields - a list of fields to return as the docvalue representation of a field for each hit.

func (Search) WithErrorTrace

func (f Search) WithErrorTrace() func(*SearchRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (Search) WithExpandWildcards

func (f Search) WithExpandWildcards(v string) func(*SearchRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (Search) WithExplain

func (f Search) WithExplain(v bool) func(*SearchRequest)

WithExplain - specify whether to return detailed information about score computation as part of a hit.

func (Search) WithFilterPath

func (f Search) WithFilterPath(v ...string) func(*SearchRequest)

WithFilterPath filters the properties of the response body.

func (Search) WithFrom

func (f Search) WithFrom(v int) func(*SearchRequest)

WithFrom - starting offset (default: 0).

func (Search) WithHuman

func (f Search) WithHuman() func(*SearchRequest)

WithHuman makes statistical values human-readable.

func (Search) WithIgnoreThrottled

func (f Search) WithIgnoreThrottled(v bool) func(*SearchRequest)

WithIgnoreThrottled - whether specified concrete, expanded or aliased indices should be ignored when throttled.

func (Search) WithIgnoreUnavailable

func (f Search) WithIgnoreUnavailable(v bool) func(*SearchRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (Search) WithIndex

func (f Search) WithIndex(v ...string) func(*SearchRequest)

WithIndex - a list of index names to search; use _all to perform the operation on all indices.

func (Search) WithLenient

func (f Search) WithLenient(v bool) func(*SearchRequest)

WithLenient - specify whether format-based query failures (such as providing text to a numeric field) should be ignored.

func (Search) WithMaxConcurrentShardRequests

func (f Search) WithMaxConcurrentShardRequests(v int) func(*SearchRequest)

WithMaxConcurrentShardRequests - the number of concurrent shard requests per node this search executes concurrently. this value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests.

func (Search) WithPreFilterShardSize

func (f Search) WithPreFilterShardSize(v int) func(*SearchRequest)

WithPreFilterShardSize - a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. this filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint..

func (Search) WithPreference

func (f Search) WithPreference(v string) func(*SearchRequest)

WithPreference - specify the node or shard the operation should be performed on (default: random).

func (Search) WithPretty

func (f Search) WithPretty() func(*SearchRequest)

WithPretty makes the response body pretty-printed.

func (Search) WithQuery

func (f Search) WithQuery(v string) func(*SearchRequest)

WithQuery - query in the lucene query string syntax.

func (Search) WithRequestCache

func (f Search) WithRequestCache(v bool) func(*SearchRequest)

WithRequestCache - specify if request cache should be used for this request or not, defaults to index level setting.

func (Search) WithRestTotalHitsAsInt

func (f Search) WithRestTotalHitsAsInt(v bool) func(*SearchRequest)

WithRestTotalHitsAsInt - indicates whether hits.total should be rendered as an integer or an object in the rest search response.

func (Search) WithRouting

func (f Search) WithRouting(v ...string) func(*SearchRequest)

WithRouting - a list of specific routing values.

func (Search) WithScroll

func (f Search) WithScroll(v time.Duration) func(*SearchRequest)

WithScroll - specify how long a consistent view of the index should be maintained for scrolled search.

func (Search) WithSearchType

func (f Search) WithSearchType(v string) func(*SearchRequest)

WithSearchType - search operation type.

func (Search) WithSeqNoPrimaryTerm

func (f Search) WithSeqNoPrimaryTerm(v bool) func(*SearchRequest)

WithSeqNoPrimaryTerm - specify whether to return sequence number and primary term of the last modification of each hit.

func (Search) WithSize

func (f Search) WithSize(v int) func(*SearchRequest)

WithSize - number of hits to return (default: 10).

func (Search) WithSort

func (f Search) WithSort(v ...string) func(*SearchRequest)

WithSort - a list of <field>:<direction> pairs.

func (Search) WithSource

func (f Search) WithSource(v ...string) func(*SearchRequest)

WithSource - true or false to return the _source field or not, or a list of fields to return.

func (Search) WithSourceExcludes

func (f Search) WithSourceExcludes(v ...string) func(*SearchRequest)

WithSourceExcludes - a list of fields to exclude from the returned _source field.

func (Search) WithSourceIncludes

func (f Search) WithSourceIncludes(v ...string) func(*SearchRequest)

WithSourceIncludes - a list of fields to extract and return from the _source field.

func (Search) WithStats

func (f Search) WithStats(v ...string) func(*SearchRequest)

WithStats - specific 'tag' of the request for logging and statistical purposes.

func (Search) WithStoredFields

func (f Search) WithStoredFields(v ...string) func(*SearchRequest)

WithStoredFields - a list of stored fields to return as part of a hit.

func (Search) WithSuggestField

func (f Search) WithSuggestField(v string) func(*SearchRequest)

WithSuggestField - specify which field to use for suggestions.

func (Search) WithSuggestMode

func (f Search) WithSuggestMode(v string) func(*SearchRequest)

WithSuggestMode - specify suggest mode.

func (Search) WithSuggestSize

func (f Search) WithSuggestSize(v int) func(*SearchRequest)

WithSuggestSize - how many suggestions to return in response.

func (Search) WithSuggestText

func (f Search) WithSuggestText(v string) func(*SearchRequest)

WithSuggestText - the source text for which the suggestions should be returned.

func (Search) WithTerminateAfter

func (f Search) WithTerminateAfter(v int) func(*SearchRequest)

WithTerminateAfter - the maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early..

func (Search) WithTimeout

func (f Search) WithTimeout(v time.Duration) func(*SearchRequest)

WithTimeout - explicit operation timeout.

func (Search) WithTrackScores

func (f Search) WithTrackScores(v bool) func(*SearchRequest)

WithTrackScores - whether to calculate and return scores even if they are not used for sorting.

func (Search) WithTrackTotalHits

func (f Search) WithTrackTotalHits(v interface{}) func(*SearchRequest)

WithTrackTotalHits - indicate if the number of documents that match the query should be tracked.

func (Search) WithTypedKeys

func (f Search) WithTypedKeys(v bool) func(*SearchRequest)

WithTypedKeys - specify whether aggregation and suggester names should be prefixed by their respective types in the response.

func (Search) WithVersion

func (f Search) WithVersion(v bool) func(*SearchRequest)

WithVersion - specify whether to return document version as part of a hit.

type SearchRequest

type SearchRequest struct {
	Index        []string
	DocumentType []string
	Body         io.Reader

	AllowNoIndices             *bool
	AllowPartialSearchResults  *bool
	Analyzer                   string
	AnalyzeWildcard            *bool
	BatchedReduceSize          *int
	CcsMinimizeRoundtrips      *bool
	DefaultOperator            string
	Df                         string
	DocvalueFields             []string
	ExpandWildcards            string
	Explain                    *bool
	From                       *int
	IgnoreThrottled            *bool
	IgnoreUnavailable          *bool
	Lenient                    *bool
	MaxConcurrentShardRequests *int
	Preference                 string
	PreFilterShardSize         *int
	Query                      string
	RequestCache               *bool
	RestTotalHitsAsInt         *bool
	Routing                    []string
	Scroll                     time.Duration
	SearchType                 string
	SeqNoPrimaryTerm           *bool
	Size                       *int
	Sort                       []string
	Source                     []string
	SourceExcludes             []string
	SourceIncludes             []string
	Stats                      []string
	StoredFields               []string
	SuggestField               string
	SuggestMode                string
	SuggestSize                *int
	SuggestText                string
	TerminateAfter             *int
	Timeout                    time.Duration
	TrackScores                *bool
	TrackTotalHits             interface{}
	TypedKeys                  *bool
	Version                    *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

SearchRequest configures the Search API request.

func (SearchRequest) Do

func (r SearchRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type SearchShards

type SearchShards func(o ...func(*SearchShardsRequest)) (*Response, error)

SearchShards returns information about the indices and shards that a search request would be executed against.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html.

func (SearchShards) WithAllowNoIndices

func (f SearchShards) WithAllowNoIndices(v bool) func(*SearchShardsRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (SearchShards) WithContext

func (f SearchShards) WithContext(v context.Context) func(*SearchShardsRequest)

WithContext sets the request context.

func (SearchShards) WithErrorTrace

func (f SearchShards) WithErrorTrace() func(*SearchShardsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (SearchShards) WithExpandWildcards

func (f SearchShards) WithExpandWildcards(v string) func(*SearchShardsRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (SearchShards) WithFilterPath

func (f SearchShards) WithFilterPath(v ...string) func(*SearchShardsRequest)

WithFilterPath filters the properties of the response body.

func (SearchShards) WithHuman

func (f SearchShards) WithHuman() func(*SearchShardsRequest)

WithHuman makes statistical values human-readable.

func (SearchShards) WithIgnoreUnavailable

func (f SearchShards) WithIgnoreUnavailable(v bool) func(*SearchShardsRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (SearchShards) WithIndex

func (f SearchShards) WithIndex(v ...string) func(*SearchShardsRequest)

WithIndex - a list of index names to search; use _all to perform the operation on all indices.

func (SearchShards) WithLocal

func (f SearchShards) WithLocal(v bool) func(*SearchShardsRequest)

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (SearchShards) WithPreference

func (f SearchShards) WithPreference(v string) func(*SearchShardsRequest)

WithPreference - specify the node or shard the operation should be performed on (default: random).

func (SearchShards) WithPretty

func (f SearchShards) WithPretty() func(*SearchShardsRequest)

WithPretty makes the response body pretty-printed.

func (SearchShards) WithRouting

func (f SearchShards) WithRouting(v string) func(*SearchShardsRequest)

WithRouting - specific routing value.

type SearchShardsRequest

type SearchShardsRequest struct {
	Index []string

	AllowNoIndices    *bool
	ExpandWildcards   string
	IgnoreUnavailable *bool
	Local             *bool
	Preference        string
	Routing           string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

SearchShardsRequest configures the Search Shards API request.

func (SearchShardsRequest) Do

func (r SearchShardsRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type SearchTemplate

type SearchTemplate func(body io.Reader, o ...func(*SearchTemplateRequest)) (*Response, error)

SearchTemplate allows to use the Mustache language to pre-render a search definition.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html.

func (SearchTemplate) WithAllowNoIndices

func (f SearchTemplate) WithAllowNoIndices(v bool) func(*SearchTemplateRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (SearchTemplate) WithCcsMinimizeRoundtrips

func (f SearchTemplate) WithCcsMinimizeRoundtrips(v bool) func(*SearchTemplateRequest)

WithCcsMinimizeRoundtrips - indicates whether network round-trips should be minimized as part of cross-cluster search requests execution.

func (SearchTemplate) WithContext

func (f SearchTemplate) WithContext(v context.Context) func(*SearchTemplateRequest)

WithContext sets the request context.

func (SearchTemplate) WithDocumentType

func (f SearchTemplate) WithDocumentType(v ...string) func(*SearchTemplateRequest)

WithDocumentType - a list of document types to search; leave empty to perform the operation on all types.

func (SearchTemplate) WithErrorTrace

func (f SearchTemplate) WithErrorTrace() func(*SearchTemplateRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (SearchTemplate) WithExpandWildcards

func (f SearchTemplate) WithExpandWildcards(v string) func(*SearchTemplateRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (SearchTemplate) WithExplain

func (f SearchTemplate) WithExplain(v bool) func(*SearchTemplateRequest)

WithExplain - specify whether to return detailed information about score computation as part of a hit.

func (SearchTemplate) WithFilterPath

func (f SearchTemplate) WithFilterPath(v ...string) func(*SearchTemplateRequest)

WithFilterPath filters the properties of the response body.

func (SearchTemplate) WithHuman

func (f SearchTemplate) WithHuman() func(*SearchTemplateRequest)

WithHuman makes statistical values human-readable.

func (SearchTemplate) WithIgnoreThrottled

func (f SearchTemplate) WithIgnoreThrottled(v bool) func(*SearchTemplateRequest)

WithIgnoreThrottled - whether specified concrete, expanded or aliased indices should be ignored when throttled.

func (SearchTemplate) WithIgnoreUnavailable

func (f SearchTemplate) WithIgnoreUnavailable(v bool) func(*SearchTemplateRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (SearchTemplate) WithIndex

func (f SearchTemplate) WithIndex(v ...string) func(*SearchTemplateRequest)

WithIndex - a list of index names to search; use _all to perform the operation on all indices.

func (SearchTemplate) WithPreference

func (f SearchTemplate) WithPreference(v string) func(*SearchTemplateRequest)

WithPreference - specify the node or shard the operation should be performed on (default: random).

func (SearchTemplate) WithPretty

func (f SearchTemplate) WithPretty() func(*SearchTemplateRequest)

WithPretty makes the response body pretty-printed.

func (SearchTemplate) WithProfile

func (f SearchTemplate) WithProfile(v bool) func(*SearchTemplateRequest)

WithProfile - specify whether to profile the query execution.

func (SearchTemplate) WithRestTotalHitsAsInt

func (f SearchTemplate) WithRestTotalHitsAsInt(v bool) func(*SearchTemplateRequest)

WithRestTotalHitsAsInt - indicates whether hits.total should be rendered as an integer or an object in the rest search response.

func (SearchTemplate) WithRouting

func (f SearchTemplate) WithRouting(v ...string) func(*SearchTemplateRequest)

WithRouting - a list of specific routing values.

func (SearchTemplate) WithScroll

func (f SearchTemplate) WithScroll(v time.Duration) func(*SearchTemplateRequest)

WithScroll - specify how long a consistent view of the index should be maintained for scrolled search.

func (SearchTemplate) WithSearchType

func (f SearchTemplate) WithSearchType(v string) func(*SearchTemplateRequest)

WithSearchType - search operation type.

func (SearchTemplate) WithTypedKeys

func (f SearchTemplate) WithTypedKeys(v bool) func(*SearchTemplateRequest)

WithTypedKeys - specify whether aggregation and suggester names should be prefixed by their respective types in the response.

type SearchTemplateRequest

type SearchTemplateRequest struct {
	Index        []string
	DocumentType []string
	Body         io.Reader

	AllowNoIndices        *bool
	CcsMinimizeRoundtrips *bool
	ExpandWildcards       string
	Explain               *bool
	IgnoreThrottled       *bool
	IgnoreUnavailable     *bool
	Preference            string
	Profile               *bool
	RestTotalHitsAsInt    *bool
	Routing               []string
	Scroll                time.Duration
	SearchType            string
	TypedKeys             *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

SearchTemplateRequest configures the Search Template API request.

func (SearchTemplateRequest) Do

func (r SearchTemplateRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Snapshot

type Snapshot struct {
	Create           SnapshotCreate
	CreateRepository SnapshotCreateRepository
	Delete           SnapshotDelete
	DeleteRepository SnapshotDeleteRepository
	Get              SnapshotGet
	GetRepository    SnapshotGetRepository
	Restore          SnapshotRestore
	Status           SnapshotStatus
	VerifyRepository SnapshotVerifyRepository
}

Snapshot contains the Snapshot APIs

type SnapshotCreate

type SnapshotCreate func(repository string, snapshot string, o ...func(*SnapshotCreateRequest)) (*Response, error)

SnapshotCreate creates a snapshot in a repository.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html.

func (SnapshotCreate) WithBody

func (f SnapshotCreate) WithBody(v io.Reader) func(*SnapshotCreateRequest)

WithBody - The snapshot definition.

func (SnapshotCreate) WithContext

func (f SnapshotCreate) WithContext(v context.Context) func(*SnapshotCreateRequest)

WithContext sets the request context.

func (SnapshotCreate) WithErrorTrace

func (f SnapshotCreate) WithErrorTrace() func(*SnapshotCreateRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (SnapshotCreate) WithFilterPath

func (f SnapshotCreate) WithFilterPath(v ...string) func(*SnapshotCreateRequest)

WithFilterPath filters the properties of the response body.

func (SnapshotCreate) WithHuman

func (f SnapshotCreate) WithHuman() func(*SnapshotCreateRequest)

WithHuman makes statistical values human-readable.

func (SnapshotCreate) WithMasterTimeout

func (f SnapshotCreate) WithMasterTimeout(v time.Duration) func(*SnapshotCreateRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (SnapshotCreate) WithPretty

func (f SnapshotCreate) WithPretty() func(*SnapshotCreateRequest)

WithPretty makes the response body pretty-printed.

func (SnapshotCreate) WithWaitForCompletion

func (f SnapshotCreate) WithWaitForCompletion(v bool) func(*SnapshotCreateRequest)

WithWaitForCompletion - should this request wait until the operation has completed before returning.

type SnapshotCreateRepository

type SnapshotCreateRepository func(repository string, body io.Reader, o ...func(*SnapshotCreateRepositoryRequest)) (*Response, error)

SnapshotCreateRepository creates a repository.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html.

func (SnapshotCreateRepository) WithContext

WithContext sets the request context.

func (SnapshotCreateRepository) WithErrorTrace

WithErrorTrace includes the stack trace for errors in the response body.

func (SnapshotCreateRepository) WithFilterPath

func (f SnapshotCreateRepository) WithFilterPath(v ...string) func(*SnapshotCreateRepositoryRequest)

WithFilterPath filters the properties of the response body.

func (SnapshotCreateRepository) WithHuman

WithHuman makes statistical values human-readable.

func (SnapshotCreateRepository) WithMasterTimeout

WithMasterTimeout - explicit operation timeout for connection to master node.

func (SnapshotCreateRepository) WithPretty

WithPretty makes the response body pretty-printed.

func (SnapshotCreateRepository) WithTimeout

WithTimeout - explicit operation timeout.

func (SnapshotCreateRepository) WithVerify

WithVerify - whether to verify the repository after creation.

type SnapshotCreateRepositoryRequest

type SnapshotCreateRepositoryRequest struct {
	Body io.Reader

	Repository    string
	MasterTimeout time.Duration
	Timeout       time.Duration
	Verify        *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

SnapshotCreateRepositoryRequest configures the Snapshot Create Repository API request.

func (SnapshotCreateRepositoryRequest) Do

Do executes the request and returns response or error.

type SnapshotCreateRequest

type SnapshotCreateRequest struct {
	Body io.Reader

	Repository        string
	Snapshot          string
	MasterTimeout     time.Duration
	WaitForCompletion *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

SnapshotCreateRequest configures the Snapshot Create API request.

func (SnapshotCreateRequest) Do

func (r SnapshotCreateRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type SnapshotDelete

type SnapshotDelete func(repository string, snapshot string, o ...func(*SnapshotDeleteRequest)) (*Response, error)

SnapshotDelete deletes a snapshot.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html.

func (SnapshotDelete) WithContext

func (f SnapshotDelete) WithContext(v context.Context) func(*SnapshotDeleteRequest)

WithContext sets the request context.

func (SnapshotDelete) WithErrorTrace

func (f SnapshotDelete) WithErrorTrace() func(*SnapshotDeleteRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (SnapshotDelete) WithFilterPath

func (f SnapshotDelete) WithFilterPath(v ...string) func(*SnapshotDeleteRequest)

WithFilterPath filters the properties of the response body.

func (SnapshotDelete) WithHuman

func (f SnapshotDelete) WithHuman() func(*SnapshotDeleteRequest)

WithHuman makes statistical values human-readable.

func (SnapshotDelete) WithMasterTimeout

func (f SnapshotDelete) WithMasterTimeout(v time.Duration) func(*SnapshotDeleteRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (SnapshotDelete) WithPretty

func (f SnapshotDelete) WithPretty() func(*SnapshotDeleteRequest)

WithPretty makes the response body pretty-printed.

type SnapshotDeleteRepository

type SnapshotDeleteRepository func(repository []string, o ...func(*SnapshotDeleteRepositoryRequest)) (*Response, error)

SnapshotDeleteRepository deletes a repository.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html.

func (SnapshotDeleteRepository) WithContext

WithContext sets the request context.

func (SnapshotDeleteRepository) WithErrorTrace

WithErrorTrace includes the stack trace for errors in the response body.

func (SnapshotDeleteRepository) WithFilterPath

func (f SnapshotDeleteRepository) WithFilterPath(v ...string) func(*SnapshotDeleteRepositoryRequest)

WithFilterPath filters the properties of the response body.

func (SnapshotDeleteRepository) WithHuman

WithHuman makes statistical values human-readable.

func (SnapshotDeleteRepository) WithMasterTimeout

WithMasterTimeout - explicit operation timeout for connection to master node.

func (SnapshotDeleteRepository) WithPretty

WithPretty makes the response body pretty-printed.

func (SnapshotDeleteRepository) WithTimeout

WithTimeout - explicit operation timeout.

type SnapshotDeleteRepositoryRequest

type SnapshotDeleteRepositoryRequest struct {
	Repository    []string
	MasterTimeout time.Duration
	Timeout       time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

SnapshotDeleteRepositoryRequest configures the Snapshot Delete Repository API request.

func (SnapshotDeleteRepositoryRequest) Do

Do executes the request and returns response or error.

type SnapshotDeleteRequest

type SnapshotDeleteRequest struct {
	Repository    string
	Snapshot      string
	MasterTimeout time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

SnapshotDeleteRequest configures the Snapshot Delete API request.

func (SnapshotDeleteRequest) Do

func (r SnapshotDeleteRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type SnapshotGet

type SnapshotGet func(repository string, snapshot []string, o ...func(*SnapshotGetRequest)) (*Response, error)

SnapshotGet returns information about a snapshot.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html.

func (SnapshotGet) WithContext

func (f SnapshotGet) WithContext(v context.Context) func(*SnapshotGetRequest)

WithContext sets the request context.

func (SnapshotGet) WithErrorTrace

func (f SnapshotGet) WithErrorTrace() func(*SnapshotGetRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (SnapshotGet) WithFilterPath

func (f SnapshotGet) WithFilterPath(v ...string) func(*SnapshotGetRequest)

WithFilterPath filters the properties of the response body.

func (SnapshotGet) WithHuman

func (f SnapshotGet) WithHuman() func(*SnapshotGetRequest)

WithHuman makes statistical values human-readable.

func (SnapshotGet) WithIgnoreUnavailable

func (f SnapshotGet) WithIgnoreUnavailable(v bool) func(*SnapshotGetRequest)

WithIgnoreUnavailable - whether to ignore unavailable snapshots, defaults to false which means a snapshotmissingexception is thrown.

func (SnapshotGet) WithMasterTimeout

func (f SnapshotGet) WithMasterTimeout(v time.Duration) func(*SnapshotGetRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (SnapshotGet) WithPretty

func (f SnapshotGet) WithPretty() func(*SnapshotGetRequest)

WithPretty makes the response body pretty-printed.

func (SnapshotGet) WithVerbose

func (f SnapshotGet) WithVerbose(v bool) func(*SnapshotGetRequest)

WithVerbose - whether to show verbose snapshot info or only show the basic info found in the repository index blob.

type SnapshotGetRepository

type SnapshotGetRepository func(o ...func(*SnapshotGetRepositoryRequest)) (*Response, error)

SnapshotGetRepository returns information about a repository.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html.

func (SnapshotGetRepository) WithContext

WithContext sets the request context.

func (SnapshotGetRepository) WithErrorTrace

func (f SnapshotGetRepository) WithErrorTrace() func(*SnapshotGetRepositoryRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (SnapshotGetRepository) WithFilterPath

func (f SnapshotGetRepository) WithFilterPath(v ...string) func(*SnapshotGetRepositoryRequest)

WithFilterPath filters the properties of the response body.

func (SnapshotGetRepository) WithHuman

WithHuman makes statistical values human-readable.

func (SnapshotGetRepository) WithLocal

WithLocal - return local information, do not retrieve the state from master node (default: false).

func (SnapshotGetRepository) WithMasterTimeout

func (f SnapshotGetRepository) WithMasterTimeout(v time.Duration) func(*SnapshotGetRepositoryRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (SnapshotGetRepository) WithPretty

WithPretty makes the response body pretty-printed.

func (SnapshotGetRepository) WithRepository

func (f SnapshotGetRepository) WithRepository(v ...string) func(*SnapshotGetRepositoryRequest)

WithRepository - a list of repository names.

type SnapshotGetRepositoryRequest

type SnapshotGetRepositoryRequest struct {
	Repository    []string
	Local         *bool
	MasterTimeout time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

SnapshotGetRepositoryRequest configures the Snapshot Get Repository API request.

func (SnapshotGetRepositoryRequest) Do

Do executes the request and returns response or error.

type SnapshotGetRequest

type SnapshotGetRequest struct {
	Repository        string
	Snapshot          []string
	IgnoreUnavailable *bool
	MasterTimeout     time.Duration
	Verbose           *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

SnapshotGetRequest configures the Snapshot Get API request.

func (SnapshotGetRequest) Do

func (r SnapshotGetRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type SnapshotRestore

type SnapshotRestore func(repository string, snapshot string, o ...func(*SnapshotRestoreRequest)) (*Response, error)

SnapshotRestore restores a snapshot.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html.

func (SnapshotRestore) WithBody

func (f SnapshotRestore) WithBody(v io.Reader) func(*SnapshotRestoreRequest)

WithBody - Details of what to restore.

func (SnapshotRestore) WithContext

func (f SnapshotRestore) WithContext(v context.Context) func(*SnapshotRestoreRequest)

WithContext sets the request context.

func (SnapshotRestore) WithErrorTrace

func (f SnapshotRestore) WithErrorTrace() func(*SnapshotRestoreRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (SnapshotRestore) WithFilterPath

func (f SnapshotRestore) WithFilterPath(v ...string) func(*SnapshotRestoreRequest)

WithFilterPath filters the properties of the response body.

func (SnapshotRestore) WithHuman

func (f SnapshotRestore) WithHuman() func(*SnapshotRestoreRequest)

WithHuman makes statistical values human-readable.

func (SnapshotRestore) WithMasterTimeout

func (f SnapshotRestore) WithMasterTimeout(v time.Duration) func(*SnapshotRestoreRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (SnapshotRestore) WithPretty

func (f SnapshotRestore) WithPretty() func(*SnapshotRestoreRequest)

WithPretty makes the response body pretty-printed.

func (SnapshotRestore) WithWaitForCompletion

func (f SnapshotRestore) WithWaitForCompletion(v bool) func(*SnapshotRestoreRequest)

WithWaitForCompletion - should this request wait until the operation has completed before returning.

type SnapshotRestoreRequest

type SnapshotRestoreRequest struct {
	Body io.Reader

	Repository        string
	Snapshot          string
	MasterTimeout     time.Duration
	WaitForCompletion *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

SnapshotRestoreRequest configures the Snapshot Restore API request.

func (SnapshotRestoreRequest) Do

func (r SnapshotRestoreRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type SnapshotStatus

type SnapshotStatus func(o ...func(*SnapshotStatusRequest)) (*Response, error)

SnapshotStatus returns information about the status of a snapshot.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html.

func (SnapshotStatus) WithContext

func (f SnapshotStatus) WithContext(v context.Context) func(*SnapshotStatusRequest)

WithContext sets the request context.

func (SnapshotStatus) WithErrorTrace

func (f SnapshotStatus) WithErrorTrace() func(*SnapshotStatusRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (SnapshotStatus) WithFilterPath

func (f SnapshotStatus) WithFilterPath(v ...string) func(*SnapshotStatusRequest)

WithFilterPath filters the properties of the response body.

func (SnapshotStatus) WithHuman

func (f SnapshotStatus) WithHuman() func(*SnapshotStatusRequest)

WithHuman makes statistical values human-readable.

func (SnapshotStatus) WithIgnoreUnavailable

func (f SnapshotStatus) WithIgnoreUnavailable(v bool) func(*SnapshotStatusRequest)

WithIgnoreUnavailable - whether to ignore unavailable snapshots, defaults to false which means a snapshotmissingexception is thrown.

func (SnapshotStatus) WithMasterTimeout

func (f SnapshotStatus) WithMasterTimeout(v time.Duration) func(*SnapshotStatusRequest)

WithMasterTimeout - explicit operation timeout for connection to master node.

func (SnapshotStatus) WithPretty

func (f SnapshotStatus) WithPretty() func(*SnapshotStatusRequest)

WithPretty makes the response body pretty-printed.

func (SnapshotStatus) WithRepository

func (f SnapshotStatus) WithRepository(v string) func(*SnapshotStatusRequest)

WithRepository - a repository name.

func (SnapshotStatus) WithSnapshot

func (f SnapshotStatus) WithSnapshot(v ...string) func(*SnapshotStatusRequest)

WithSnapshot - a list of snapshot names.

type SnapshotStatusRequest

type SnapshotStatusRequest struct {
	Repository        string
	Snapshot          []string
	IgnoreUnavailable *bool
	MasterTimeout     time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

SnapshotStatusRequest configures the Snapshot Status API request.

func (SnapshotStatusRequest) Do

func (r SnapshotStatusRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type SnapshotVerifyRepository

type SnapshotVerifyRepository func(repository string, o ...func(*SnapshotVerifyRepositoryRequest)) (*Response, error)

SnapshotVerifyRepository verifies a repository.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html.

func (SnapshotVerifyRepository) WithContext

WithContext sets the request context.

func (SnapshotVerifyRepository) WithErrorTrace

WithErrorTrace includes the stack trace for errors in the response body.

func (SnapshotVerifyRepository) WithFilterPath

func (f SnapshotVerifyRepository) WithFilterPath(v ...string) func(*SnapshotVerifyRepositoryRequest)

WithFilterPath filters the properties of the response body.

func (SnapshotVerifyRepository) WithHuman

WithHuman makes statistical values human-readable.

func (SnapshotVerifyRepository) WithMasterTimeout

WithMasterTimeout - explicit operation timeout for connection to master node.

func (SnapshotVerifyRepository) WithPretty

WithPretty makes the response body pretty-printed.

func (SnapshotVerifyRepository) WithTimeout

WithTimeout - explicit operation timeout.

type SnapshotVerifyRepositoryRequest

type SnapshotVerifyRepositoryRequest struct {
	Repository    string
	MasterTimeout time.Duration
	Timeout       time.Duration

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

SnapshotVerifyRepositoryRequest configures the Snapshot Verify Repository API request.

func (SnapshotVerifyRepositoryRequest) Do

Do executes the request and returns response or error.

type Tasks

type Tasks struct {
	Cancel TasksCancel
	Get    TasksGet
	List   TasksList
}

Tasks contains the Tasks APIs

type TasksCancel

type TasksCancel func(o ...func(*TasksCancelRequest)) (*Response, error)

TasksCancel cancels a task, if it can be cancelled through an API.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html.

func (TasksCancel) WithActions

func (f TasksCancel) WithActions(v ...string) func(*TasksCancelRequest)

WithActions - a list of actions that should be cancelled. leave empty to cancel all..

func (TasksCancel) WithContext

func (f TasksCancel) WithContext(v context.Context) func(*TasksCancelRequest)

WithContext sets the request context.

func (TasksCancel) WithErrorTrace

func (f TasksCancel) WithErrorTrace() func(*TasksCancelRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (TasksCancel) WithFilterPath

func (f TasksCancel) WithFilterPath(v ...string) func(*TasksCancelRequest)

WithFilterPath filters the properties of the response body.

func (TasksCancel) WithHuman

func (f TasksCancel) WithHuman() func(*TasksCancelRequest)

WithHuman makes statistical values human-readable.

func (TasksCancel) WithNodes

func (f TasksCancel) WithNodes(v ...string) func(*TasksCancelRequest)

WithNodes - a list of node ids or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes.

func (TasksCancel) WithParentTaskID

func (f TasksCancel) WithParentTaskID(v string) func(*TasksCancelRequest)

WithParentTaskID - cancel tasks with specified parent task ID (node_id:task_number). set to -1 to cancel all..

func (TasksCancel) WithPretty

func (f TasksCancel) WithPretty() func(*TasksCancelRequest)

WithPretty makes the response body pretty-printed.

func (TasksCancel) WithTaskID

func (f TasksCancel) WithTaskID(v string) func(*TasksCancelRequest)

WithTaskID - cancel the task with specified task ID (node_id:task_number).

type TasksCancelRequest

type TasksCancelRequest struct {
	TaskID       string
	Actions      []string
	Nodes        []string
	ParentTaskID string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

TasksCancelRequest configures the Tasks Cancel API request.

func (TasksCancelRequest) Do

func (r TasksCancelRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type TasksGet

type TasksGet func(task_id string, o ...func(*TasksGetRequest)) (*Response, error)

TasksGet returns information about a task.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html.

func (TasksGet) WithContext

func (f TasksGet) WithContext(v context.Context) func(*TasksGetRequest)

WithContext sets the request context.

func (TasksGet) WithErrorTrace

func (f TasksGet) WithErrorTrace() func(*TasksGetRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (TasksGet) WithFilterPath

func (f TasksGet) WithFilterPath(v ...string) func(*TasksGetRequest)

WithFilterPath filters the properties of the response body.

func (TasksGet) WithHuman

func (f TasksGet) WithHuman() func(*TasksGetRequest)

WithHuman makes statistical values human-readable.

func (TasksGet) WithPretty

func (f TasksGet) WithPretty() func(*TasksGetRequest)

WithPretty makes the response body pretty-printed.

func (TasksGet) WithTimeout

func (f TasksGet) WithTimeout(v time.Duration) func(*TasksGetRequest)

WithTimeout - explicit operation timeout.

func (TasksGet) WithWaitForCompletion

func (f TasksGet) WithWaitForCompletion(v bool) func(*TasksGetRequest)

WithWaitForCompletion - wait for the matching tasks to complete (default: false).

type TasksGetRequest

type TasksGetRequest struct {
	TaskID            string
	Timeout           time.Duration
	WaitForCompletion *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

TasksGetRequest configures the Tasks Get API request.

func (TasksGetRequest) Do

func (r TasksGetRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type TasksList

type TasksList func(o ...func(*TasksListRequest)) (*Response, error)

TasksList returns a list of tasks.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html.

func (TasksList) WithActions

func (f TasksList) WithActions(v ...string) func(*TasksListRequest)

WithActions - a list of actions that should be returned. leave empty to return all..

func (TasksList) WithContext

func (f TasksList) WithContext(v context.Context) func(*TasksListRequest)

WithContext sets the request context.

func (TasksList) WithDetailed

func (f TasksList) WithDetailed(v bool) func(*TasksListRequest)

WithDetailed - return detailed task information (default: false).

func (TasksList) WithErrorTrace

func (f TasksList) WithErrorTrace() func(*TasksListRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (TasksList) WithFilterPath

func (f TasksList) WithFilterPath(v ...string) func(*TasksListRequest)

WithFilterPath filters the properties of the response body.

func (TasksList) WithGroupBy

func (f TasksList) WithGroupBy(v string) func(*TasksListRequest)

WithGroupBy - group tasks by nodes or parent/child relationships.

func (TasksList) WithHuman

func (f TasksList) WithHuman() func(*TasksListRequest)

WithHuman makes statistical values human-readable.

func (TasksList) WithNodes

func (f TasksList) WithNodes(v ...string) func(*TasksListRequest)

WithNodes - a list of node ids or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes.

func (TasksList) WithParentTaskID

func (f TasksList) WithParentTaskID(v string) func(*TasksListRequest)

WithParentTaskID - return tasks with specified parent task ID (node_id:task_number). set to -1 to return all..

func (TasksList) WithPretty

func (f TasksList) WithPretty() func(*TasksListRequest)

WithPretty makes the response body pretty-printed.

func (TasksList) WithTimeout

func (f TasksList) WithTimeout(v time.Duration) func(*TasksListRequest)

WithTimeout - explicit operation timeout.

func (TasksList) WithWaitForCompletion

func (f TasksList) WithWaitForCompletion(v bool) func(*TasksListRequest)

WithWaitForCompletion - wait for the matching tasks to complete (default: false).

type TasksListRequest

type TasksListRequest struct {
	Actions           []string
	Detailed          *bool
	GroupBy           string
	Nodes             []string
	ParentTaskID      string
	Timeout           time.Duration
	WaitForCompletion *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

TasksListRequest configures the Tasks List API request.

func (TasksListRequest) Do

func (r TasksListRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Termvectors

type Termvectors func(index string, o ...func(*TermvectorsRequest)) (*Response, error)

Termvectors returns information and statistics about terms in the fields of a particular document.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html.

func (Termvectors) WithBody

func (f Termvectors) WithBody(v io.Reader) func(*TermvectorsRequest)

WithBody - Define parameters and or supply a document to get termvectors for. See documentation..

func (Termvectors) WithContext

func (f Termvectors) WithContext(v context.Context) func(*TermvectorsRequest)

WithContext sets the request context.

func (Termvectors) WithDocumentID

func (f Termvectors) WithDocumentID(v string) func(*TermvectorsRequest)

WithDocumentID - the ID of the document, when not specified a doc param should be supplied..

func (Termvectors) WithDocumentType

func (f Termvectors) WithDocumentType(v string) func(*TermvectorsRequest)

WithDocumentType - the type of the document..

func (Termvectors) WithErrorTrace

func (f Termvectors) WithErrorTrace() func(*TermvectorsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (Termvectors) WithFieldStatistics

func (f Termvectors) WithFieldStatistics(v bool) func(*TermvectorsRequest)

WithFieldStatistics - specifies if document count, sum of document frequencies and sum of total term frequencies should be returned..

func (Termvectors) WithFields

func (f Termvectors) WithFields(v ...string) func(*TermvectorsRequest)

WithFields - a list of fields to return..

func (Termvectors) WithFilterPath

func (f Termvectors) WithFilterPath(v ...string) func(*TermvectorsRequest)

WithFilterPath filters the properties of the response body.

func (Termvectors) WithHuman

func (f Termvectors) WithHuman() func(*TermvectorsRequest)

WithHuman makes statistical values human-readable.

func (Termvectors) WithOffsets

func (f Termvectors) WithOffsets(v bool) func(*TermvectorsRequest)

WithOffsets - specifies if term offsets should be returned..

func (Termvectors) WithParent

func (f Termvectors) WithParent(v string) func(*TermvectorsRequest)

WithParent - parent ID of documents..

func (Termvectors) WithPayloads

func (f Termvectors) WithPayloads(v bool) func(*TermvectorsRequest)

WithPayloads - specifies if term payloads should be returned..

func (Termvectors) WithPositions

func (f Termvectors) WithPositions(v bool) func(*TermvectorsRequest)

WithPositions - specifies if term positions should be returned..

func (Termvectors) WithPreference

func (f Termvectors) WithPreference(v string) func(*TermvectorsRequest)

WithPreference - specify the node or shard the operation should be performed on (default: random)..

func (Termvectors) WithPretty

func (f Termvectors) WithPretty() func(*TermvectorsRequest)

WithPretty makes the response body pretty-printed.

func (Termvectors) WithRealtime

func (f Termvectors) WithRealtime(v bool) func(*TermvectorsRequest)

WithRealtime - specifies if request is real-time as opposed to near-real-time (default: true)..

func (Termvectors) WithRouting

func (f Termvectors) WithRouting(v string) func(*TermvectorsRequest)

WithRouting - specific routing value..

func (Termvectors) WithTermStatistics

func (f Termvectors) WithTermStatistics(v bool) func(*TermvectorsRequest)

WithTermStatistics - specifies if total term frequency and document frequency should be returned..

func (Termvectors) WithVersion

func (f Termvectors) WithVersion(v int) func(*TermvectorsRequest)

WithVersion - explicit version number for concurrency control.

func (Termvectors) WithVersionType

func (f Termvectors) WithVersionType(v string) func(*TermvectorsRequest)

WithVersionType - specific version type.

type TermvectorsRequest

type TermvectorsRequest struct {
	Index        string
	DocumentType string
	DocumentID   string
	Body         io.Reader

	Fields          []string
	FieldStatistics *bool
	Offsets         *bool
	Parent          string
	Payloads        *bool
	Positions       *bool
	Preference      string
	Realtime        *bool
	Routing         string
	TermStatistics  *bool
	Version         *int
	VersionType     string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

TermvectorsRequest configures the Termvectors API request.

func (TermvectorsRequest) Do

func (r TermvectorsRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Transport

type Transport interface {
	Perform(*http.Request) (*http.Response, error)
}

Transport defines the interface for an API client.

type Update

type Update func(index string, id string, body io.Reader, o ...func(*UpdateRequest)) (*Response, error)

Update updates a document with a script or partial document.

See full documentation at http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html.

func (Update) WithContext

func (f Update) WithContext(v context.Context) func(*UpdateRequest)

WithContext sets the request context.

func (Update) WithDocumentType

func (f Update) WithDocumentType(v string) func(*UpdateRequest)

WithDocumentType - the type of the document.

func (Update) WithErrorTrace

func (f Update) WithErrorTrace() func(*UpdateRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (Update) WithFilterPath

func (f Update) WithFilterPath(v ...string) func(*UpdateRequest)

WithFilterPath filters the properties of the response body.

func (Update) WithHuman

func (f Update) WithHuman() func(*UpdateRequest)

WithHuman makes statistical values human-readable.

func (Update) WithIfPrimaryTerm

func (f Update) WithIfPrimaryTerm(v int) func(*UpdateRequest)

WithIfPrimaryTerm - only perform the update operation if the last operation that has changed the document has the specified primary term.

func (Update) WithIfSeqNo

func (f Update) WithIfSeqNo(v int) func(*UpdateRequest)

WithIfSeqNo - only perform the update operation if the last operation that has changed the document has the specified sequence number.

func (Update) WithLang

func (f Update) WithLang(v string) func(*UpdateRequest)

WithLang - the script language (default: painless).

func (Update) WithParent

func (f Update) WithParent(v string) func(*UpdateRequest)

WithParent - ID of the parent document. is is only used for routing and when for the upsert request.

func (Update) WithPretty

func (f Update) WithPretty() func(*UpdateRequest)

WithPretty makes the response body pretty-printed.

func (Update) WithRefresh

func (f Update) WithRefresh(v string) func(*UpdateRequest)

WithRefresh - if `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes..

func (Update) WithRetryOnConflict

func (f Update) WithRetryOnConflict(v int) func(*UpdateRequest)

WithRetryOnConflict - specify how many times should the operation be retried when a conflict occurs (default: 0).

func (Update) WithRouting

func (f Update) WithRouting(v string) func(*UpdateRequest)

WithRouting - specific routing value.

func (Update) WithSource

func (f Update) WithSource(v ...string) func(*UpdateRequest)

WithSource - true or false to return the _source field or not, or a list of fields to return.

func (Update) WithSourceExcludes

func (f Update) WithSourceExcludes(v ...string) func(*UpdateRequest)

WithSourceExcludes - a list of fields to exclude from the returned _source field.

func (Update) WithSourceIncludes

func (f Update) WithSourceIncludes(v ...string) func(*UpdateRequest)

WithSourceIncludes - a list of fields to extract and return from the _source field.

func (Update) WithTimeout

func (f Update) WithTimeout(v time.Duration) func(*UpdateRequest)

WithTimeout - explicit operation timeout.

func (Update) WithWaitForActiveShards

func (f Update) WithWaitForActiveShards(v string) func(*UpdateRequest)

WithWaitForActiveShards - sets the number of shard copies that must be active before proceeding with the update operation. defaults to 1, meaning the primary shard only. set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1).

type UpdateByQuery

type UpdateByQuery func(index []string, o ...func(*UpdateByQueryRequest)) (*Response, error)

UpdateByQuery performs an update on every document in the index without changing the source, for example to pick up a mapping change.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html.

func (UpdateByQuery) WithAllowNoIndices

func (f UpdateByQuery) WithAllowNoIndices(v bool) func(*UpdateByQueryRequest)

WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified).

func (UpdateByQuery) WithAnalyzeWildcard

func (f UpdateByQuery) WithAnalyzeWildcard(v bool) func(*UpdateByQueryRequest)

WithAnalyzeWildcard - specify whether wildcard and prefix queries should be analyzed (default: false).

func (UpdateByQuery) WithAnalyzer

func (f UpdateByQuery) WithAnalyzer(v string) func(*UpdateByQueryRequest)

WithAnalyzer - the analyzer to use for the query string.

func (UpdateByQuery) WithBody

func (f UpdateByQuery) WithBody(v io.Reader) func(*UpdateByQueryRequest)

WithBody - The search definition using the Query DSL.

func (UpdateByQuery) WithConflicts

func (f UpdateByQuery) WithConflicts(v string) func(*UpdateByQueryRequest)

WithConflicts - what to do when the update by query hits version conflicts?.

func (UpdateByQuery) WithContext

func (f UpdateByQuery) WithContext(v context.Context) func(*UpdateByQueryRequest)

WithContext sets the request context.

func (UpdateByQuery) WithDefaultOperator

func (f UpdateByQuery) WithDefaultOperator(v string) func(*UpdateByQueryRequest)

WithDefaultOperator - the default operator for query string query (and or or).

func (UpdateByQuery) WithDf

func (f UpdateByQuery) WithDf(v string) func(*UpdateByQueryRequest)

WithDf - the field to use as default where no field prefix is given in the query string.

func (UpdateByQuery) WithDocumentType

func (f UpdateByQuery) WithDocumentType(v ...string) func(*UpdateByQueryRequest)

WithDocumentType - a list of document types to search; leave empty to perform the operation on all types.

func (UpdateByQuery) WithErrorTrace

func (f UpdateByQuery) WithErrorTrace() func(*UpdateByQueryRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (UpdateByQuery) WithExpandWildcards

func (f UpdateByQuery) WithExpandWildcards(v string) func(*UpdateByQueryRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (UpdateByQuery) WithFilterPath

func (f UpdateByQuery) WithFilterPath(v ...string) func(*UpdateByQueryRequest)

WithFilterPath filters the properties of the response body.

func (UpdateByQuery) WithFrom

func (f UpdateByQuery) WithFrom(v int) func(*UpdateByQueryRequest)

WithFrom - starting offset (default: 0).

func (UpdateByQuery) WithHuman

func (f UpdateByQuery) WithHuman() func(*UpdateByQueryRequest)

WithHuman makes statistical values human-readable.

func (UpdateByQuery) WithIgnoreUnavailable

func (f UpdateByQuery) WithIgnoreUnavailable(v bool) func(*UpdateByQueryRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (UpdateByQuery) WithLenient

func (f UpdateByQuery) WithLenient(v bool) func(*UpdateByQueryRequest)

WithLenient - specify whether format-based query failures (such as providing text to a numeric field) should be ignored.

func (UpdateByQuery) WithPipeline

func (f UpdateByQuery) WithPipeline(v string) func(*UpdateByQueryRequest)

WithPipeline - ingest pipeline to set on index requests made by this action. (default: none).

func (UpdateByQuery) WithPreference

func (f UpdateByQuery) WithPreference(v string) func(*UpdateByQueryRequest)

WithPreference - specify the node or shard the operation should be performed on (default: random).

func (UpdateByQuery) WithPretty

func (f UpdateByQuery) WithPretty() func(*UpdateByQueryRequest)

WithPretty makes the response body pretty-printed.

func (UpdateByQuery) WithQuery

func (f UpdateByQuery) WithQuery(v string) func(*UpdateByQueryRequest)

WithQuery - query in the lucene query string syntax.

func (UpdateByQuery) WithRefresh

func (f UpdateByQuery) WithRefresh(v bool) func(*UpdateByQueryRequest)

WithRefresh - should the effected indexes be refreshed?.

func (UpdateByQuery) WithRequestCache

func (f UpdateByQuery) WithRequestCache(v bool) func(*UpdateByQueryRequest)

WithRequestCache - specify if request cache should be used for this request or not, defaults to index level setting.

func (UpdateByQuery) WithRequestsPerSecond

func (f UpdateByQuery) WithRequestsPerSecond(v int) func(*UpdateByQueryRequest)

WithRequestsPerSecond - the throttle to set on this request in sub-requests per second. -1 means no throttle..

func (UpdateByQuery) WithRouting

func (f UpdateByQuery) WithRouting(v ...string) func(*UpdateByQueryRequest)

WithRouting - a list of specific routing values.

func (UpdateByQuery) WithScroll

func (f UpdateByQuery) WithScroll(v time.Duration) func(*UpdateByQueryRequest)

WithScroll - specify how long a consistent view of the index should be maintained for scrolled search.

func (UpdateByQuery) WithScrollSize

func (f UpdateByQuery) WithScrollSize(v int) func(*UpdateByQueryRequest)

WithScrollSize - size on the scroll request powering the update by query.

func (UpdateByQuery) WithSearchTimeout

func (f UpdateByQuery) WithSearchTimeout(v time.Duration) func(*UpdateByQueryRequest)

WithSearchTimeout - explicit timeout for each search request. defaults to no timeout..

func (UpdateByQuery) WithSearchType

func (f UpdateByQuery) WithSearchType(v string) func(*UpdateByQueryRequest)

WithSearchType - search operation type.

func (UpdateByQuery) WithSize

func (f UpdateByQuery) WithSize(v int) func(*UpdateByQueryRequest)

WithSize - number of hits to return (default: 10).

func (UpdateByQuery) WithSlices

func (f UpdateByQuery) WithSlices(v int) func(*UpdateByQueryRequest)

WithSlices - the number of slices this task should be divided into. defaults to 1 meaning the task isn't sliced into subtasks..

func (UpdateByQuery) WithSort

func (f UpdateByQuery) WithSort(v ...string) func(*UpdateByQueryRequest)

WithSort - a list of <field>:<direction> pairs.

func (UpdateByQuery) WithSource

func (f UpdateByQuery) WithSource(v ...string) func(*UpdateByQueryRequest)

WithSource - true or false to return the _source field or not, or a list of fields to return.

func (UpdateByQuery) WithSourceExcludes

func (f UpdateByQuery) WithSourceExcludes(v ...string) func(*UpdateByQueryRequest)

WithSourceExcludes - a list of fields to exclude from the returned _source field.

func (UpdateByQuery) WithSourceIncludes

func (f UpdateByQuery) WithSourceIncludes(v ...string) func(*UpdateByQueryRequest)

WithSourceIncludes - a list of fields to extract and return from the _source field.

func (UpdateByQuery) WithStats

func (f UpdateByQuery) WithStats(v ...string) func(*UpdateByQueryRequest)

WithStats - specific 'tag' of the request for logging and statistical purposes.

func (UpdateByQuery) WithTerminateAfter

func (f UpdateByQuery) WithTerminateAfter(v int) func(*UpdateByQueryRequest)

WithTerminateAfter - the maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early..

func (UpdateByQuery) WithTimeout

func (f UpdateByQuery) WithTimeout(v time.Duration) func(*UpdateByQueryRequest)

WithTimeout - time each individual bulk request should wait for shards that are unavailable..

func (UpdateByQuery) WithVersion

func (f UpdateByQuery) WithVersion(v bool) func(*UpdateByQueryRequest)

WithVersion - specify whether to return document version as part of a hit.

func (UpdateByQuery) WithVersionType

func (f UpdateByQuery) WithVersionType(v bool) func(*UpdateByQueryRequest)

WithVersionType - should the document increment the version number (internal) on hit or not (reindex).

func (UpdateByQuery) WithWaitForActiveShards

func (f UpdateByQuery) WithWaitForActiveShards(v string) func(*UpdateByQueryRequest)

WithWaitForActiveShards - sets the number of shard copies that must be active before proceeding with the update by query operation. defaults to 1, meaning the primary shard only. set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1).

func (UpdateByQuery) WithWaitForCompletion

func (f UpdateByQuery) WithWaitForCompletion(v bool) func(*UpdateByQueryRequest)

WithWaitForCompletion - should the request should block until the update by query operation is complete..

type UpdateByQueryRequest

type UpdateByQueryRequest struct {
	Index        []string
	DocumentType []string
	Body         io.Reader

	AllowNoIndices      *bool
	Analyzer            string
	AnalyzeWildcard     *bool
	Conflicts           string
	DefaultOperator     string
	Df                  string
	ExpandWildcards     string
	From                *int
	IgnoreUnavailable   *bool
	Lenient             *bool
	Pipeline            string
	Preference          string
	Query               string
	Refresh             *bool
	RequestCache        *bool
	RequestsPerSecond   *int
	Routing             []string
	Scroll              time.Duration
	ScrollSize          *int
	SearchTimeout       time.Duration
	SearchType          string
	Size                *int
	Slices              *int
	Sort                []string
	Source              []string
	SourceExcludes      []string
	SourceIncludes      []string
	Stats               []string
	TerminateAfter      *int
	Timeout             time.Duration
	Version             *bool
	VersionType         *bool
	WaitForActiveShards string
	WaitForCompletion   *bool

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

UpdateByQueryRequest configures the Update By Query API request.

func (UpdateByQueryRequest) Do

func (r UpdateByQueryRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type UpdateByQueryRethrottle

type UpdateByQueryRethrottle func(task_id string, requests_per_second *int, o ...func(*UpdateByQueryRethrottleRequest)) (*Response, error)

UpdateByQueryRethrottle changes the number of requests per second for a particular Update By Query operation.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html.

func (UpdateByQueryRethrottle) WithContext

WithContext sets the request context.

func (UpdateByQueryRethrottle) WithErrorTrace

func (f UpdateByQueryRethrottle) WithErrorTrace() func(*UpdateByQueryRethrottleRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (UpdateByQueryRethrottle) WithFilterPath

func (f UpdateByQueryRethrottle) WithFilterPath(v ...string) func(*UpdateByQueryRethrottleRequest)

WithFilterPath filters the properties of the response body.

func (UpdateByQueryRethrottle) WithHuman

WithHuman makes statistical values human-readable.

func (UpdateByQueryRethrottle) WithPretty

WithPretty makes the response body pretty-printed.

func (UpdateByQueryRethrottle) WithRequestsPerSecond

func (f UpdateByQueryRethrottle) WithRequestsPerSecond(v int) func(*UpdateByQueryRethrottleRequest)

WithRequestsPerSecond - the throttle to set on this request in floating sub-requests per second. -1 means set no throttle..

type UpdateByQueryRethrottleRequest

type UpdateByQueryRethrottleRequest struct {
	TaskID            string
	RequestsPerSecond *int

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

UpdateByQueryRethrottleRequest configures the Update By Query Rethrottle API request.

func (UpdateByQueryRethrottleRequest) Do

Do executes the request and returns response or error.

type UpdateRequest

type UpdateRequest struct {
	Index        string
	DocumentType string
	DocumentID   string
	Body         io.Reader

	IfPrimaryTerm       *int
	IfSeqNo             *int
	Lang                string
	Parent              string
	Refresh             string
	RetryOnConflict     *int
	Routing             string
	Source              []string
	SourceExcludes      []string
	SourceIncludes      []string
	Timeout             time.Duration
	WaitForActiveShards string

	Pretty     bool
	Human      bool
	ErrorTrace bool
	FilterPath []string
	// contains filtered or unexported fields
}

UpdateRequest configures the Update API request.

func (UpdateRequest) Do

func (r UpdateRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

Source Files

Jump to

Keyboard shortcuts

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