Class: Esearch::Cluster
- Inherits:
-
Object
- Object
- Esearch::Cluster
- 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
-
#connection ⇒ Connection
readonly
private
Return connection.
Class Method Summary collapse
-
.connect(*args) ⇒ Connection
private
Build connection.
Instance Method Summary collapse
-
#all_indices ⇒ Indices::All
private
Return handler for all indices.
-
#health(options = {}) ⇒ Presenter::Health
private
Return cluster health.
-
#index(name) ⇒ Index
private
Return handler for index.
-
#indices(names) ⇒ Indices
private
Return handler for indices.
-
#path ⇒ Pathname
private
Return path.
Instance Attribute Details
#connection ⇒ Connection (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_indices ⇒ Indices::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( = {}) Command::Cluster::Health.run(self, ) 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 |
#path ⇒ Pathname
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 |