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('/').freeze
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
16 17 18 |
# File 'lib/esearch/cluster.rb', line 16 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
81 82 83 |
# File 'lib/esearch/cluster.rb', line 81 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
70 71 72 |
# File 'lib/esearch/cluster.rb', line 70 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
50 51 52 |
# File 'lib/esearch/cluster.rb', line 50 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
26 27 28 |
# File 'lib/esearch/cluster.rb', line 26 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
38 39 40 |
# File 'lib/esearch/cluster.rb', line 38 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
60 61 62 |
# File 'lib/esearch/cluster.rb', line 60 def path PATH end |