Class: Esearch::Cluster

Inherits:
Object
  • Object
show all
Includes:
Adamantium::Flat
Defined in:
lib/esearch/cluster.rb

Overview

Handle for an elasticsearch cluster

Constant Summary collapse

PATH =
Pathname.new('/')

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#connectionConnection (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return connection



13
14
15
# File 'lib/esearch/cluster.rb', line 13

def connection
  @connection
end

Class Method Details

.connect(*args) ⇒ Connection

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Build connection



80
81
82
# File 'lib/esearch/cluster.rb', line 80

def self.connect(*args)
  new(Connection.build(*args))
end

Instance Method Details

#all_indicesIndices::All

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return handler for all indices



69
70
71
# File 'lib/esearch/cluster.rb', line 69

def all_indices
  Indices::All.new(connection)
end

#health(options = {}) ⇒ Presenter::Health

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return cluster health



47
48
49
# File 'lib/esearch/cluster.rb', line 47

def health(options = {})
  Command::Cluster::Health.run(self, options)
end

#index(name) ⇒ Index

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return handler for index



23
24
25
# File 'lib/esearch/cluster.rb', line 23

def index(name)
  Index.new(connection, name)
end

#indices(names) ⇒ Indices

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return handler for indices



35
36
37
# File 'lib/esearch/cluster.rb', line 35

def indices(names)
  Indices.new(connection, names)
end

#pathPathname

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return path



57
58
59
# File 'lib/esearch/cluster.rb', line 57

def path
  self.class::PATH
end