class ElastomerClient::Client::Reindex
Attributes
Public Class Methods
Source
# File lib/elastomer_client/client/reindex.rb, line 16 def initialize(client) @client = client end
Create a new Reindex
for initiating reindex tasks. More context: www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html
client - ElastomerClient::Client
used for HTTP requests to the server
Public Instance Methods
Source
# File lib/elastomer_client/client/reindex.rb, line 22 def reindex(body, params = {}) response = client.post "/_reindex", params.merge(body:, action: "reindex", rest_api: "reindex") response.body end
Source
# File lib/elastomer_client/client/reindex.rb, line 27 def rethrottle(task_id, params = {}) response = client.post "/_reindex/#{task_id}/_rethrottle", params.merge(action: "rethrottle", rest_api: "reindex") response.body end