elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb
# Provides quick access to the document count of the entire cluster, or individual indices.
#
# @option arguments [List] :index A comma-separated list of index names to limit the returned information
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
# @option arguments [List] :h Comma-separated list of column names to display
# @option arguments [Boolean] :help Return help information
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
# @option arguments [Boolean] :v Verbose mode. Display column headers
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html
#
Provides quick access to the document count of the entire cluster, or individual indices.
Provides quick access to the document count of the entire cluster or individual indices .
def count(arguments = {})
          headers = arguments.delete(:headers) || {}
          body = nil
          arguments = arguments.clone
          _index = arguments.delete(:index)
          method = Elasticsearch::API::HTTP_GET
          path   = if _index
                     "_cat/count/#{Utils.__listify(_index)}"
                   else
                     "_cat/count"
                   end
          params = Utils.process_params(arguments)
          params[:h] = Utils.__listify(params[:h]) if params[:h]
          perform_request(method, path, params, body, headers).body
        end
def count ( arguments = { } ) headers = arguments . delete ( :headers ) || { } body = nil arguments = arguments . clone _index = arguments . delete ( :index ) method = Elasticsearch :: API :: HTTP_GET path = if _index "_cat/count/#{Utils.__listify(_index)}" else "_cat/count" end params = Utils . process_params ( arguments ) params [ :h ] = Utils . __listify ( params [ :h ] ) if params [ :h ] perform_request ( method , path , params , body , headers ) . body end
Provides quick access to the document count of the entire cluster, or individual indices.
Provides quick access to the document count of the entire cluster or individual indices .
arguments
:headers Custom HTTP headers
: headers Custom HTTP headers
see
None