Module: Utils::Elasticsearch::Request

Defined in:
lib/bas/utils/elasticsearch/request.rb

Overview

This module is a ElasticsearchDB utility to make requests to a Elasticsearch database.

Class Method Summary collapse

Class Method Details

.execute(params) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/bas/utils/elasticsearch/request.rb', line 26

def execute(params)
  client = ::Elasticsearch::Client.new(
    host: params[:connection][:host],
    port: params[:connection][:port],
    user: params[:connection][:user],
    password: params[:connection][:password],
    api_versioning: false,
    transport_options: build_ssl_options(params[:connection])
  )

  perform_request(params, client)
end