Module: Eson::HTTP::Count

Extended by:
API
Includes:
Shared::Search
Defined in:
lib/eson/http/core/count.rb

Instance Method Summary collapse

Methods included from API

request_method

Instance Method Details

#bare_pathObject



9
10
11
12
13
14
15
# File 'lib/eson/http/core/count.rb', line 9

def bare_path
  unless types.empty?
    path = "{indices}/{types}/"
  else
    path = "{indices}/"
  end
end

#pathObject



17
18
19
# File 'lib/eson/http/core/count.rb', line 17

def path
  path = bare_path + "_count"
end

#sourceObject



21
22
23
# File 'lib/eson/http/core/count.rb', line 21

def source
  MultiJson.encode(query)
end