Module: Metacrunch::Elasticsearch::ClientFactory

Included in:
IndexCreator, Indexer, Searcher
Defined in:
lib/metacrunch/elasticsearch/client_factory.rb

Instance Method Summary collapse

Instance Method Details

#client_factoryObject



5
6
7
8
9
10
11
12
13
14
# File 'lib/metacrunch/elasticsearch/client_factory.rb', line 5

def client_factory
  client_options = {
    host: @host,
    hosts: @hosts,
    url: @url,
    urls: @urls
  }.compact

  Elasticsearch::Client.new(client_options)
end