Class: Octo::Search::Client
- Inherits:
-
Object
- Object
- Octo::Search::Client
- Includes:
- Elasticsearch::API
- Defined in:
- lib/octocore-cassandra/search/client.rb
Constant Summary collapse
- CONNECTION =
::Faraday::Connection.new(url: Octo.get_config(:search)[:server])
Instance Method Summary collapse
-
#perform_request(method, path, params, body) ⇒ Object
Low level method for performing a request to Elastic Search cluster.
Instance Method Details
#perform_request(method, path, params, body) ⇒ Object
Low level method for performing a request to Elastic Search cluster
21 22 23 24 25 26 27 28 29 |
# File 'lib/octocore-cassandra/search/client.rb', line 21 def perform_request(method, path, params, body) Octo.logger.debug "--> #{method.upcase} #{path} #{params} #{body}" CONNECTION.run_request \ method.downcase.to_sym, path, ( body ? MultiJson.dump(body): nil ), {'Content-Type' => 'application/json'} end |