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/delete_pipeline.rb

Instance Method Summary collapse

Instance Method Details

#delete_pipeline(arguments = {}) ⇒ Object

Delete a speficied pipeline

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :id (String)

    Pipeline ID (Required)

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :timeout (Time)

    Explicit operation timeout

Raises:

  • (ArgumentError)

See Also:



14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/elasticsearch/api/actions/ingest/delete_pipeline.rb', line 14

def delete_pipeline(arguments={})
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
  valid_params = [
    :master_timeout,
    :timeout ]
  method = 'DELETE'
  path   = Utils.__pathify "_ingest/pipeline", Utils.__escape(arguments[:id])
  params = Utils.__validate_and_extract_params arguments, valid_params
  body   = nil

  perform_request(method, path, params, body).body
end

#get_pipeline(arguments = {}) ⇒ Object

Return a specified pipeline

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :id (String)

    Comma separated list of pipeline ids (wildcards supported).

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

See Also:



13
14
15
16
17
18
19
20
21
22
# File 'lib/elasticsearch/api/actions/ingest/get_pipeline.rb', line 13

def get_pipeline(arguments={})
  valid_params = [
    :master_timeout ]
  method = 'GET'
  path   = Utils.__pathify "_ingest/pipeline", Utils.__escape(arguments[:id])
  params = Utils.__validate_and_extract_params arguments, valid_params
  body   = nil

  perform_request(method, path, params, body).body
end

#put_pipeline(arguments = {}) ⇒ Object

Add or update a specified pipeline

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :id (String)

    Pipeline ID (Required)

  • :body (Hash)

    The ingest definition (Required)

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :timeout (Time)

    Explicit operation timeout

Raises:

  • (ArgumentError)

See Also:



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# 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]
  valid_params = [
    :master_timeout,
    :timeout ]
  method = 'PUT'
  path   = Utils.__pathify "_ingest/pipeline", Utils.__escape(arguments[:id])

  params = Utils.__validate_and_extract_params arguments, valid_params
  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

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :id (String)

    Pipeline ID

  • :body (Hash)

    The pipeline definition (Required)

  • :verbose (Boolean)

    Verbose mode. Display data output for each processor in executed pipeline

Raises:

  • (ArgumentError)

See Also:



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/elasticsearch/api/actions/ingest/simulate.rb', line 15

def simulate(arguments={})
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
  valid_params = [
    :verbose ]
  method = 'GET'
  path   = Utils.__pathify "_ingest/pipeline", Utils.__escape(arguments[:id]), '_simulate'
  params = Utils.__validate_and_extract_params arguments, valid_params
  body   = arguments[:body]

  perform_request(method, path, params, body).body
end