This section is empty.
View Sourcevar ( ErrRepositoryNameRequired = errors.New("Repository Name is required") ErrRepositoryTypeRequired = errors.New("Repository Type is required") )
This section is empty.
Represent the two possible aliases actions: add or remove
type AllocateStalePrimary struct { Node string `json:"node,omitempty"` Index string `json:"index,omitempty"` Shard *int `json:"shard,omitempty"` AcceptDataLoss bool `json:"accept_data_loss,omitempty"` }
Hold connection information to a Elasticsearch cluster.
Initialize a new vulcanizer client to use. Deprecated: NewClient has been deprecated in favor of using struct initialization.
AllocateStalePrimary allows to manually allocate a stale primary shard to a specific node
Close an index on the cluster
Use case: You want to close an opened index
Delete an index in the cluster.
Use case: You want to remove an index and all of its data.
Delete an index in the cluster with query parameters.
Use case: You want to remove an index and all of its data. You also want to specify query parameters such as timeout.
Delete a snapshot
Use case: You want to delete older snapshots so that they don't take up extra space.
Set shard allocation exclusion rules such that the Elasticsearch node with the name `serverToDrain` is excluded. This should cause Elasticsearch to migrate shards away from that node.
Use case: You need to restart an Elasticsearch node. In order to do so safely, you should migrate data away from it. Calling `DrainServer` with the node name will move data off of the specified node.
Removes all shard allocation exclusion rules.
Use case: You had been performing maintenance on a number of Elasticsearch nodes. They are all ready to receive data again. Calling `FillAll` will remove all the allocation exclusion rules on the cluster, allowing Elasticsearch to freely allocate shards on the previously excluded nodes.
Set shard allocation exclusion rules such that the Elasticsearch node with the name `serverToFill` is no longer being excluded. This should cause Elasticsearch to migrate shards to that node.
Use case: You have completed maintenance on an Elasticsearch node and it's ready to hold data again. Calling `FillOneServer` with the node name will remove that node name from the shard exclusion rules and allow data to be relocated onto the node.
Get a subset the aliases in the cluster.
Use case: You want to see some basic info on a subset of the aliases of the cluster
Get all the aliases in the cluster.
Use case: You want to see some basic info on all the aliases of the cluster
Get all the indices in the cluster.
Use case: You want to see some basic info on all the indices of the cluster.
Get current cluster settings for shard allocation exclusion rules.
Get all the persistent and transient cluster settings.
Use case: You want to see the current settings in the cluster.
Get the health of the cluster.
Use case: You want to see information needed to determine if the Elasticsearch cluster is healthy (green) or not (yellow/red).
Get a subset of indices including hidden ones
GetHotThreads allows to get the current hot threads on each node on the cluster
Get the settings of an index in a machine-oriented format.
Use case: You can view the custom settings that are set on a particular index.
Get all the nodes and their allocation/disk usage in the cluster.
Use case: You want to see how much disk is being used by the nodes in the cluster.
Get all the nodes in the cluster.
Use case: You want to see what nodes Elasticsearch considers part of the cluster.
GetNodesHotThreads allows to get the current hot threads on given nodes on the cluster
Get the mappings of an index in a pretty-printed format.
Use case: You can view the custom mappings that are set on a particular index.
Get the segments of an index in a pretty-printed format
Use case: you can view the segments of a particular index
Get the settings of an index in a pretty-printed format.
Use case: You can view the custom settings that are set on a particular index.
List snapshot repositories on the cluster
Use case: You want to see all of the configured backup repositories on the given cluster, what types they are and if they are verified.
Get details regarding shard distribution across a given set of cluster nodes.
Use case: You can leverage this information to determine if it's safe to remove cluster nodes without losing data.
Get details regarding shard recovery operations across a set of cluster nodes.
Use case: You can view the shard recovery progress of the cluster.
Get details regarding shard recovery operations across a set of cluster nodes sending the desired query parameters
Use case: You can view the shard recovery progress of the cluster with the bytes=b parameter.
Get shard data for all or a subset of nodes
Use case: You can view shard information on all nodes or a subset.
Get detailed information about a particular snapshot.
Use case: You had a snapshot fail and you want to see the reason why and what shards/nodes the error occurred on.
List the snapshots of the given repository.
Use case: You want to see information on snapshots in a repository.
LicenseCluster takes in the Elasticsearch license encoded as a string
Interact with aliases in the cluster.
Use case: You want to add, delete or update an index alias
Open an index on the cluster
Use case: You want to open a closed index
Register a snapshot repository
Use case: Register a snapshot repository in Elasticsearch
RemoveIndexILMPolicy removes the ILM policy from the index
Remove a snapshot repository
Use case: Remove a snapshot repository in Elasticsearch
RerouteWithRetryFailed retries allocation of shards that are blocked due to too many subsequent allocation failures.
Restore an index or indices on the cluster
Use case: You want to restore a particular index or indices onto your cluster with a new name.
Enables or disables allocation for the cluster.
Use case: You are performing an operation the cluster where nodes may be dropping in and out. Elasticsearch will typically try to rebalance immediately but you want the cluster to hold off rebalancing until you complete your task. Calling `SetAllocation("disable")` will disable allocation so Elasticsearch won't move/relocate any shards. Once you complete your task, calling `SetAllocation("enable")` will allow Elasticsearch to relocate shards again.
Set a new value for a cluster setting. Returns existing value and new value as well as error, in that order If the setting is not set in Elasticsearch (it's falling back to default configuration) SetClusterSetting's existingValue will be nil. If the value provided is nil, SetClusterSetting will remove the setting so that Elasticsearch falls back on default configuration for that setting.
Use case: You've doubled the number of nodes in your cluster and you want to increase the number of shards the cluster can relocate at one time. Calling `SetClusterSetting("cluster.routing.allocation.cluster_concurrent_rebalance", "100")` will update that value with the cluster. Once data relocation is complete you can decrease the setting by calling `SetClusterSetting("cluster.routing.allocation.cluster_concurrent_rebalance", "20")`.
Set a setting on an index.
Use case: Set or update an index setting for a particular index.
Take a snapshot of all indices on the cluster to the given repository
Use case: You want to backup all of the indices on the cluster to the given repository.
func (*Client) SnapshotAllIndicesWithBodyParams ¶ added in v0.14.4Take a snapshot of all indices on the cluster to the given repository with body params
Use case: You want to backup all of the indices on the cluster to the given repository with body params
Take a snapshot of specific indices on the cluster to the given repository
Use case: You want to backup certain indices on the cluster to the given repository.
Verify a snapshot repository
Use case: Have Elasticsearch verify a repository to make sure that all nodes can access the snapshot location correctly.
type ClusterAllocationExplainRequest struct { CurrentNode string `json:"current_node,omitempty"` Index string `json:"index,omitempty"` Primary bool `json:"primary,omitempty"` Shard *int `json:"shard,omitempty"` }
ClusterAllocationExplainRequest represents request data that can be sent to `_cluster/allocation/explain` calls
type ClusterSettings struct { PersistentSettings []Setting TransientSettings []Setting }
Holds slices for persistent and transient cluster settings.
type ReloadSecureSettingsResponse struct { Summary struct { Total int `json:"total"` Failed int `json:"failed"` Successful int `json:"successful"` } `json:"_nodes"` ClusterName string `json:"cluster_name"` Nodes map[string]struct { Name string `json:"name"` ReloadException *struct { Type string `json:"type"` Reason string `json:"reason"` } `json:"reload_exception"` } `json:"nodes"` }
Holds information about an Elasticsearch snapshot repository.
type RerouteRequest struct { Commands []RerouteCommand `json:"commands,omitempty"` }
A setting name and value with the setting name to be a "collapsed" version of the setting. A setting of:
{ "indices": { "recovery" : { "max_bytes_per_sec": "10mb" } } }
would be represented by:
ClusterSetting{ Setting: "indices.recovery.max_bytes_per_sec", Value: "10mb" }
Holds information about overlapping shards for a given set of cluster nodes
Can we safely remove nodes without data loss?
type ShardRecovery struct { Index string `json:"index"` Shard string `json:"shard"` Time string `json:"time"` Type string `json:"type"` Stage string `json:"stage"` SourceHost string `json:"source_host"` SourceNode string `json:"source_node"` TargetHost string `json:"target_host"` TargetNode string `json:"target_node"` Repository string `json:"repository"` Snapshot string `json:"snapshot"` Files int `json:"files,string"` FilesRecovered int `json:"files_recovered,string"` FilesPercent string `json:"files_percent"` FilesTotal int `json:"files_total,string"` Bytes int `json:"bytes,string"` BytesRecovered int `json:"bytes_recovered,string"` BytesPercent string `json:"bytes_percent"` BytesTotal int `json:"bytes_total,string"` TranslogOps int `json:"translog_ops,string"` TranslogOpsRecovered int `json:"translog_ops_recovered,string"` TranslogOpsPercent string `json:"translog_ops_percent"` }
Holds information about shard recovery based on the _cat/recovery API: https://www.elastic.co/guide/en/elasticsearch/reference/5.6/cat-recovery.html
func (ShardRecovery) TimeRemaining ¶ added in v0.5.0Estimate time remaining for recovery
type Snapshot struct { State string `json:"state"` Name string `json:"snapshot"` StartTime time.Time `json:"start_time"` EndTime time.Time `json:"end_time"` DurationMillis int `json:"duration_in_millis"` Indices []string `json:"indices"` Shards struct { Total int `json:"total"` Failed int `json:"failed"` Successful int `json:"successful"` } `json:"shards"` Failures []struct { Index string `json:"index"` ShardID int `json:"shard_id"` Reason string `json:"reason"` NodeID string `json:"node_id"` Status string `json:"status"` } `json:"failures"` }
Holds information about an Elasticsearch snapshot, based on the snapshot API: https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
GetDuration gets the total duration of a snapshot
GetEndTime gets the time when a snapshot ended
type Token struct { Text string `json:"token"` StartOffset int `json:"start_offset"` EndOffset int `json:"end_offset"` Type string `json:"type"` Position int `json:"position"` }
Holds information about the tokens that Elasticsearch analyzes
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4