Module: Elasticsearch::API::Enrich::Actions
- Included in:
- EnrichClient
- Defined in:
- lib/elasticsearch/api/namespace/enrich.rb,
lib/elasticsearch/api/actions/enrich/stats.rb,
lib/elasticsearch/api/actions/enrich/get_policy.rb,
lib/elasticsearch/api/actions/enrich/put_policy.rb,
lib/elasticsearch/api/actions/enrich/delete_policy.rb,
lib/elasticsearch/api/actions/enrich/execute_policy.rb
Instance Method Summary collapse
-
#delete_policy(arguments = {}) ⇒ Object
Deletes an existing enrich policy and its enrich index.
-
#execute_policy(arguments = {}) ⇒ Object
Creates the enrich index for an existing enrich policy.
-
#get_policy(arguments = {}) ⇒ Object
Gets information about an enrich policy.
-
#put_policy(arguments = {}) ⇒ Object
Creates a new enrich policy.
-
#stats(arguments = {}) ⇒ Object
Gets enrich coordinator statistics and information about enrich policies that are currently executing.
Instance Method Details
#delete_policy(arguments = {}) ⇒ Object
Deletes an existing enrich policy and its enrich index.
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/elasticsearch/api/actions/enrich/delete_policy.rb', line 32 def delete_policy(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE path = "_enrich/policy/#{Utils.__listify(_name)}" params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers) ) end |
#execute_policy(arguments = {}) ⇒ Object
Creates the enrich index for an existing enrich policy.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/elasticsearch/api/actions/enrich/execute_policy.rb', line 33 def execute_policy(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT path = "_enrich/policy/#{Utils.__listify(_name)}/_execute" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers) ) end |
#get_policy(arguments = {}) ⇒ Object
Gets information about an enrich policy.
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/elasticsearch/api/actions/enrich/get_policy.rb', line 32 def get_policy(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET path = if _name "_enrich/policy/#{Utils.__listify(_name)}" else "_enrich/policy" end params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers) ) end |
#put_policy(arguments = {}) ⇒ Object
Creates a new enrich policy.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/elasticsearch/api/actions/enrich/put_policy.rb', line 33 def put_policy(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT path = "_enrich/policy/#{Utils.__listify(_name)}" params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers) ) end |
#stats(arguments = {}) ⇒ Object
Gets enrich coordinator statistics and information about enrich policies that are currently executing.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/elasticsearch/api/actions/enrich/stats.rb', line 31 def stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil method = Elasticsearch::API::HTTP_GET path = "_enrich/_stats" params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers) ) end |