Module: Elasticsearch::XPack::API::Enrich::Actions
- Included in:
- EnrichClient
- Defined in:
- lib/elasticsearch/xpack/api/namespace/enrich.rb,
lib/elasticsearch/xpack/api/actions/enrich/stats.rb,
lib/elasticsearch/xpack/api/actions/enrich/get_policy.rb,
lib/elasticsearch/xpack/api/actions/enrich/put_policy.rb,
lib/elasticsearch/xpack/api/actions/enrich/delete_policy.rb,
lib/elasticsearch/xpack/api/actions/enrich/execute_policy.rb,
lib/elasticsearch/xpack/api/actions/enrich/params_registry.rb
Defined Under Namespace
Modules: ParamsRegistry
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.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/elasticsearch/xpack/api/actions/enrich/delete_policy.rb', line 30 def delete_policy(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] headers = arguments.delete(:headers) || {} arguments = arguments.clone _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE path = "_enrich/policy/#{Elasticsearch::API::Utils.__listify(_name)}" params = {} body = nil perform_request(method, path, params, body, headers).body end |
#execute_policy(arguments = {}) ⇒ Object
Creates the enrich index for an existing enrich policy.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/elasticsearch/xpack/api/actions/enrich/execute_policy.rb', line 31 def execute_policy(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] headers = arguments.delete(:headers) || {} arguments = arguments.clone _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT path = "_enrich/policy/#{Elasticsearch::API::Utils.__listify(_name)}/_execute" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end |
#get_policy(arguments = {}) ⇒ Object
Gets information about an enrich policy.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/elasticsearch/xpack/api/actions/enrich/get_policy.rb', line 30 def get_policy(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET path = if _name "_enrich/policy/#{Elasticsearch::API::Utils.__listify(_name)}" else "_enrich/policy" end params = {} body = nil perform_request(method, path, params, body, headers).body end |
#put_policy(arguments = {}) ⇒ Object
Creates a new enrich policy.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/elasticsearch/xpack/api/actions/enrich/put_policy.rb', line 31 def put_policy(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] headers = arguments.delete(:headers) || {} arguments = arguments.clone _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT path = "_enrich/policy/#{Elasticsearch::API::Utils.__listify(_name)}" params = {} body = arguments[:body] perform_request(method, path, params, body, headers).body end |
#stats(arguments = {}) ⇒ Object
Gets enrich coordinator statistics and information about enrich policies that are currently executing.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/elasticsearch/xpack/api/actions/enrich/stats.rb', line 29 def stats(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone method = Elasticsearch::API::HTTP_GET path = "_enrich/_stats" params = {} body = nil perform_request(method, path, params, body, headers).body end |