Skip to content

Commit 3a981c0

Browse files
Auto-generated API code
1 parent c894b6b commit 3a981c0

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ module Actions
2727
# @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
2828
# @option arguments [Time] :wait_for_completion_timeout Specify the time that the request should block waiting for the final response
2929
# @option arguments [Boolean] :keep_on_completion Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false)
30+
# @option arguments [Time] :keep_alive Update the time interval in which the results (partial or final) for this search will be available
3031
# @option arguments [Number] :batched_reduce_size The number of shard results that should be reduced at once on the coordinating node. This value should be used as the granularity at which progress results will be made available.
3132
# @option arguments [Boolean] :request_cache Specify if request cache should be used for this request or not, defaults to true
3233
# @option arguments [String] :analyzer The analyzer to use for the query string
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Licensed to Elasticsearch B.V. under one or more contributor
2+
# license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright
4+
# ownership. Elasticsearch B.V. licenses this file to you under
5+
# the Apache License, Version 2.0 (the "License"); you may
6+
# not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
#
18+
# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
19+
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
20+
#
21+
module Elasticsearch
22+
module API
23+
module Esql
24+
module Actions
25+
# Stops a previously submitted async query request given its ID and collects the results.
26+
#
27+
# @option arguments [String] :id The async query ID
28+
# @option arguments [Hash] :headers Custom HTTP headers
29+
#
30+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-async-query-stop-api.html
31+
#
32+
def async_query_stop(arguments = {})
33+
request_opts = { endpoint: arguments[:endpoint] || 'esql.async_query_stop' }
34+
35+
defined_params = [:id].each_with_object({}) do |variable, set_variables|
36+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
37+
end
38+
request_opts[:defined_params] = defined_params unless defined_params.empty?
39+
40+
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
41+
42+
arguments = arguments.clone
43+
headers = arguments.delete(:headers) || {}
44+
45+
body = nil
46+
47+
_id = arguments.delete(:id)
48+
49+
method = Elasticsearch::API::HTTP_POST
50+
path = "_query/async/#{Utils.__listify(_id)}/stop"
51+
params = {}
52+
53+
Elasticsearch::API::Response.new(
54+
perform_request(method, path, params, body, headers, request_opts)
55+
)
56+
end
57+
end
58+
end
59+
end
60+
end

0 commit comments

Comments
 (0)