Module: Elasticsearch::API::Ingest::Actions
- Included in:
- IngestClient
- Defined in:
- lib/elasticsearch/api/namespace/ingest.rb,
lib/elasticsearch/api/actions/ingest/simulate.rb,
lib/elasticsearch/api/actions/ingest/get_pipeline.rb,
lib/elasticsearch/api/actions/ingest/put_pipeline.rb,
lib/elasticsearch/api/actions/ingest/processor_grok.rb,
lib/elasticsearch/api/actions/ingest/delete_pipeline.rb,
lib/elasticsearch/api/actions/ingest/params_registry.rb
Defined Under Namespace
Modules: ParamsRegistry
Instance Method Summary collapse
-
#delete_pipeline(arguments = {}) ⇒ Object
Delete a speficied pipeline.
-
#get_pipeline(arguments = {}) ⇒ Object
Return a specified pipeline.
-
#processor_grok(arguments = {}) ⇒ Object
Extracts structured fields out of a single text field within a document.
-
#put_pipeline(arguments = {}) ⇒ Object
Add or update a specified pipeline.
-
#simulate(arguments = {}) ⇒ Object
Execute a specific pipeline against the set of documents provided in the body of the request.
Instance Method Details
#delete_pipeline(arguments = {}) ⇒ Object
Delete a speficied pipeline
14 15 16 17 18 19 20 21 22 |
# File 'lib/elasticsearch/api/actions/ingest/delete_pipeline.rb', line 14 def delete_pipeline(arguments={}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] method = 'DELETE' path = Utils.__pathify "_ingest/pipeline", Utils.__escape(arguments[:id]) params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body).body end |
#get_pipeline(arguments = {}) ⇒ Object
Return a specified pipeline
13 14 15 16 17 18 19 20 |
# File 'lib/elasticsearch/api/actions/ingest/get_pipeline.rb', line 13 def get_pipeline(arguments={}) method = 'GET' path = Utils.__pathify "_ingest/pipeline", Utils.__escape(arguments[:id]) params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body).body end |
#processor_grok(arguments = {}) ⇒ Object
Extracts structured fields out of a single text field within a document. You choose which field to extract
matched fields from, as well as the grok pattern you expect will match.
12 13 14 15 16 17 18 19 |
# File 'lib/elasticsearch/api/actions/ingest/processor_grok.rb', line 12 def processor_grok(arguments={}) method = Elasticsearch::API::HTTP_GET path = "_ingest/processor/grok" params = {} body = nil perform_request(method, path, params, body).body end |
#put_pipeline(arguments = {}) ⇒ Object
Add or update a specified pipeline
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/elasticsearch/api/actions/ingest/put_pipeline.rb', line 15 def put_pipeline(arguments={}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] method = 'PUT' path = Utils.__pathify "_ingest/pipeline", Utils.__escape(arguments[:id]) params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body).body end |
#simulate(arguments = {}) ⇒ Object
Execute a specific pipeline against the set of documents provided in the body of the request
14 15 16 17 18 19 20 21 22 |
# File 'lib/elasticsearch/api/actions/ingest/simulate.rb', line 14 def simulate(arguments={}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] method = 'GET' path = Utils.__pathify "_ingest/pipeline", Utils.__escape(arguments[:id]), '_simulate' params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body).body end |