Class: Elasticsearch::Model::Node
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Elasticsearch::Model::Node
- Extended by:
- Representer
- Defined in:
- lib/elasticsearch/model/node.rb
Defined Under Namespace
Modules: Representer
Instance Method Summary collapse
- #count_initializing_shards ⇒ Object
- #count_relocating_shards ⇒ Object
- #count_started_shards ⇒ Object
Instance Method Details
#count_initializing_shards ⇒ Object
38 39 40 |
# File 'lib/elasticsearch/model/node.rb', line 38 def count_initializing_shards shards.select { |s| s.state.upcase == 'INITIALIZING' }.length end |
#count_relocating_shards ⇒ Object
42 43 44 |
# File 'lib/elasticsearch/model/node.rb', line 42 def count_relocating_shards shards.select { |s| s.state.upcase == 'RELOCATING' }.length end |
#count_started_shards ⇒ Object
46 47 48 |
# File 'lib/elasticsearch/model/node.rb', line 46 def count_started_shards shards.select { |s| s.state.upcase == 'STARTED' }.length end |