Sha256: 31b66585eabc7ff561d86aa9baa8cec9354cd1093a9a292d607dba41bd98c240

Contents?: true

Size: 543 Bytes

Versions: 10

Compression:

Stored size: 543 Bytes

Contents

module Elasticsearch
  module API
    module Actions

      # Returns true if the cluster returns a sucessfull HTTP response, false otherwise.
      #
      # @example
      #
      #     client.ping
      #
      # @see http://elasticsearch.org/guide/
      #
      def ping(arguments={})
        method = HTTP_HEAD
        path   = ""
        params = {}
        body   = nil

        Utils.__rescue_from_not_found do
          perform_request(method, path, params, body).status == 200 ? true : false
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
elasticsearch-api-1.0.17 lib/elasticsearch/api/actions/ping.rb
elasticsearch-api-1.0.16 lib/elasticsearch/api/actions/ping.rb
elasticsearch-api-1.0.16.pre2 lib/elasticsearch/api/actions/ping.rb
elasticsearch-api-1.0.16.pre lib/elasticsearch/api/actions/ping.rb
elasticsearch-api-1.0.15 lib/elasticsearch/api/actions/ping.rb
elasticsearch-api-1.0.14 lib/elasticsearch/api/actions/ping.rb
elasticsearch-api-1.0.13 lib/elasticsearch/api/actions/ping.rb
elasticsearch-api-1.0.12 lib/elasticsearch/api/actions/ping.rb
elasticsearch-api-1.0.11 lib/elasticsearch/api/actions/ping.rb
elasticsearch-api-1.0.10 lib/elasticsearch/api/actions/ping.rb