Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions new_docs/contents/elasticsearch-net/cluster-failover.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Configuring how the registered `IConnectionPool` should behave happens on the `I

#### SniffOnConnectionFault()
Should the connection pool resniff the cluster state everytime an operation on a node throws an exception or a faulty http status code.
Defaults to false.
Defaults to true.

#### SniffOnStartup()
Should the connection pool sniff the cluster state the first time its instantiated. Defaults to false.
Should the connection pool sniff the cluster state the first time its instantiated. Defaults to true.

#### SniffLifeSpan()
When set will cause the connectionpool to resniff whenever it notices the last sniff information happened too long ago. Defaults to null.
Expand Down
7 changes: 3 additions & 4 deletions new_docs/contents/nest/cluster/nodes-stats.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ menuitem: nodes-stats

# Nodes stats

var r = this._client.NodeInfo(NodesInfo.All);

var node = r.Nodes.First();
var r = this._client.NodeInfo(NodesInfo.All);
var node = r.Nodes.First();

You can than traverse the node info objects i.e:

node.Value.OS.Cpu.CacheSizeInBytes;
node.Value.OS.Cpu.CacheSizeInBytes;

14 changes: 13 additions & 1 deletion new_docs/contents/nest/cluster/state.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,17 @@ menuitem: state

# Cluster state

cluster state has not yet been mapped
## Get state

To get the basic cluster state, call:

var state = _client.ClusterState();

This returns a IClusterStateResponse that contains information about the master node, all nodes in the cluster and such.

## Get specific part of state

If you only want a specific part, i.e. only information about nodes, you can do the following:

var state = _client.ClusterState(c => c
.Metrics(ClusterStateMetric.Nodes));
29 changes: 25 additions & 4 deletions new_docs/contents/nest/indices/aliases.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,37 @@ menuitem: aliases

#Aliasing

Adding/removing and updating aliases are also easy to do in NEST. For more information look at the [Alias Doc](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-aliases.html)

## Adding

var response = this.ConnectedClient.Alias("nest_test_data", "nest_test_data2");
_client.Alias(a => a
.Add(add => add
.Index("myindex")
.Alias("myalias")));

## Removing

_client.Alias(a => a
.Remove(remove => remove
.Index("myindex")
.Alias("myalias")));


## Renaming

var response = this.ConnectedClient.Rename("nest_test_data", "nest_test_data2", "nest_test_data3");
To rename a alias, just do an Add and a Remove in the same operation. Elasticsearch will then atomically rename your alias

_client.Alias(a => a
.Add(add => add
.Index("myindex")
.Alias("newalias"))
.Remove(remove => remove
.Index("myindex")
.Alias("oldalias")));

## Removing
## Asynchronous

Doing alias operations Async is simple:

var response = this.ConnectedClient.RemoveAlias("nest_test_data", "nest_test_data3");
_client.AliasAsync(...);