Method: Elasticsearch::API::Esql::Actions#async_query
- Defined in:
- lib/elasticsearch/api/actions/esql/async_query.rb
#async_query(arguments = {}) ⇒ Object
Executes an ESQL request asynchronously
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/elasticsearch/api/actions/esql/async_query.rb', line 35 def async_query(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'esql.async_query' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_query/async' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |