class Cauchy::Elastic::Client
Attributes
server[R]
Public Class Methods
new(config)
click to toggle source
# File lib/cauchy/elastic/client.rb, line 11 def initialize(config) @server = Elasticsearch::Client.new(config) end
Public Instance Methods
bulk(body)
click to toggle source
# File lib/cauchy/elastic/client.rb, line 19 def bulk(body) server.bulk body: body end
index(name)
click to toggle source
# File lib/cauchy/elastic/client.rb, line 15 def index(name) Index.new(server, name) end
update_aliases(body)
click to toggle source
# File lib/cauchy/elastic/client.rb, line 23 def update_aliases(body) server.indices.update_aliases body: body end