def client
      return @client unless @client.nil?
      @client = ::Elasticsearch::Client.new(
        hosts: hosts,
        retry_on_failure: true,
        log: true,
        logger: ::Logger.new('es_client.log', 10, 1_024_000)
      )
    end
def client
      return @client unless @client.nil?
      @client = ::Elasticsearch::Client.new(
        hosts: hosts,
        retry_on_failure: true,
        log: true,
        logger: ::Logger.new('es_client.log', 10, 1_024_000)
      )
    end
Sets up the Elasticsearch client

 @option [String] :hosts ('localhost:9200') The Elasticsearch hosts
   to connect to
 @return [Elasticsearch::Transport::Client] Elasticsearch transport client
 The Elasticsearch client object