Class: Elasticsearch::Model::Node

Inherits:
OpenStruct
  • Object
show all
Extended by:
Representer
Defined in:
lib/elasticsearch/model/node.rb

Defined Under Namespace

Modules: Representer

Instance Method Summary collapse

Instance Method Details

#count_initializing_shardsObject



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_shardsObject



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_shardsObject



46
47
48
# File 'lib/elasticsearch/model/node.rb', line 46

def count_started_shards
  shards.select { |s| s.state.upcase == 'STARTED' }.length
end