elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb
# Allows an arbitrary script to be executed and a result to be returned
# This functionality is Experimental and may be changed or removed
# completely in a future release. Elastic will take a best effort approach
# to fix any issues, but experimental features are not subject to the
# support SLA of official GA features.
#
# @option arguments [Hash] :headers Custom HTTP headers
# @option arguments [Hash] :body The script to execute
#
# @see https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html
#
Allows an arbitrary script to be executed and a result to be returned
This functionality is Experimental and may be changed or removed
completely in a future release. Elastic will take a best effort approach
to fix any issues, but experimental features are not subject to the
support SLA of official GA features.
Allows an arbitrary script to be executed and a result to be returned This functionality is Experimental and may be changed or removed completely in a future release . Elastic will take a best effort approach to fix any issues but experimental features are not subject to the support SLA of official GA features .
def scripts_painless_execute(arguments = {})
        headers = arguments.delete(:headers) || {}
        body = arguments.delete(:body)
        arguments = arguments.clone
        method = if body
                   Elasticsearch::API::HTTP_POST
                 else
                   Elasticsearch::API::HTTP_GET
                 end
        path   = "_scripts/painless/_execute"
        params = {}
        perform_request(method, path, params, body, headers).body
      end
def scripts_painless_execute ( arguments = { } ) headers = arguments . delete ( :headers ) || { } body = arguments . delete ( :body ) arguments = arguments . clone method = if body Elasticsearch :: API :: HTTP_POST else Elasticsearch :: API :: HTTP_GET end path = "_scripts/painless/_execute" params = { } perform_request ( method , path , params , body , headers ) . body end
Allows an arbitrary script to be executed and a result to be returned
This functionality is Experimental and may be changed or removed
completely in a future release.
Allows an arbitrary script to be executed and a result to be returned This functionality is Experimental and may be changed or removed completely in a future release .
arguments
:body The script to execute
: body The script to execute
see
None