Skip to content

Commit d19f20b

Browse files
committed
[API] Updates source code docs, version
Brings back common parameters documentation (`human`, `error_trace`, `pretty`, `filter_path`)
1 parent c59e12e commit d19f20b

File tree

520 files changed

+7677
-1988
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

520 files changed

+7677
-1988
lines changed

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,20 @@ module Actions
2525
# Delete an async search.
2626
# If the asynchronous search is still running, it is cancelled.
2727
# Otherwise, the saved search results are deleted.
28-
# If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the +cancel_task+ cluster privilege.
28+
# If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the `cancel_task` cluster privilege.
2929
#
3030
# @option arguments [String] :id A unique identifier for the async search. (*Required*)
31+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
32+
# when they occur.
33+
# @option arguments [String] :filter_path Comma-separated list of filters in dot notation which reduce the response
34+
# returned by Elasticsearch.
35+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
36+
# For example `"exists_time": "1h"` for humans and
37+
# `"eixsts_time_in_millis": 3600000` for computers. When disabled the human
38+
# readable values will be omitted. This makes sense for responses being consumed
39+
# only by machines.
40+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
41+
# this option for debugging only.
3142
# @option arguments [Hash] :headers Custom HTTP headers
3243
#
3344
# @see https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-async-search-submit
@@ -51,7 +62,7 @@ def delete(arguments = {})
5162

5263
method = Elasticsearch::API::HTTP_DELETE
5364
path = "_async_search/#{Utils.listify(_id)}"
54-
params = {}
65+
params = Utils.process_params(arguments)
5566

5667
Elasticsearch::API::Response.new(
5768
perform_request(method, path, params, body, headers, request_opts)

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,25 @@ module Actions
2828
#
2929
# @option arguments [String] :id A unique identifier for the async search. (*Required*)
3030
# @option arguments [Time] :keep_alive The length of time that the async search should be available in the cluster.
31-
# When not specified, the +keep_alive+ set with the corresponding submit async request will be used.
31+
# When not specified, the `keep_alive` set with the corresponding submit async request will be used.
3232
# Otherwise, it is possible to override the value and extend the validity of the request.
3333
# When this period expires, the search, if still running, is cancelled.
3434
# If the search is completed, its saved results are deleted.
3535
# @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response
3636
# @option arguments [Time] :wait_for_completion_timeout Specifies to wait for the search to be completed up until the provided timeout.
3737
# Final results will be returned if available before the timeout expires, otherwise the currently available results will be returned once the timeout expires.
3838
# By default no timeout is set meaning that the currently available results will be returned without any additional wait.
39+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
40+
# when they occur.
41+
# @option arguments [String] :filter_path Comma-separated list of filters in dot notation which reduce the response
42+
# returned by Elasticsearch.
43+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
44+
# For example `"exists_time": "1h"` for humans and
45+
# `"eixsts_time_in_millis": 3600000` for computers. When disabled the human
46+
# readable values will be omitted. This makes sense for responses being consumed
47+
# only by machines.
48+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
49+
# this option for debugging only.
3950
# @option arguments [Hash] :headers Custom HTTP headers
4051
#
4152
# @see https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-async-search-submit

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,22 @@ module Actions
2626
# Get the status of a previously submitted async search request given its identifier, without retrieving search results.
2727
# If the Elasticsearch security features are enabled, the access to the status of a specific async search is restricted to:
2828
# * The user or API key that submitted the original async search request.
29-
# * Users that have the +monitor+ cluster privilege or greater privileges.
29+
# * Users that have the `monitor` cluster privilege or greater privileges.
3030
#
3131
# @option arguments [String] :id A unique identifier for the async search. (*Required*)
3232
# @option arguments [Time] :keep_alive The length of time that the async search needs to be available.
3333
# Ongoing async searches and any saved search results are deleted after this period. Server default: 5d.
34+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
35+
# when they occur.
36+
# @option arguments [String] :filter_path Comma-separated list of filters in dot notation which reduce the response
37+
# returned by Elasticsearch.
38+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
39+
# For example `"exists_time": "1h"` for humans and
40+
# `"eixsts_time_in_millis": 3600000` for computers. When disabled the human
41+
# readable values will be omitted. This makes sense for responses being consumed
42+
# only by machines.
43+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
44+
# this option for debugging only.
3445
# @option arguments [Hash] :headers Custom HTTP headers
3546
#
3647
# @see https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-async-search-submit

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

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ module Actions
2626
# When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested.
2727
# Warning: Asynchronous search does not support scroll or search requests that include only the suggest section.
2828
# By default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error.
29-
# The maximum allowed size for a stored async search response can be set by changing the +search.max_async_search_response_size+ cluster level setting.
29+
# The maximum allowed size for a stored async search response can be set by changing the `search.max_async_search_response_size` cluster level setting.
3030
#
31-
# @option arguments [String, Array] :index A comma-separated list of index names to search; use +_all+ or empty string to perform the operation on all indices
31+
# @option arguments [String, Array] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
3232
# @option arguments [Time] :wait_for_completion_timeout Blocks and waits until the search is completed up to a certain timeout.
3333
# When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster. Server default: 1s.
3434
# @option arguments [Time] :keep_alive Specifies how long the async search needs to be available.
3535
# Ongoing async searches and any saved search results are deleted after this period. Server default: 5d.
36-
# @option arguments [Boolean] :keep_on_completion If +true+, results are stored for later retrieval when the search completes within the +wait_for_completion_timeout+.
37-
# @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes +_all+ string or when no indices have been specified)
36+
# @option arguments [Boolean] :keep_on_completion If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`.
37+
# @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
3838
# @option arguments [Boolean] :allow_partial_search_results Indicate if an error should be returned if there is a partial search failure or timeout
3939
# @option arguments [String] :analyzer The analyzer to use for the query string
4040
# @option arguments [Boolean] :analyze_wildcard Specify whether wildcard and prefix queries should be analyzed (default: false)
@@ -75,6 +75,17 @@ module Actions
7575
# @option arguments [Integer] :size Number of hits to return (default: 10)
7676
# @option arguments [Integer] :from Starting offset (default: 0)
7777
# @option arguments [String] :sort A comma-separated list of <field>:<direction> pairs
78+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
79+
# when they occur.
80+
# @option arguments [String] :filter_path Comma-separated list of filters in dot notation which reduce the response
81+
# returned by Elasticsearch.
82+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
83+
# For example `"exists_time": "1h"` for humans and
84+
# `"eixsts_time_in_millis": 3600000` for computers. When disabled the human
85+
# readable values will be omitted. This makes sense for responses being consumed
86+
# only by machines.
87+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
88+
# this option for debugging only.
7889
# @option arguments [Hash] :headers Custom HTTP headers
7990
# @option arguments [Hash] :body request body
8091
#

0 commit comments

Comments
 (0)