Class: Elasticity::InstrumentedClient

Inherits:
Object
  • Object
show all
Defined in:
lib/elasticity/instrumented_client.rb

Constant Summary collapse

INDICES_METHODS =
%w(exists create delete get_settings get_mapping flush refresh get_alias get_aliases put_alias delete_alias exists_alias update_aliases)
INDEX_METHODS =
%w(index delete get mget search count msearch scroll delete_by_query bulk)

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ InstrumentedClient

Returns a new instance of InstrumentedClient.



6
7
8
# File 'lib/elasticity/instrumented_client.rb', line 6

def initialize(client)
  @client = client
end

Instance Method Details

#versionsObject



10
11
12
# File 'lib/elasticity/instrumented_client.rb', line 10

def versions
  (@client.cluster.stats["nodes"] && @client.cluster.stats["nodes"]["versions"]) || []
end