Module: ElasticSearch::Transport::BaseProtocol

Includes:
ClusterAdminProtocol, IndexAdminProtocol, IndexProtocol, ProtocolHelpers
Included in:
Base
Defined in:
lib/elasticsearch/transport/base_protocol.rb

Instance Method Summary collapse

Methods included from ClusterAdminProtocol

#cluster_health, #cluster_state, #nodes_info, #nodes_stats, #restart_nodes, #shutdown_nodes

Methods included from IndexAdminProtocol

#alias_index, #create_index, #delete_index, #flush, #index_status, #optimize, #refresh, #snapshot, #update_mapping

Methods included from IndexProtocol

#count, #delete, #get, #index, #scroll, #search

Instance Method Details

#all_nodesObject



223
224
225
226
227
228
229
230
231
# File 'lib/elasticsearch/transport/base_protocol.rb', line 223

def all_nodes
  http_addresses = nodes_info([])["nodes"].collect { |id, node| node["http_address"] }
  http_addresses.collect! do |a|
    if a =~ /inet\[.*\/([\d.:]+)\]/
      $1
    end
  end.compact!
  http_addresses
end