diff --git a/api_generator/lib/components/argument.rb b/api_generator/lib/components/argument.rb index e685535de..677fd2f50 100644 --- a/api_generator/lib/components/argument.rb +++ b/api_generator/lib/components/argument.rb @@ -38,13 +38,13 @@ def initialize(name:, description:, required:, schema:, default:, deprecated:, d def get_ruby_type(schema) return nil if schema.nil? union = schema.anyOf || schema.oneOf - return union.map { |sch| get_ruby_type(sch) }.join(', ') unless union.nil? + return union.map { |sch| get_ruby_type(sch) }.uniq.sort.join(', ') unless union.nil? return 'Integer' if schema.type == 'integer' return 'Float' if schema.type == 'number' return 'Boolean' if schema.type == 'boolean' return 'String' if schema.type == 'string' return 'NilClass' if schema.type == 'null' - return "Array<#{get_ruby_type(schema.items)}>" if schema.type == 'array' + return "Enumerable<#{get_ruby_type(schema.items)}>" if schema.type == 'array' "Hash" end diff --git a/lib/opensearch/api/actions/bulk.rb b/lib/opensearch/api/actions/bulk.rb index 7c90dc8ea..34cbf94e1 100644 --- a/lib/opensearch/api/actions/bulk.rb +++ b/lib/opensearch/api/actions/bulk.rb @@ -15,18 +15,18 @@ module Root module Actions # Allows to perform multiple index/update/delete operations in a single request. # - # @option args [Boolean, String, Array] :_source `true` or `false` to return the `_source` field or not, or a list of fields to return. - # @option args [String, Array] :_source_excludes A comma-separated list of source fields to exclude from the response. - # @option args [String, Array] :_source_includes A comma-separated list of source fields to include in the response. + # @option args [Boolean, Enumerable, String] :_source `true` or `false` to return the `_source` field or not, or a list of fields to return. + # @option args [Enumerable, String] :_source_excludes A comma-separated list of source fields to exclude from the response. + # @option args [Enumerable, String] :_source_includes A comma-separated list of source fields to include in the response. # @option args [String] :pipeline ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter. # @option args [Boolean, String] :refresh If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`. # @option args [Boolean] :require_alias If `true`, the request's actions must target an index alias. - # @option args [String, Array] :routing Custom value used to route operations to a specific shard. + # @option args [Enumerable, String] :routing Custom value used to route operations to a specific shard. # @option args [String] :timeout Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. # @option args [String] :type Default document type for items which don't provide one. # @option args [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). # @option args [String] :index Name of the data stream, index, or index alias to perform bulk actions on. - # @option args [Array] :body *Required* The operation definition and data (action-data pairs), separated by newlines + # @option args [Enumerable] :body *Required* The operation definition and data (action-data pairs), separated by newlines def bulk(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'body' missing" unless args['body'] diff --git a/lib/opensearch/api/actions/bulk_stream.rb b/lib/opensearch/api/actions/bulk_stream.rb index ae2c83316..85f0dd792 100644 --- a/lib/opensearch/api/actions/bulk_stream.rb +++ b/lib/opensearch/api/actions/bulk_stream.rb @@ -15,20 +15,20 @@ module Root module Actions # Allows to perform multiple index/update/delete operations using request response streaming. # - # @option args [Boolean, String, Array] :_source `true` or `false` to return the `_source` field or not, or a list of fields to return. - # @option args [String, Array] :_source_excludes A comma-separated list of source fields to exclude from the response. - # @option args [String, Array] :_source_includes A comma-separated list of source fields to include in the response. + # @option args [Boolean, Enumerable, String] :_source `true` or `false` to return the `_source` field or not, or a list of fields to return. + # @option args [Enumerable, String] :_source_excludes A comma-separated list of source fields to exclude from the response. + # @option args [Enumerable, String] :_source_includes A comma-separated list of source fields to include in the response. # @option args [String] :batch_interval Specifies for how long bulk operations should be accumulated into a batch before sending the batch to data nodes. # @option args [Integer] :batch_size Specifies how many bulk operations should be accumulated into a batch before sending the batch to data nodes. # @option args [String] :pipeline ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter. # @option args [Boolean, String] :refresh If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`. # @option args [Boolean] :require_alias If `true`, the request's actions must target an index alias. - # @option args [String, Array] :routing Custom value used to route operations to a specific shard. + # @option args [Enumerable, String] :routing Custom value used to route operations to a specific shard. # @option args [String] :timeout Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. # @option args [String] :type Default document type for items which don't provide one. # @option args [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). # @option args [String] :index Name of the data stream, index, or index alias to perform bulk actions on. - # @option args [Array] :body *Required* The operation definition and data (action-data pairs), separated by newlines + # @option args [Enumerable] :body *Required* The operation definition and data (action-data pairs), separated by newlines def bulk_stream(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'body' missing" unless args['body'] diff --git a/lib/opensearch/api/actions/cat/aliases.rb b/lib/opensearch/api/actions/cat/aliases.rb index f8eb28cd9..165c68dfd 100644 --- a/lib/opensearch/api/actions/cat/aliases.rb +++ b/lib/opensearch/api/actions/cat/aliases.rb @@ -15,14 +15,14 @@ module Cat module Actions # Shows information about currently configured aliases to indexes including filter and routing info. # - # @option args [String, String, String, String, String, Array] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. + # @option args [Enumerable, String] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [Boolean] :v Verbose mode. Display column headers. - # @option args [String, Array] :name A comma-separated list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`. + # @option args [Enumerable, String] :name A comma-separated list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`. def aliases(args = {}) args = Utils.normalize_arguments(args) _name = args.delete('name') diff --git a/lib/opensearch/api/actions/cat/all_pit_segments.rb b/lib/opensearch/api/actions/cat/all_pit_segments.rb index 20986e14d..bf7b72e1e 100644 --- a/lib/opensearch/api/actions/cat/all_pit_segments.rb +++ b/lib/opensearch/api/actions/cat/all_pit_segments.rb @@ -17,9 +17,9 @@ module Actions # # @option args [String] :bytes The unit in which to display byte values. # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [Boolean] :v Verbose mode. Display column headers. def all_pit_segments(args = {}) args = Utils.normalize_arguments(args) diff --git a/lib/opensearch/api/actions/cat/allocation.rb b/lib/opensearch/api/actions/cat/allocation.rb index 1420f288d..e1d37a438 100644 --- a/lib/opensearch/api/actions/cat/allocation.rb +++ b/lib/opensearch/api/actions/cat/allocation.rb @@ -18,13 +18,13 @@ module Actions # @option args [String] :bytes The unit used to display byte values. # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [Boolean] :v Verbose mode. Display column headers. - # @option args [String, Array] :node_id Comma-separated list of node identifiers or names used to limit the returned information. + # @option args [Enumerable, String] :node_id Comma-separated list of node identifiers or names used to limit the returned information. def allocation(args = {}) args = Utils.normalize_arguments(args) _node_id = args.delete('node_id') diff --git a/lib/opensearch/api/actions/cat/cluster_manager.rb b/lib/opensearch/api/actions/cat/cluster_manager.rb index db54a34ed..6acfb20c7 100644 --- a/lib/opensearch/api/actions/cat/cluster_manager.rb +++ b/lib/opensearch/api/actions/cat/cluster_manager.rb @@ -17,11 +17,11 @@ module Actions # # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [Boolean] :v Verbose mode. Display column headers. def cluster_manager(args = {}) args = Utils.normalize_arguments(args) diff --git a/lib/opensearch/api/actions/cat/count.rb b/lib/opensearch/api/actions/cat/count.rb index dab9b1009..3d1e1e6e0 100644 --- a/lib/opensearch/api/actions/cat/count.rb +++ b/lib/opensearch/api/actions/cat/count.rb @@ -16,11 +16,11 @@ module Actions # Provides quick access to the document count of the entire cluster, or individual indexes. # # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [Boolean] :v Verbose mode. Display column headers. - # @option args [String, Array] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. def count(args = {}) args = Utils.normalize_arguments(args) _index = args.delete('index') diff --git a/lib/opensearch/api/actions/cat/fielddata.rb b/lib/opensearch/api/actions/cat/fielddata.rb index 124f75dfc..98411af95 100644 --- a/lib/opensearch/api/actions/cat/fielddata.rb +++ b/lib/opensearch/api/actions/cat/fielddata.rb @@ -16,11 +16,11 @@ module Actions # Shows how much heap memory is currently being used by field data on every data node in the cluster. # # @option args [String] :bytes The unit used to display byte values. - # @option args [String, Array] :fields Comma-separated list of fields used to limit returned information. + # @option args [Enumerable, String] :fields Comma-separated list of fields used to limit returned information. # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [Boolean] :v Verbose mode. Display column headers. def fielddata(args = {}) args = Utils.normalize_arguments(args) diff --git a/lib/opensearch/api/actions/cat/health.rb b/lib/opensearch/api/actions/cat/health.rb index 87a7f8dd9..716550955 100644 --- a/lib/opensearch/api/actions/cat/health.rb +++ b/lib/opensearch/api/actions/cat/health.rb @@ -16,9 +16,9 @@ module Actions # Returns a concise representation of the cluster health. # # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [String] :time The unit used to display time values. # @option args [Boolean] :ts If `true`, returns `HH:MM:SS` and Unix epoch timestamps. # @option args [Boolean] :v Verbose mode. Display column headers. diff --git a/lib/opensearch/api/actions/cat/indices.rb b/lib/opensearch/api/actions/cat/indices.rb index fad5d68c4..30142365c 100644 --- a/lib/opensearch/api/actions/cat/indices.rb +++ b/lib/opensearch/api/actions/cat/indices.rb @@ -17,19 +17,19 @@ module Actions # # @option args [String] :bytes The unit used to display byte values. # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String, String, String, String, String, Array] :expand_wildcards The type of index that wildcard patterns can match. + # @option args [Enumerable, String] :expand_wildcards The type of index that wildcard patterns can match. # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [String] :health The health status used to limit returned indexes. By default, the response includes indexes of any health status. # @option args [Boolean] :help Return help information. # @option args [Boolean] :include_unloaded_segments If `true`, the response includes information from segments that are not loaded into memory. # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. # @option args [Boolean] :pri If `true`, the response only includes information from primary shards. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [String] :time The unit used to display time values. # @option args [Boolean] :v Verbose mode. Display column headers. - # @option args [String, Array] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. def indices(args = {}) args = Utils.normalize_arguments(args) _index = args.delete('index') diff --git a/lib/opensearch/api/actions/cat/master.rb b/lib/opensearch/api/actions/cat/master.rb index 4472fa953..6b01679fd 100644 --- a/lib/opensearch/api/actions/cat/master.rb +++ b/lib/opensearch/api/actions/cat/master.rb @@ -17,11 +17,11 @@ module Actions # # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [Boolean] :v Verbose mode. Display column headers. def master(args = {}) args = Utils.normalize_arguments(args) diff --git a/lib/opensearch/api/actions/cat/nodeattrs.rb b/lib/opensearch/api/actions/cat/nodeattrs.rb index 327d1e74e..6fbb73336 100644 --- a/lib/opensearch/api/actions/cat/nodeattrs.rb +++ b/lib/opensearch/api/actions/cat/nodeattrs.rb @@ -17,11 +17,11 @@ module Actions # # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [Boolean] :v Verbose mode. Display column headers. def nodeattrs(args = {}) args = Utils.normalize_arguments(args) diff --git a/lib/opensearch/api/actions/cat/nodes.rb b/lib/opensearch/api/actions/cat/nodes.rb index 59904b200..8369e8854 100644 --- a/lib/opensearch/api/actions/cat/nodes.rb +++ b/lib/opensearch/api/actions/cat/nodes.rb @@ -19,11 +19,11 @@ module Actions # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). # @option args [Boolean, String] :full_id If `true`, return the full node ID. If `false`, return the shortened node ID. - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. # @option args [Boolean] :local DEPRECATED Return local information, do not retrieve the state from cluster-manager node. # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [String] :time The unit in which to display time values. # @option args [Boolean] :v Verbose mode. Display column headers. def nodes(args = {}) diff --git a/lib/opensearch/api/actions/cat/pending_tasks.rb b/lib/opensearch/api/actions/cat/pending_tasks.rb index 02039543b..7a1fad69a 100644 --- a/lib/opensearch/api/actions/cat/pending_tasks.rb +++ b/lib/opensearch/api/actions/cat/pending_tasks.rb @@ -17,11 +17,11 @@ module Actions # # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [String] :time The unit in which to display time values. # @option args [Boolean] :v Verbose mode. Display column headers. def pending_tasks(args = {}) diff --git a/lib/opensearch/api/actions/cat/pit_segments.rb b/lib/opensearch/api/actions/cat/pit_segments.rb index 5cbc16bc6..641354f06 100644 --- a/lib/opensearch/api/actions/cat/pit_segments.rb +++ b/lib/opensearch/api/actions/cat/pit_segments.rb @@ -17,9 +17,9 @@ module Actions # # @option args [String] :bytes The unit in which to display byte values. # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [Boolean] :v Verbose mode. Display column headers. # @option args [Hash] :body def pit_segments(args = {}) diff --git a/lib/opensearch/api/actions/cat/plugins.rb b/lib/opensearch/api/actions/cat/plugins.rb index 005a41916..008ec7bb0 100644 --- a/lib/opensearch/api/actions/cat/plugins.rb +++ b/lib/opensearch/api/actions/cat/plugins.rb @@ -17,11 +17,11 @@ module Actions # # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [Boolean] :v Verbose mode. Display column headers. def plugins(args = {}) args = Utils.normalize_arguments(args) diff --git a/lib/opensearch/api/actions/cat/recovery.rb b/lib/opensearch/api/actions/cat/recovery.rb index 83e3226b8..58a88e116 100644 --- a/lib/opensearch/api/actions/cat/recovery.rb +++ b/lib/opensearch/api/actions/cat/recovery.rb @@ -19,10 +19,10 @@ module Actions # @option args [String] :bytes The unit used to display byte values. # @option args [Boolean] :detailed If `true`, the response includes detailed information about shard recoveries. # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. - # @option args [Array] :index Comma-separated list or wildcard expression of index names to limit the returned information. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :index Comma-separated list or wildcard expression of index names to limit the returned information. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [String] :time The unit in which to display time values. # @option args [Boolean] :v Verbose mode. Display column headers. def recovery(args = {}) diff --git a/lib/opensearch/api/actions/cat/repositories.rb b/lib/opensearch/api/actions/cat/repositories.rb index d8b4463fa..3e0397af9 100644 --- a/lib/opensearch/api/actions/cat/repositories.rb +++ b/lib/opensearch/api/actions/cat/repositories.rb @@ -17,11 +17,11 @@ module Actions # # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [Boolean] :v Verbose mode. Display column headers. def repositories(args = {}) args = Utils.normalize_arguments(args) diff --git a/lib/opensearch/api/actions/cat/segment_replication.rb b/lib/opensearch/api/actions/cat/segment_replication.rb index b61a6a63a..ac9277dbc 100644 --- a/lib/opensearch/api/actions/cat/segment_replication.rb +++ b/lib/opensearch/api/actions/cat/segment_replication.rb @@ -20,15 +20,15 @@ module Actions # @option args [String] :bytes The unit in which to display byte values. # @option args [Boolean] :completed_only If `true`, the response only includes latest completed segment replication events. # @option args [Boolean] :detailed If `true`, the response includes detailed information about segment replications. - # @option args [String, String, String, String, String, Array] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. + # @option args [Enumerable, String] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. # @option args [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indexes should be ignored when throttled. # @option args [Boolean] :ignore_unavailable Whether specified concrete indexes should be ignored when unavailable (missing or closed). - # @option args [Array] :index Comma-separated list or wildcard expression of index names to limit the returned information. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. - # @option args [Array] :shards Comma-separated list of shards to display. + # @option args [Enumerable] :index Comma-separated list or wildcard expression of index names to limit the returned information. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :shards Comma-separated list of shards to display. # @option args [String] :time The unit in which to display time values. # @option args [String] :timeout Operation timeout. # @option args [Boolean] :v Verbose mode. Display column headers. diff --git a/lib/opensearch/api/actions/cat/segments.rb b/lib/opensearch/api/actions/cat/segments.rb index e126cafc4..599b5fcdf 100644 --- a/lib/opensearch/api/actions/cat/segments.rb +++ b/lib/opensearch/api/actions/cat/segments.rb @@ -18,12 +18,12 @@ module Actions # @option args [String] :bytes The unit used to display byte values. # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [Boolean] :v Verbose mode. Display column headers. - # @option args [String, Array] :index A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable, String] :index A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. def segments(args = {}) args = Utils.normalize_arguments(args) _index = args.delete('index') diff --git a/lib/opensearch/api/actions/cat/shards.rb b/lib/opensearch/api/actions/cat/shards.rb index d76bdd942..7dc252885 100644 --- a/lib/opensearch/api/actions/cat/shards.rb +++ b/lib/opensearch/api/actions/cat/shards.rb @@ -18,14 +18,14 @@ module Actions # @option args [String] :bytes The unit used to display byte values. # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [String] :time The unit in which to display time values. # @option args [Boolean] :v Verbose mode. Display column headers. - # @option args [String, Array] :index A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable, String] :index A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. def shards(args = {}) args = Utils.normalize_arguments(args) _index = args.delete('index') diff --git a/lib/opensearch/api/actions/cat/snapshots.rb b/lib/opensearch/api/actions/cat/snapshots.rb index e2e9d4453..c803f67ea 100644 --- a/lib/opensearch/api/actions/cat/snapshots.rb +++ b/lib/opensearch/api/actions/cat/snapshots.rb @@ -17,12 +17,12 @@ module Actions # # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. # @option args [Boolean] :ignore_unavailable If `true`, the response does not include information from unavailable snapshots. # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [String, Array] :repository *Required* A comma-separated list of snapshot repositories used to limit the request. Accepts wildcard expressions. `_all` returns all repositories. If any repository fails during the request, OpenSearch returns an error. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable, String] :repository *Required* A comma-separated list of snapshot repositories used to limit the request. Accepts wildcard expressions. `_all` returns all repositories. If any repository fails during the request, OpenSearch returns an error. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [String] :time The unit in which to display time values. # @option args [Boolean] :v Verbose mode. Display column headers. def snapshots(args = {}) diff --git a/lib/opensearch/api/actions/cat/tasks.rb b/lib/opensearch/api/actions/cat/tasks.rb index dc657f5e4..2587d69b2 100644 --- a/lib/opensearch/api/actions/cat/tasks.rb +++ b/lib/opensearch/api/actions/cat/tasks.rb @@ -15,14 +15,14 @@ module Cat module Actions # Returns information about the tasks currently executing on one or more nodes in the cluster. # - # @option args [Array] :actions The task action names, which are used to limit the response. + # @option args [Enumerable] :actions The task action names, which are used to limit the response. # @option args [Boolean] :detailed If `true`, the response includes detailed information about shard recoveries. # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. - # @option args [Array] :nodes Comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. + # @option args [Enumerable] :nodes Comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. # @option args [String] :parent_task_id The parent task identifier, which is used to limit the response. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [String] :time The unit in which to display time values. # @option args [Boolean] :v Verbose mode. Display column headers. def tasks(args = {}) diff --git a/lib/opensearch/api/actions/cat/templates.rb b/lib/opensearch/api/actions/cat/templates.rb index e96624d41..6feea14f8 100644 --- a/lib/opensearch/api/actions/cat/templates.rb +++ b/lib/opensearch/api/actions/cat/templates.rb @@ -17,11 +17,11 @@ module Actions # # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [Boolean] :v Verbose mode. Display column headers. # @option args [String] :name The name of the template to return. Accepts wildcard expressions. If omitted, all templates are returned. def templates(args = {}) diff --git a/lib/opensearch/api/actions/cat/thread_pool.rb b/lib/opensearch/api/actions/cat/thread_pool.rb index 494988960..1a4a39f2a 100644 --- a/lib/opensearch/api/actions/cat/thread_pool.rb +++ b/lib/opensearch/api/actions/cat/thread_pool.rb @@ -18,14 +18,14 @@ module Actions # # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [Integer] :size The multiplier in which to display values. # @option args [Boolean] :v Verbose mode. Display column headers. - # @option args [String, Array] :thread_pool_patterns A comma-separated list of thread pool names used to limit the request. Accepts wildcard expressions. + # @option args [Enumerable, String] :thread_pool_patterns A comma-separated list of thread pool names used to limit the request. Accepts wildcard expressions. def thread_pool(args = {}) args = Utils.normalize_arguments(args) _thread_pool_patterns = args.delete('thread_pool_patterns') diff --git a/lib/opensearch/api/actions/clear_scroll.rb b/lib/opensearch/api/actions/clear_scroll.rb index b925dde9a..195e8fbd1 100644 --- a/lib/opensearch/api/actions/clear_scroll.rb +++ b/lib/opensearch/api/actions/clear_scroll.rb @@ -15,7 +15,7 @@ module Root module Actions # Explicitly clears the search context for a scroll. # - # @option args [String, Array] :scroll_id DEPRECATED Comma-separated list of scroll IDs to clear. To clear all scroll IDs, use `_all`. + # @option args [Enumerable, String] :scroll_id DEPRECATED Comma-separated list of scroll IDs to clear. To clear all scroll IDs, use `_all`. # @option args [Hash] :body Comma-separated list of scroll IDs to clear if none was specified using the `scroll_id` parameter # @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request def clear_scroll(args = {}) diff --git a/lib/opensearch/api/actions/cluster/health.rb b/lib/opensearch/api/actions/cluster/health.rb index 80d62fb14..b7f69f231 100644 --- a/lib/opensearch/api/actions/cluster/health.rb +++ b/lib/opensearch/api/actions/cluster/health.rb @@ -17,7 +17,7 @@ module Actions # # @option args [String] :awareness_attribute The awareness attribute for which the health is required. # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String, String, String, String, String, Array] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. + # @option args [Enumerable, String] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. # @option args [String] :level Can be one of cluster, indexes or shards. Controls the details level of the health information returned. # @option args [Boolean] :local If `true`, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the cluster-manager node. # @option args [String] :master_timeout DEPRECATED Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. @@ -26,9 +26,9 @@ module Actions # @option args [String] :wait_for_events Can be one of immediate, urgent, high, normal, low, languid. Wait until all currently queued events with the given priority are processed. # @option args [Boolean] :wait_for_no_initializing_shards A Boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard initializations. Defaults to false, which means it will not wait for initializing shards. # @option args [Boolean] :wait_for_no_relocating_shards A Boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard relocations. Defaults to false, which means it will not wait for relocating shards. - # @option args [String, Float] :wait_for_nodes The request waits until the specified number N of nodes is available. It also accepts >=N, <=N, >N and =N, <=N, >N and yellow > red. By default, will not wait for any status. - # @option args [String, Array] :index Comma-separated list of data streams, indexes, and index aliases used to limit the request. Wildcard expressions (*) are supported. To target all data streams and indexes in a cluster, omit this parameter or use `_all` or `*`. + # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and index aliases used to limit the request. Wildcard expressions (*) are supported. To target all data streams and indexes in a cluster, omit this parameter or use `_all` or `*`. def health(args = {}) args = Utils.normalize_arguments(args) _index = args.delete('index') diff --git a/lib/opensearch/api/actions/cluster/post_voting_config_exclusions.rb b/lib/opensearch/api/actions/cluster/post_voting_config_exclusions.rb index ce09dba85..615adfdb0 100644 --- a/lib/opensearch/api/actions/cluster/post_voting_config_exclusions.rb +++ b/lib/opensearch/api/actions/cluster/post_voting_config_exclusions.rb @@ -15,8 +15,8 @@ module Cluster module Actions # Updates the cluster voting config exclusions by node ids or node names. # - # @option args [String, Array] :node_ids A comma-separated list of the persistent ids of the nodes to exclude from the voting configuration. If specified, you may not also specify `node_names`. - # @option args [String, Array] :node_names A comma-separated list of the names of the nodes to exclude from the voting configuration. If specified, you may not also specify `node_ids`. + # @option args [Enumerable, String] :node_ids A comma-separated list of the persistent ids of the nodes to exclude from the voting configuration. If specified, you may not also specify `node_names`. + # @option args [Enumerable, String] :node_names A comma-separated list of the names of the nodes to exclude from the voting configuration. If specified, you may not also specify `node_ids`. # @option args [String] :timeout When adding a voting configuration exclusion, the API waits for the specified nodes to be excluded from the voting configuration before returning. If the timeout expires before the appropriate condition is satisfied, the request fails and returns an error. def post_voting_config_exclusions(args = {}) args = Utils.normalize_arguments(args) diff --git a/lib/opensearch/api/actions/cluster/reroute.rb b/lib/opensearch/api/actions/cluster/reroute.rb index 15ef26971..d09fa6959 100644 --- a/lib/opensearch/api/actions/cluster/reroute.rb +++ b/lib/opensearch/api/actions/cluster/reroute.rb @@ -19,7 +19,7 @@ module Actions # @option args [Boolean] :dry_run If `true`, then the request simulates the operation only and returns the resulting state. # @option args [Boolean] :explain If `true`, then the response contains an explanation of why the commands can or cannot be executed. # @option args [String] :master_timeout DEPRECATED Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. - # @option args [String, Array] :metric Limits the information returned to the specified metrics. + # @option args [Enumerable, String] :metric Limits the information returned to the specified metrics. # @option args [Boolean] :retry_failed If `true`, then retries allocation of shards that are blocked due to too many subsequent allocation failures. # @option args [String] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. # @option args [Hash] :body The definition of `commands` to perform (`move`, `cancel`, `allocate`) diff --git a/lib/opensearch/api/actions/cluster/state.rb b/lib/opensearch/api/actions/cluster/state.rb index 80d9e910b..72127f3af 100644 --- a/lib/opensearch/api/actions/cluster/state.rb +++ b/lib/opensearch/api/actions/cluster/state.rb @@ -17,15 +17,15 @@ module Actions # # @option args [Boolean] :allow_no_indices Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified) # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String, String, String, String, String, Array] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. + # @option args [Enumerable, String] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. # @option args [Boolean] :flat_settings Return settings in flat format. # @option args [Boolean] :ignore_unavailable Whether specified concrete indexes should be ignored when unavailable (missing or closed) # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. # @option args [String] :master_timeout DEPRECATED Specify timeout for connection to cluster manager. # @option args [Integer] :wait_for_metadata_version Wait for the metadata version to be equal or greater than the specified metadata version. # @option args [String] :wait_for_timeout The maximum time to wait for `wait_for_metadata_version` before timing out. - # @option args [Array] :metric Limit the information returned to the specified metrics - # @option args [String, Array] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indexes + # @option args [Enumerable] :metric Limit the information returned to the specified metrics + # @option args [Enumerable, String] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indexes def state(args = {}) args = Utils.normalize_arguments(args) _metric = args.delete('metric') diff --git a/lib/opensearch/api/actions/cluster/stats.rb b/lib/opensearch/api/actions/cluster/stats.rb index 62a24ebc8..51e736570 100644 --- a/lib/opensearch/api/actions/cluster/stats.rb +++ b/lib/opensearch/api/actions/cluster/stats.rb @@ -17,9 +17,9 @@ module Actions # # @option args [Boolean] :flat_settings If `true`, returns settings in flat format. # @option args [String] :timeout Period to wait for each node to respond. If a node does not respond before its timeout expires, the response does not include its stats. However, timed out nodes are included in the response's `_nodes.failed` property. Defaults to no timeout. - # @option args [Array] :index_metric Limit the information returned for indexes metric to the specific index metrics. It can be used only if indexes (or all) metric is specified. - # @option args [Array] :metric Limit the information returned to the specified metrics. - # @option args [String, Array] :node_id Comma-separated list of node filters used to limit returned information. Defaults to all nodes in the cluster. + # @option args [Enumerable] :index_metric Limit the information returned for indexes metric to the specific index metrics. It can be used only if indexes (or all) metric is specified. + # @option args [Enumerable] :metric Limit the information returned to the specified metrics. + # @option args [Enumerable, String] :node_id Comma-separated list of node filters used to limit returned information. Defaults to all nodes in the cluster. def stats(args = {}) args = Utils.normalize_arguments(args) _index_metric = args.delete('index_metric') diff --git a/lib/opensearch/api/actions/count.rb b/lib/opensearch/api/actions/count.rb index 244508072..746f3de92 100644 --- a/lib/opensearch/api/actions/count.rb +++ b/lib/opensearch/api/actions/count.rb @@ -20,16 +20,16 @@ module Actions # @option args [String] :analyzer Analyzer to use for the query string. This parameter can only be used when the `q` query string parameter is specified. # @option args [String] :default_operator The default operator for query string query: `AND` or `OR`. This parameter can only be used when the `q` query string parameter is specified. # @option args [String] :df Field to use as default where no field prefix is given in the query string. This parameter can only be used when the `q` query string parameter is specified. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. # @option args [Boolean] :ignore_throttled If `true`, concrete, expanded or aliased indexes are ignored when frozen. # @option args [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index. # @option args [Boolean] :lenient If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. # @option args [Float] :min_score Sets the minimum `_score` value that documents must have to be included in the result. # @option args [String] :preference Specifies the node or shard the operation should be performed on. Random by default. # @option args [String] :q Query in the Lucene query string syntax. - # @option args [String, Array] :routing Custom value used to route operations to a specific shard. + # @option args [Enumerable, String] :routing Custom value used to route operations to a specific shard. # @option args [Integer] :terminate_after Maximum number of documents to collect for each shard. If a query reaches this limit, OpenSearch terminates the query early. OpenSearch collects documents before sorting. - # @option args [String, Array] :index Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams and indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams and indexes, omit this parameter or use `*` or `_all`. # @option args [Hash] :body Query to restrict the results specified with the Query DSL (optional) def count(args = {}) args = Utils.normalize_arguments(args) diff --git a/lib/opensearch/api/actions/create.rb b/lib/opensearch/api/actions/create.rb index 677649be5..1d5f50366 100644 --- a/lib/opensearch/api/actions/create.rb +++ b/lib/opensearch/api/actions/create.rb @@ -21,7 +21,7 @@ module Actions # @option args [String] :index *Required* Name of the data stream or index to target. If the target doesn't exist and matches the name or wildcard (`*`) pattern of an index template with a `data_stream` definition, this request creates the data stream. If the target doesn't exist and doesn't match a data stream template, this request creates the index. # @option args [String] :pipeline ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter. # @option args [Boolean, String] :refresh If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`. - # @option args [String, Array] :routing Custom value used to route operations to a specific shard. + # @option args [Enumerable, String] :routing Custom value used to route operations to a specific shard. # @option args [String] :timeout Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. # @option args [Integer] :version Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. # @option args [String] :version_type Specific version type: `external`, `external_gte`. diff --git a/lib/opensearch/api/actions/create_pit.rb b/lib/opensearch/api/actions/create_pit.rb index 908bd5965..fca1928d4 100644 --- a/lib/opensearch/api/actions/create_pit.rb +++ b/lib/opensearch/api/actions/create_pit.rb @@ -15,12 +15,12 @@ module Root module Actions # Creates point in time context. # - # @option args [Array] :index *Required* Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. + # @option args [Enumerable] :index *Required* Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. # @option args [Boolean] :allow_partial_pit_creation Allow if point in time can be created with partial failures. - # @option args [String, String, String, String, String, Array] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. + # @option args [Enumerable, String] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. # @option args [String] :keep_alive Specify the keep alive for point in time. # @option args [String] :preference Specify the node or shard the operation should be performed on. - # @option args [String, Array] :routing Comma-separated list of specific routing values. + # @option args [Enumerable, String] :routing Comma-separated list of specific routing values. def create_pit(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'index' missing" unless args['index'] diff --git a/lib/opensearch/api/actions/delete.rb b/lib/opensearch/api/actions/delete.rb index 7cacc330c..f4ffa2641 100644 --- a/lib/opensearch/api/actions/delete.rb +++ b/lib/opensearch/api/actions/delete.rb @@ -20,7 +20,7 @@ module Actions # @option args [Integer] :if_primary_term Only perform the operation if the document has this primary term. # @option args [Integer] :if_seq_no Only perform the operation if the document has this sequence number. # @option args [Boolean, String] :refresh If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`. - # @option args [String, Array] :routing Custom value used to route operations to a specific shard. + # @option args [Enumerable, String] :routing Custom value used to route operations to a specific shard. # @option args [String] :timeout Period to wait for active shards. # @option args [Integer] :version Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. # @option args [String] :version_type Specific version type: `external`, `external_gte`. diff --git a/lib/opensearch/api/actions/delete_by_query.rb b/lib/opensearch/api/actions/delete_by_query.rb index 43838b116..016ccae0e 100644 --- a/lib/opensearch/api/actions/delete_by_query.rb +++ b/lib/opensearch/api/actions/delete_by_query.rb @@ -15,17 +15,17 @@ module Root module Actions # Deletes documents matching the provided query. # - # @option args [String, Array] :index *Required* Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams or indexes, omit this parameter or use `*` or `_all`. - # @option args [Array] :_source Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. - # @option args [Array] :_source_excludes List of fields to exclude from the returned `_source` field. - # @option args [Array] :_source_includes List of fields to extract and return from the `_source` field. + # @option args [Enumerable, String] :index *Required* Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams or indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable] :_source Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. + # @option args [Enumerable] :_source_excludes List of fields to exclude from the returned `_source` field. + # @option args [Enumerable] :_source_includes List of fields to extract and return from the `_source` field. # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. # @option args [Boolean] :analyze_wildcard If `true`, wildcard and prefix queries are analyzed. # @option args [String] :analyzer Analyzer to use for the query string. # @option args [String] :conflicts What to do if delete by query hits version conflicts: `abort` or `proceed`. # @option args [String] :default_operator The default operator for query string query: `AND` or `OR`. # @option args [String] :df Field to use as default where no field prefix is given in the query string. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. # @option args [Integer] :from Starting offset. # @option args [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index. # @option args [Boolean] :lenient If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. @@ -35,15 +35,15 @@ module Actions # @option args [Boolean, String] :refresh If `true`, OpenSearch refreshes all shards involved in the delete by query after the request completes. # @option args [Boolean] :request_cache If `true`, the request cache is used for this request. Defaults to the index-level setting. # @option args [Float] :requests_per_second The throttle for this request in sub-requests per second. - # @option args [String, Array] :routing Custom value used to route operations to a specific shard. + # @option args [Enumerable, String] :routing Custom value used to route operations to a specific shard. # @option args [String] :scroll Period to retain the search context for scrolling. # @option args [Integer] :scroll_size Size of the scroll request that powers the operation. # @option args [String] :search_timeout Explicit timeout for each search request. Defaults to no timeout. # @option args [String] :search_type The type of the search operation. Available options: `query_then_fetch`, `dfs_query_then_fetch`. # @option args [Integer] :size Deprecated, use `max_docs` instead. # @option args [Float, String] :slices The number of slices this task should be divided into. - # @option args [Array] :sort A comma-separated list of : pairs. - # @option args [Array] :stats Specific `tag` of the request for logging and statistical purposes. + # @option args [Enumerable] :sort A comma-separated list of : pairs. + # @option args [Enumerable] :stats Specific `tag` of the request for logging and statistical purposes. # @option args [Integer] :terminate_after Maximum number of documents to collect for each shard. If a query reaches this limit, OpenSearch terminates the query early. OpenSearch collects documents before sorting. Use with caution. OpenSearch applies this parameter to each shard handling the request. When possible, let OpenSearch perform early termination automatically. Avoid specifying this parameter for requests that target data streams with backing indexes across multiple data tiers. # @option args [String] :timeout Period each deletion request waits for active shards. # @option args [Boolean] :version If `true`, returns the document version as part of a hit. diff --git a/lib/opensearch/api/actions/delete_by_query_rethrottle.rb b/lib/opensearch/api/actions/delete_by_query_rethrottle.rb index 5737b2abc..7519a562c 100644 --- a/lib/opensearch/api/actions/delete_by_query_rethrottle.rb +++ b/lib/opensearch/api/actions/delete_by_query_rethrottle.rb @@ -15,7 +15,7 @@ module Root module Actions # Changes the number of requests per second for a particular Delete By Query operation. # - # @option args [String, Float] :task_id *Required* The ID for the task. + # @option args [Float, String] :task_id *Required* The ID for the task. # @option args [Float] :requests_per_second The throttle for this request in sub-requests per second. def delete_by_query_rethrottle(args = {}) args = Utils.normalize_arguments(args) diff --git a/lib/opensearch/api/actions/exists.rb b/lib/opensearch/api/actions/exists.rb index 47603c013..949c26349 100644 --- a/lib/opensearch/api/actions/exists.rb +++ b/lib/opensearch/api/actions/exists.rb @@ -17,14 +17,14 @@ module Actions # # @option args [String] :id *Required* Identifier of the document. # @option args [String] :index *Required* Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). - # @option args [Boolean, String, Array] :_source `true` or `false` to return the `_source` field or not, or a list of fields to return. - # @option args [String, Array] :_source_excludes A comma-separated list of source fields to exclude in the response. - # @option args [String, Array] :_source_includes A comma-separated list of source fields to include in the response. + # @option args [Boolean, Enumerable, String] :_source `true` or `false` to return the `_source` field or not, or a list of fields to return. + # @option args [Enumerable, String] :_source_excludes A comma-separated list of source fields to exclude in the response. + # @option args [Enumerable, String] :_source_includes A comma-separated list of source fields to include in the response. # @option args [String] :preference Specifies the node or shard the operation should be performed on. Random by default. # @option args [Boolean] :realtime If `true`, the request is real-time as opposed to near-real-time. # @option args [Boolean, String] :refresh If `true`, OpenSearch refreshes all shards involved in the delete by query after the request completes. - # @option args [String, Array] :routing Target the specified primary shard. - # @option args [String, Array] :stored_fields List of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the `_source` parameter defaults to false. + # @option args [Enumerable, String] :routing Target the specified primary shard. + # @option args [Enumerable, String] :stored_fields List of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the `_source` parameter defaults to false. # @option args [Integer] :version Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. # @option args [String] :version_type Specific version type: `external`, `external_gte`. def exists(args = {}) diff --git a/lib/opensearch/api/actions/exists_source.rb b/lib/opensearch/api/actions/exists_source.rb index 362655a4a..159b32d50 100644 --- a/lib/opensearch/api/actions/exists_source.rb +++ b/lib/opensearch/api/actions/exists_source.rb @@ -17,13 +17,13 @@ module Actions # # @option args [String] :id *Required* Identifier of the document. # @option args [String] :index *Required* Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). - # @option args [Boolean, String, Array] :_source `true` or `false` to return the `_source` field or not, or a list of fields to return. - # @option args [String, Array] :_source_excludes A comma-separated list of source fields to exclude in the response. - # @option args [String, Array] :_source_includes A comma-separated list of source fields to include in the response. + # @option args [Boolean, Enumerable, String] :_source `true` or `false` to return the `_source` field or not, or a list of fields to return. + # @option args [Enumerable, String] :_source_excludes A comma-separated list of source fields to exclude in the response. + # @option args [Enumerable, String] :_source_includes A comma-separated list of source fields to include in the response. # @option args [String] :preference Specifies the node or shard the operation should be performed on. Random by default. # @option args [Boolean] :realtime If `true`, the request is real-time as opposed to near-real-time. # @option args [Boolean, String] :refresh If `true`, OpenSearch refreshes all shards involved in the delete by query after the request completes. - # @option args [String, Array] :routing Target the specified primary shard. + # @option args [Enumerable, String] :routing Target the specified primary shard. # @option args [Integer] :version Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. # @option args [String] :version_type Specific version type: `external`, `external_gte`. def exists_source(args = {}) diff --git a/lib/opensearch/api/actions/explain.rb b/lib/opensearch/api/actions/explain.rb index 41f48f49f..a385e7ae6 100644 --- a/lib/opensearch/api/actions/explain.rb +++ b/lib/opensearch/api/actions/explain.rb @@ -17,9 +17,9 @@ module Actions # # @option args [String] :id *Required* Defines the document ID. # @option args [String] :index *Required* Index names used to limit the request. Only a single index name can be provided to this parameter. - # @option args [Boolean, String, Array] :_source Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. - # @option args [String, Array] :_source_excludes A comma-separated list of source fields to exclude from the response. - # @option args [String, Array] :_source_includes A comma-separated list of source fields to include in the response. + # @option args [Boolean, Enumerable, String] :_source Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. + # @option args [Enumerable, String] :_source_excludes A comma-separated list of source fields to exclude from the response. + # @option args [Enumerable, String] :_source_includes A comma-separated list of source fields to include in the response. # @option args [Boolean] :analyze_wildcard If `true`, wildcard and prefix queries are analyzed. # @option args [String] :analyzer Analyzer to use for the query string. This parameter can only be used when the `q` query string parameter is specified. # @option args [String] :default_operator The default operator for query string query: `AND` or `OR`. @@ -27,8 +27,8 @@ module Actions # @option args [Boolean] :lenient If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. # @option args [String] :preference Specifies the node or shard the operation should be performed on. Random by default. # @option args [String] :q Query in the Lucene query string syntax. - # @option args [String, Array] :routing Custom value used to route operations to a specific shard. - # @option args [String, Array] :stored_fields A comma-separated list of stored fields to return in the response. + # @option args [Enumerable, String] :routing Custom value used to route operations to a specific shard. + # @option args [Enumerable, String] :stored_fields A comma-separated list of stored fields to return in the response. # @option args [Hash] :body The query definition using the Query DSL def explain(args = {}) args = Utils.normalize_arguments(args) diff --git a/lib/opensearch/api/actions/field_caps.rb b/lib/opensearch/api/actions/field_caps.rb index 798af795f..58c4980bb 100644 --- a/lib/opensearch/api/actions/field_caps.rb +++ b/lib/opensearch/api/actions/field_caps.rb @@ -16,11 +16,11 @@ module Actions # Returns the information about the capabilities of fields among multiple indexes. # # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with foo but no index starts with bar. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. - # @option args [String, Array] :fields Comma-separated list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. + # @option args [Enumerable, String] :fields Comma-separated list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported. # @option args [Boolean] :ignore_unavailable If `true`, missing or closed indexes are not included in the response. # @option args [Boolean] :include_unmapped If `true`, unmapped fields are included in the response. - # @option args [String, Array] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indexes, omit this parameter or use * or `_all`. + # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indexes, omit this parameter or use * or `_all`. # @option args [Hash] :body An index filter specified with the Query DSL def field_caps(args = {}) args = Utils.normalize_arguments(args) diff --git a/lib/opensearch/api/actions/get.rb b/lib/opensearch/api/actions/get.rb index 400c29661..f45a4b082 100644 --- a/lib/opensearch/api/actions/get.rb +++ b/lib/opensearch/api/actions/get.rb @@ -17,14 +17,14 @@ module Actions # # @option args [String] :id *Required* Unique identifier of the document. # @option args [String] :index *Required* Name of the index that contains the document. - # @option args [Boolean, String, Array] :_source Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. - # @option args [String, Array] :_source_excludes A comma-separated list of source fields to exclude in the response. - # @option args [String, Array] :_source_includes A comma-separated list of source fields to include in the response. + # @option args [Boolean, Enumerable, String] :_source Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. + # @option args [Enumerable, String] :_source_excludes A comma-separated list of source fields to exclude in the response. + # @option args [Enumerable, String] :_source_includes A comma-separated list of source fields to include in the response. # @option args [String] :preference Specifies the node or shard the operation should be performed on. Random by default. # @option args [Boolean] :realtime If `true`, the request is real-time as opposed to near-real-time. # @option args [Boolean, String] :refresh If `true`, OpenSearch refreshes the affected shards to make this operation visible to search. If `false`, do nothing with refreshes. - # @option args [String, Array] :routing Target the specified primary shard. - # @option args [String, Array] :stored_fields List of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the `_source` parameter defaults to false. + # @option args [Enumerable, String] :routing Target the specified primary shard. + # @option args [Enumerable, String] :stored_fields List of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the `_source` parameter defaults to false. # @option args [Integer] :version Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. # @option args [String] :version_type Specific version type: `internal`, `external`, `external_gte`. def get(args = {}) diff --git a/lib/opensearch/api/actions/get_source.rb b/lib/opensearch/api/actions/get_source.rb index 74eb1948a..3e041df6f 100644 --- a/lib/opensearch/api/actions/get_source.rb +++ b/lib/opensearch/api/actions/get_source.rb @@ -17,13 +17,13 @@ module Actions # # @option args [String] :id *Required* Unique identifier of the document. # @option args [String] :index *Required* Name of the index that contains the document. - # @option args [Boolean, String, Array] :_source Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. - # @option args [String, Array] :_source_excludes A comma-separated list of source fields to exclude in the response. - # @option args [String, Array] :_source_includes A comma-separated list of source fields to include in the response. + # @option args [Boolean, Enumerable, String] :_source Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. + # @option args [Enumerable, String] :_source_excludes A comma-separated list of source fields to exclude in the response. + # @option args [Enumerable, String] :_source_includes A comma-separated list of source fields to include in the response. # @option args [String] :preference Specifies the node or shard the operation should be performed on. Random by default. # @option args [Boolean] :realtime Boolean) If `true`, the request is real-time as opposed to near-real-time. # @option args [Boolean, String] :refresh If `true`, OpenSearch refreshes the affected shards to make this operation visible to search. If `false`, do nothing with refreshes. - # @option args [String, Array] :routing Target the specified primary shard. + # @option args [Enumerable, String] :routing Target the specified primary shard. # @option args [Integer] :version Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. # @option args [String] :version_type Specific version type. One of `internal`, `external`, `external_gte`. def get_source(args = {}) diff --git a/lib/opensearch/api/actions/index.rb b/lib/opensearch/api/actions/index.rb index 40f10e049..33033db0a 100644 --- a/lib/opensearch/api/actions/index.rb +++ b/lib/opensearch/api/actions/index.rb @@ -22,7 +22,7 @@ module Actions # @option args [String] :pipeline ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter. # @option args [Boolean, String] :refresh If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`. # @option args [Boolean] :require_alias If `true`, the destination must be an index alias. - # @option args [String, Array] :routing Custom value used to route operations to a specific shard. + # @option args [Enumerable, String] :routing Custom value used to route operations to a specific shard. # @option args [String] :timeout Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. # @option args [Integer] :version Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. # @option args [String] :version_type Specific version type: `external`, `external_gte`. diff --git a/lib/opensearch/api/actions/indices/add_block.rb b/lib/opensearch/api/actions/indices/add_block.rb index 3ed49c8a5..4706cc091 100644 --- a/lib/opensearch/api/actions/indices/add_block.rb +++ b/lib/opensearch/api/actions/indices/add_block.rb @@ -16,10 +16,10 @@ module Actions # Adds a block to an index. # # @option args [String] :block *Required* The block to add (one of `read`, `write`, `read_only` or `metadata`). - # @option args [String, Array] :index *Required* A comma separated list of indexes to add a block to. + # @option args [Enumerable, String] :index *Required* A comma separated list of indexes to add a block to. # @option args [Boolean] :allow_no_indices Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified). # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String, String, String, String, String, Array] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. + # @option args [Enumerable, String] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. # @option args [Boolean] :ignore_unavailable Whether specified concrete indexes should be ignored when unavailable (missing or closed). # @option args [String] :master_timeout DEPRECATED Specify timeout for connection to cluster manager. # @option args [String] :timeout Explicit operation timeout diff --git a/lib/opensearch/api/actions/indices/clear_cache.rb b/lib/opensearch/api/actions/indices/clear_cache.rb index 1cb9ba2e5..9800eda94 100644 --- a/lib/opensearch/api/actions/indices/clear_cache.rb +++ b/lib/opensearch/api/actions/indices/clear_cache.rb @@ -16,12 +16,12 @@ module Actions # Clears all or specific caches for one or more indexes. # # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. # @option args [Boolean] :fielddata If `true`, clears the fields cache. Use the `fields` parameter to clear the cache of specific fields only. - # @option args [String, Array] :fields Comma-separated list of field names used to limit the `fielddata` parameter. + # @option args [Enumerable, String] :fields Comma-separated list of field names used to limit the `fielddata` parameter. # @option args [Boolean] :file If `true`, clears the unused entries from the file cache on nodes with the Search role. # @option args [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index. - # @option args [Array] :index Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. + # @option args [Enumerable] :index Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. # @option args [Boolean] :query If `true`, clears the query cache. # @option args [Boolean] :request If `true`, clears the request cache. def clear_cache(args = {}) diff --git a/lib/opensearch/api/actions/indices/close.rb b/lib/opensearch/api/actions/indices/close.rb index ddcb68243..7ff906e88 100644 --- a/lib/opensearch/api/actions/indices/close.rb +++ b/lib/opensearch/api/actions/indices/close.rb @@ -15,10 +15,10 @@ module Indices module Actions # Closes an index. # - # @option args [String, Array] :index *Required* Comma-separated list or wildcard expression of index names used to limit the request. + # @option args [Enumerable, String] :index *Required* Comma-separated list or wildcard expression of index names used to limit the request. # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. # @option args [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index. # @option args [String] :master_timeout DEPRECATED Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. # @option args [String] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. diff --git a/lib/opensearch/api/actions/indices/data_streams_stats.rb b/lib/opensearch/api/actions/indices/data_streams_stats.rb index d7f7c2815..b60c9be5b 100644 --- a/lib/opensearch/api/actions/indices/data_streams_stats.rb +++ b/lib/opensearch/api/actions/indices/data_streams_stats.rb @@ -15,7 +15,7 @@ module Indices module Actions # Provides statistics on operations happening in a data stream. # - # @option args [String, Array] :name Comma-separated list of data streams used to limit the request. Wildcard expressions (`*`) are supported. To target all data streams in a cluster, omit this parameter or use `*`. + # @option args [Enumerable, String] :name Comma-separated list of data streams used to limit the request. Wildcard expressions (`*`) are supported. To target all data streams in a cluster, omit this parameter or use `*`. def data_streams_stats(args = {}) args = Utils.normalize_arguments(args) _name = args.delete('name') diff --git a/lib/opensearch/api/actions/indices/delete.rb b/lib/opensearch/api/actions/indices/delete.rb index f53f651bf..e135e4102 100644 --- a/lib/opensearch/api/actions/indices/delete.rb +++ b/lib/opensearch/api/actions/indices/delete.rb @@ -15,10 +15,10 @@ module Indices module Actions # Deletes an index. # - # @option args [String, Array] :index *Required* Comma-separated list of indexes to delete. You cannot specify index aliases. By default, this parameter does not support wildcards (`*`) or `_all`. To use wildcards or `_all`, set the `action.destructive_requires_name` cluster setting to `false`. + # @option args [Enumerable, String] :index *Required* Comma-separated list of indexes to delete. You cannot specify index aliases. By default, this parameter does not support wildcards (`*`) or `_all`. To use wildcards or `_all`, set the `action.destructive_requires_name` cluster setting to `false`. # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. # @option args [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index. # @option args [String] :master_timeout DEPRECATED Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. # @option args [String] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. diff --git a/lib/opensearch/api/actions/indices/delete_alias.rb b/lib/opensearch/api/actions/indices/delete_alias.rb index a085b8ea2..dcb754b68 100644 --- a/lib/opensearch/api/actions/indices/delete_alias.rb +++ b/lib/opensearch/api/actions/indices/delete_alias.rb @@ -15,8 +15,8 @@ module Indices module Actions # Deletes an alias. # - # @option args [String, Array] :index *Required* Comma-separated list of data streams or indexes used to limit the request. Supports wildcards (`*`). - # @option args [String, Array] :name *Required* Comma-separated list of aliases to remove. Supports wildcards (`*`). To remove all aliases, use `*` or `_all`. + # @option args [Enumerable, String] :index *Required* Comma-separated list of data streams or indexes used to limit the request. Supports wildcards (`*`). + # @option args [Enumerable, String] :name *Required* Comma-separated list of aliases to remove. Supports wildcards (`*`). To remove all aliases, use `*` or `_all`. # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. # @option args [String] :master_timeout DEPRECATED Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. # @option args [String] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. diff --git a/lib/opensearch/api/actions/indices/delete_data_stream.rb b/lib/opensearch/api/actions/indices/delete_data_stream.rb index 6ba6c65ef..518544e08 100644 --- a/lib/opensearch/api/actions/indices/delete_data_stream.rb +++ b/lib/opensearch/api/actions/indices/delete_data_stream.rb @@ -15,7 +15,7 @@ module Indices module Actions # Deletes a data stream. # - # @option args [String, Array] :name *Required* Comma-separated list of data streams to delete. Wildcard (`*`) expressions are supported. + # @option args [Enumerable, String] :name *Required* Comma-separated list of data streams to delete. Wildcard (`*`) expressions are supported. # @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request def delete_data_stream(args = {}) args = Utils.normalize_arguments(args) diff --git a/lib/opensearch/api/actions/indices/exists.rb b/lib/opensearch/api/actions/indices/exists.rb index 41d77ae2d..ea2ae9b6f 100644 --- a/lib/opensearch/api/actions/indices/exists.rb +++ b/lib/opensearch/api/actions/indices/exists.rb @@ -15,10 +15,10 @@ module Indices module Actions # Returns information about whether a particular index exists. # - # @option args [String, Array] :index *Required* Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). + # @option args [Enumerable, String] :index *Required* Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`). # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. # @option args [Boolean] :flat_settings If `true`, returns settings in flat format. # @option args [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index. # @option args [Boolean] :include_defaults If `true`, return all default settings in the response. diff --git a/lib/opensearch/api/actions/indices/exists_alias.rb b/lib/opensearch/api/actions/indices/exists_alias.rb index 2227c8f42..e39818ea8 100644 --- a/lib/opensearch/api/actions/indices/exists_alias.rb +++ b/lib/opensearch/api/actions/indices/exists_alias.rb @@ -15,12 +15,12 @@ module Indices module Actions # Returns information about whether a particular alias exists. # - # @option args [String, Array] :name *Required* Comma-separated list of aliases to check. Supports wildcards (`*`). + # @option args [Enumerable, String] :name *Required* Comma-separated list of aliases to check. Supports wildcards (`*`). # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. # @option args [Boolean] :ignore_unavailable If `false`, requests that include a missing data stream or index in the target indexes or data streams return an error. # @option args [Boolean] :local If `true`, the request retrieves information from the local node only. - # @option args [String, Array] :index Comma-separated list of data streams or indexes used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable, String] :index Comma-separated list of data streams or indexes used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. def exists_alias(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'name' missing" unless args['name'] diff --git a/lib/opensearch/api/actions/indices/exists_template.rb b/lib/opensearch/api/actions/indices/exists_template.rb index 00fd94642..9980711f3 100644 --- a/lib/opensearch/api/actions/indices/exists_template.rb +++ b/lib/opensearch/api/actions/indices/exists_template.rb @@ -15,7 +15,7 @@ module Indices module Actions # Returns information about whether a particular index template exists. # - # @option args [String, Array] :name *Required* The comma separated names of the index templates + # @option args [Enumerable, String] :name *Required* The comma separated names of the index templates # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. # @option args [Boolean] :flat_settings Return settings in flat format. # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. diff --git a/lib/opensearch/api/actions/indices/flush.rb b/lib/opensearch/api/actions/indices/flush.rb index 50a1d8305..64820c54b 100644 --- a/lib/opensearch/api/actions/indices/flush.rb +++ b/lib/opensearch/api/actions/indices/flush.rb @@ -16,11 +16,11 @@ module Actions # Performs the flush operation on one or more indexes. # # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. # @option args [Boolean] :force If `true`, the request forces a flush even if there are no changes to commit to the index. # @option args [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index. # @option args [Boolean] :wait_if_ongoing If `true`, the flush operation blocks until execution when another flush operation is running. If `false`, OpenSearch returns an error if you request a flush when another flush operation is running. - # @option args [String, Array] :index Comma-separated list of data streams, indexes, and aliases to flush. Supports wildcards (`*`). To flush all data streams and indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and aliases to flush. Supports wildcards (`*`). To flush all data streams and indexes, omit this parameter or use `*` or `_all`. def flush(args = {}) args = Utils.normalize_arguments(args) _index = args.delete('index') diff --git a/lib/opensearch/api/actions/indices/forcemerge.rb b/lib/opensearch/api/actions/indices/forcemerge.rb index e193ada9b..ec12e3daf 100644 --- a/lib/opensearch/api/actions/indices/forcemerge.rb +++ b/lib/opensearch/api/actions/indices/forcemerge.rb @@ -16,14 +16,14 @@ module Actions # Performs the force merge operation on one or more indexes. # # @option args [Boolean] :allow_no_indices Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified) - # @option args [String, String, String, String, String, Array] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. + # @option args [Enumerable, String] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. # @option args [Boolean] :flush Specify whether the index should be flushed after performing the operation. # @option args [Boolean] :ignore_unavailable Whether specified concrete indexes should be ignored when unavailable (missing or closed) # @option args [Float] :max_num_segments The number of larger segments into which smaller segments are merged. Set this parameter to 1 to merge all segments into one segment. The default behavior is to perform the merge as necessary. # @option args [Boolean] :only_expunge_deletes Specify whether the operation should only expunge deleted documents # @option args [Boolean] :primary_only Specify whether the operation should only perform on primary shards. Defaults to false. # @option args [Boolean] :wait_for_completion Should the request wait until the force merge is completed. - # @option args [String, Array] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indexes + # @option args [Enumerable, String] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indexes def forcemerge(args = {}) args = Utils.normalize_arguments(args) _index = args.delete('index') diff --git a/lib/opensearch/api/actions/indices/get.rb b/lib/opensearch/api/actions/indices/get.rb index 301891fd3..7e48e90c9 100644 --- a/lib/opensearch/api/actions/indices/get.rb +++ b/lib/opensearch/api/actions/indices/get.rb @@ -15,10 +15,10 @@ module Indices module Actions # Returns information about one or more indexes. # - # @option args [String, Array] :index *Required* Comma-separated list of data streams, indexes, and index aliases used to limit the request. Wildcard expressions (*) are supported. + # @option args [Enumerable, String] :index *Required* Comma-separated list of data streams, indexes, and index aliases used to limit the request. Wildcard expressions (*) are supported. # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard expressions can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard expressions can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. # @option args [Boolean] :flat_settings If `true`, returns settings in flat format. # @option args [Boolean] :ignore_unavailable If `false`, requests that target a missing index return an error. # @option args [Boolean] :include_defaults If `true`, return all default settings in the response. diff --git a/lib/opensearch/api/actions/indices/get_alias.rb b/lib/opensearch/api/actions/indices/get_alias.rb index 51b7bd54c..ae8dd4ad2 100644 --- a/lib/opensearch/api/actions/indices/get_alias.rb +++ b/lib/opensearch/api/actions/indices/get_alias.rb @@ -16,11 +16,11 @@ module Actions # Returns an alias. # # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. # @option args [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index. # @option args [Boolean] :local If `true`, the request retrieves information from the local node only. - # @option args [String, Array] :name Comma-separated list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`. - # @option args [String, Array] :index Comma-separated list of data streams or indexes used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable, String] :name Comma-separated list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`. + # @option args [Enumerable, String] :index Comma-separated list of data streams or indexes used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. def get_alias(args = {}) args = Utils.normalize_arguments(args) _name = args.delete('name') diff --git a/lib/opensearch/api/actions/indices/get_data_stream.rb b/lib/opensearch/api/actions/indices/get_data_stream.rb index cf329efa8..3f765eefe 100644 --- a/lib/opensearch/api/actions/indices/get_data_stream.rb +++ b/lib/opensearch/api/actions/indices/get_data_stream.rb @@ -15,7 +15,7 @@ module Indices module Actions # Returns data streams. # - # @option args [String, Array] :name Comma-separated list of data stream names used to limit the request. Wildcard (`*`) expressions are supported. If omitted, all data streams are returned. + # @option args [Enumerable, String] :name Comma-separated list of data stream names used to limit the request. Wildcard (`*`) expressions are supported. If omitted, all data streams are returned. def get_data_stream(args = {}) args = Utils.normalize_arguments(args) _name = args.delete('name') diff --git a/lib/opensearch/api/actions/indices/get_field_mapping.rb b/lib/opensearch/api/actions/indices/get_field_mapping.rb index bdc3d75d3..6c60e5705 100644 --- a/lib/opensearch/api/actions/indices/get_field_mapping.rb +++ b/lib/opensearch/api/actions/indices/get_field_mapping.rb @@ -15,13 +15,13 @@ module Indices module Actions # Returns mapping for one or more fields. # - # @option args [String, Array] :fields *Required* Comma-separated list or wildcard expression of fields used to limit returned information. + # @option args [Enumerable, String] :fields *Required* Comma-separated list or wildcard expression of fields used to limit returned information. # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. # @option args [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index. # @option args [Boolean] :include_defaults If `true`, return all default settings in the response. # @option args [Boolean] :local If `true`, the request retrieves information from the local node only. - # @option args [String, Array] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. def get_field_mapping(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'fields' missing" unless args['fields'] diff --git a/lib/opensearch/api/actions/indices/get_mapping.rb b/lib/opensearch/api/actions/indices/get_mapping.rb index aab6236b7..8f3096d45 100644 --- a/lib/opensearch/api/actions/indices/get_mapping.rb +++ b/lib/opensearch/api/actions/indices/get_mapping.rb @@ -17,9 +17,9 @@ module Actions # # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. # @option args [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index. - # @option args [String, Array] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. # @option args [Boolean] :local If `true`, the request retrieves information from the local node only. # @option args [String] :master_timeout DEPRECATED Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. def get_mapping(args = {}) diff --git a/lib/opensearch/api/actions/indices/get_settings.rb b/lib/opensearch/api/actions/indices/get_settings.rb index ace5fbf8e..3492e45b3 100644 --- a/lib/opensearch/api/actions/indices/get_settings.rb +++ b/lib/opensearch/api/actions/indices/get_settings.rb @@ -17,14 +17,14 @@ module Actions # # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with foo but no index starts with `bar`. # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. # @option args [Boolean] :flat_settings If `true`, returns settings in flat format. # @option args [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index. # @option args [Boolean] :include_defaults If `true`, return all default settings in the response. # @option args [Boolean] :local If `true`, the request retrieves information from the local node only. If `false`, information is retrieved from the cluster-manager node. # @option args [String] :master_timeout DEPRECATED Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. - # @option args [String, Array] :name Comma-separated list or wildcard expression of settings to retrieve. - # @option args [String, Array] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable, String] :name Comma-separated list or wildcard expression of settings to retrieve. + # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. def get_settings(args = {}) args = Utils.normalize_arguments(args) _name = args.delete('name') diff --git a/lib/opensearch/api/actions/indices/get_template.rb b/lib/opensearch/api/actions/indices/get_template.rb index 2a5a2be68..c4a1e1817 100644 --- a/lib/opensearch/api/actions/indices/get_template.rb +++ b/lib/opensearch/api/actions/indices/get_template.rb @@ -19,7 +19,7 @@ module Actions # @option args [Boolean] :flat_settings If `true`, returns settings in flat format. # @option args [Boolean] :local If `true`, the request retrieves information from the local node only. # @option args [String] :master_timeout DEPRECATED Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. - # @option args [String, Array] :name Comma-separated list of index template names used to limit the request. Wildcard (`*`) expressions are supported. To return all index templates, omit this parameter or use a value of `_all` or `*`. + # @option args [Enumerable, String] :name Comma-separated list of index template names used to limit the request. Wildcard (`*`) expressions are supported. To return all index templates, omit this parameter or use a value of `_all` or `*`. def get_template(args = {}) args = Utils.normalize_arguments(args) _name = args.delete('name') diff --git a/lib/opensearch/api/actions/indices/get_upgrade.rb b/lib/opensearch/api/actions/indices/get_upgrade.rb index 84fbb14d7..48810e31c 100644 --- a/lib/opensearch/api/actions/indices/get_upgrade.rb +++ b/lib/opensearch/api/actions/indices/get_upgrade.rb @@ -16,9 +16,9 @@ module Actions # The `_upgrade` API is no longer useful and will be removed. # # @option args [Boolean] :allow_no_indices Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified). - # @option args [String, String, String, String, String, Array] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. + # @option args [Enumerable, String] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. # @option args [Boolean] :ignore_unavailable Whether specified concrete indexes should be ignored when unavailable (missing or closed). - # @option args [Array] :index Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. + # @option args [Enumerable] :index Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. def get_upgrade(args = {}) args = Utils.normalize_arguments(args) _index = args.delete('index') diff --git a/lib/opensearch/api/actions/indices/open.rb b/lib/opensearch/api/actions/indices/open.rb index 1d53580f0..b8370b4db 100644 --- a/lib/opensearch/api/actions/indices/open.rb +++ b/lib/opensearch/api/actions/indices/open.rb @@ -15,10 +15,10 @@ module Indices module Actions # Opens an index. # - # @option args [String, Array] :index *Required* Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). By default, you must explicitly name the indexes you using to limit the request. To limit a request using `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to false. You can update this setting in the `opensearch.yml` file or using the cluster update settings API. + # @option args [Enumerable, String] :index *Required* Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). By default, you must explicitly name the indexes you using to limit the request. To limit a request using `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to false. You can update this setting in the `opensearch.yml` file or using the cluster update settings API. # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. # @option args [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index. # @option args [String] :master_timeout DEPRECATED Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. # @option args [String] :task_execution_timeout Explicit task execution timeout, only useful when `wait_for_completion` is false, defaults to `1h`. diff --git a/lib/opensearch/api/actions/indices/put_alias.rb b/lib/opensearch/api/actions/indices/put_alias.rb index 1c9e858e0..77d5fbefc 100644 --- a/lib/opensearch/api/actions/indices/put_alias.rb +++ b/lib/opensearch/api/actions/indices/put_alias.rb @@ -19,7 +19,7 @@ module Actions # @option args [String] :master_timeout DEPRECATED Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. # @option args [String] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. # @option args [String] :name Alias to update. If the alias doesn't exist, the request creates it. Index alias names support date math. - # @option args [String, Array] :index Comma-separated list of data streams or indexes to add. Supports wildcards (`*`). Wildcard patterns that match both data streams and indexes return an error. + # @option args [Enumerable, String] :index Comma-separated list of data streams or indexes to add. Supports wildcards (`*`). Wildcard patterns that match both data streams and indexes return an error. # @option args [Hash] :body The settings for the alias, such as `routing` or `filter` def put_alias(args = {}) args = Utils.normalize_arguments(args) diff --git a/lib/opensearch/api/actions/indices/put_mapping.rb b/lib/opensearch/api/actions/indices/put_mapping.rb index 881bf547d..e36e16996 100644 --- a/lib/opensearch/api/actions/indices/put_mapping.rb +++ b/lib/opensearch/api/actions/indices/put_mapping.rb @@ -15,10 +15,10 @@ module Indices module Actions # Updates the index mappings. # - # @option args [String, Array] :index *Required* A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indexes. + # @option args [Enumerable, String] :index *Required* A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indexes. # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. # @option args [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index. # @option args [String] :master_timeout DEPRECATED Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. # @option args [String] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. diff --git a/lib/opensearch/api/actions/indices/put_settings.rb b/lib/opensearch/api/actions/indices/put_settings.rb index c9b18021b..59e800c05 100644 --- a/lib/opensearch/api/actions/indices/put_settings.rb +++ b/lib/opensearch/api/actions/indices/put_settings.rb @@ -17,13 +17,13 @@ module Actions # # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. # @option args [Boolean] :flat_settings If `true`, returns settings in flat format. # @option args [Boolean] :ignore_unavailable Whether specified concrete indexes should be ignored when unavailable (missing or closed). # @option args [String] :master_timeout DEPRECATED Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. # @option args [Boolean] :preserve_existing If `true`, existing index settings remain unchanged. # @option args [String] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - # @option args [String, Array] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. # @option args [Hash] :body *Required* The index settings to be updated. def put_settings(args = {}) args = Utils.normalize_arguments(args) diff --git a/lib/opensearch/api/actions/indices/recovery.rb b/lib/opensearch/api/actions/indices/recovery.rb index 8c7f61116..2695d387c 100644 --- a/lib/opensearch/api/actions/indices/recovery.rb +++ b/lib/opensearch/api/actions/indices/recovery.rb @@ -17,7 +17,7 @@ module Actions # # @option args [Boolean] :active_only If `true`, the response only includes ongoing shard recoveries. # @option args [Boolean] :detailed If `true`, the response includes detailed information about shard recoveries. - # @option args [String, Array] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. def recovery(args = {}) args = Utils.normalize_arguments(args) _index = args.delete('index') diff --git a/lib/opensearch/api/actions/indices/refresh.rb b/lib/opensearch/api/actions/indices/refresh.rb index 7dac93179..3d6582010 100644 --- a/lib/opensearch/api/actions/indices/refresh.rb +++ b/lib/opensearch/api/actions/indices/refresh.rb @@ -16,9 +16,9 @@ module Actions # Performs the refresh operation in one or more indexes. # # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. # @option args [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index. - # @option args [String, Array] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. def refresh(args = {}) args = Utils.normalize_arguments(args) _index = args.delete('index') diff --git a/lib/opensearch/api/actions/indices/resolve_index.rb b/lib/opensearch/api/actions/indices/resolve_index.rb index 74b93dd7e..a08784e7b 100644 --- a/lib/opensearch/api/actions/indices/resolve_index.rb +++ b/lib/opensearch/api/actions/indices/resolve_index.rb @@ -15,8 +15,8 @@ module Indices module Actions # Returns information about any matching indexes, aliases, and data streams. # - # @option args [String, Array] :name *Required* Comma-separated name(s) or index pattern(s) of the indexes, aliases, and data streams to resolve. Resources on remote clusters can be specified using the ``:`` syntax. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + # @option args [Enumerable, String] :name *Required* Comma-separated name(s) or index pattern(s) of the indexes, aliases, and data streams to resolve. Resources on remote clusters can be specified using the ``:`` syntax. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. def resolve_index(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'name' missing" unless args['name'] diff --git a/lib/opensearch/api/actions/indices/segments.rb b/lib/opensearch/api/actions/indices/segments.rb index 8bd4bb7c0..317b5b265 100644 --- a/lib/opensearch/api/actions/indices/segments.rb +++ b/lib/opensearch/api/actions/indices/segments.rb @@ -16,10 +16,10 @@ module Actions # Provides low-level information about segments in a Lucene index. # # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. # @option args [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index. # @option args [Boolean] :verbose If `true`, the request returns a verbose response. - # @option args [String, Array] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. def segments(args = {}) args = Utils.normalize_arguments(args) _index = args.delete('index') diff --git a/lib/opensearch/api/actions/indices/shard_stores.rb b/lib/opensearch/api/actions/indices/shard_stores.rb index 3248f1bff..df10db4cc 100644 --- a/lib/opensearch/api/actions/indices/shard_stores.rb +++ b/lib/opensearch/api/actions/indices/shard_stores.rb @@ -16,10 +16,10 @@ module Actions # Provides store information for shard copies of indexes. # # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. # @option args [Boolean] :ignore_unavailable If `true`, missing or closed indexes are not included in the response. - # @option args [String, Array] :status List of shard health statuses used to limit the request. - # @option args [String, Array] :index List of data streams, indexes, and aliases used to limit the request. + # @option args [Enumerable, String] :status List of shard health statuses used to limit the request. + # @option args [Enumerable, String] :index List of data streams, indexes, and aliases used to limit the request. def shard_stores(args = {}) args = Utils.normalize_arguments(args) _index = args.delete('index') diff --git a/lib/opensearch/api/actions/indices/stats.rb b/lib/opensearch/api/actions/indices/stats.rb index 67ebf9765..33d1d90ba 100644 --- a/lib/opensearch/api/actions/indices/stats.rb +++ b/lib/opensearch/api/actions/indices/stats.rb @@ -15,17 +15,17 @@ module Indices module Actions # Provides statistics on operations happening in an index. # - # @option args [String, Array] :completion_fields Comma-separated list or wildcard expressions of fields to include in field data and suggest statistics. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. - # @option args [String, Array] :fielddata_fields Comma-separated list or wildcard expressions of fields to include in field data statistics. - # @option args [String, Array] :fields Comma-separated list or wildcard expressions of fields to include in the statistics. + # @option args [Enumerable, String] :completion_fields Comma-separated list or wildcard expressions of fields to include in field data and suggest statistics. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. + # @option args [Enumerable, String] :fielddata_fields Comma-separated list or wildcard expressions of fields to include in field data statistics. + # @option args [Enumerable, String] :fields Comma-separated list or wildcard expressions of fields to include in the statistics. # @option args [Boolean] :forbid_closed_indices If `true`, statistics are not collected from closed indexes. - # @option args [String, Array] :groups Comma-separated list of search groups to include in the search statistics. + # @option args [Enumerable, String] :groups Comma-separated list of search groups to include in the search statistics. # @option args [Boolean] :include_segment_file_sizes If `true`, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested). # @option args [Boolean] :include_unloaded_segments If `true`, the response includes information from segments that are not loaded into memory. # @option args [String] :level Indicates whether statistics are aggregated at the cluster, index, or shard level. - # @option args [String, Array] :metric Limit the information returned the specific metrics. - # @option args [String, Array] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indexes + # @option args [Enumerable, String] :metric Limit the information returned the specific metrics. + # @option args [Enumerable, String] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indexes def stats(args = {}) args = Utils.normalize_arguments(args) _metric = args.delete('metric') diff --git a/lib/opensearch/api/actions/indices/upgrade.rb b/lib/opensearch/api/actions/indices/upgrade.rb index 187d857e7..6929f0a20 100644 --- a/lib/opensearch/api/actions/indices/upgrade.rb +++ b/lib/opensearch/api/actions/indices/upgrade.rb @@ -16,11 +16,11 @@ module Actions # The `_upgrade` API is no longer useful and will be removed. # # @option args [Boolean] :allow_no_indices Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified). - # @option args [String, String, String, String, String, Array] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. + # @option args [Enumerable, String] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. # @option args [Boolean] :ignore_unavailable Whether specified concrete indexes should be ignored when unavailable (missing or closed). # @option args [Boolean] :only_ancient_segments If `true`, only ancient (an older Lucene major release) segments will be upgraded. # @option args [Boolean] :wait_for_completion Should this request wait until the operation has completed before returning. - # @option args [Array] :index Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. + # @option args [Enumerable] :index Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. # @option args [Hash] :body def upgrade(args = {}) args = Utils.normalize_arguments(args) diff --git a/lib/opensearch/api/actions/indices/validate_query.rb b/lib/opensearch/api/actions/indices/validate_query.rb index e737f9f05..69e49c76f 100644 --- a/lib/opensearch/api/actions/indices/validate_query.rb +++ b/lib/opensearch/api/actions/indices/validate_query.rb @@ -21,13 +21,13 @@ module Actions # @option args [String] :analyzer Analyzer to use for the query string. This parameter can only be used when the `q` query string parameter is specified. # @option args [String] :default_operator The default operator for query string query: `AND` or `OR`. # @option args [String] :df Field to use as default where no field prefix is given in the query string. This parameter can only be used when the `q` query string parameter is specified. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. # @option args [Boolean] :explain If `true`, the response returns detailed information if an error has occurred. # @option args [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index. # @option args [Boolean] :lenient If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. # @option args [String] :q Query in the Lucene query string syntax. # @option args [Boolean] :rewrite If `true`, returns a more detailed explanation showing the actual Lucene query that will be executed. - # @option args [String, Array] :index Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams or indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams or indexes, omit this parameter or use `*` or `_all`. # @option args [Hash] :body The query definition specified with the Query DSL def validate_query(args = {}) args = Utils.normalize_arguments(args) diff --git a/lib/opensearch/api/actions/knn/search_models.rb b/lib/opensearch/api/actions/knn/search_models.rb index a31015115..bbe6c0fb8 100644 --- a/lib/opensearch/api/actions/knn/search_models.rb +++ b/lib/opensearch/api/actions/knn/search_models.rb @@ -15,9 +15,9 @@ module Knn module Actions # Use an OpenSearch query to search for models in the index. # - # @option args [Array] :_source Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. - # @option args [Array] :_source_excludes List of fields to exclude from the returned `_source` field. - # @option args [Array] :_source_includes List of fields to extract and return from the `_source` field. + # @option args [Enumerable] :_source Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. + # @option args [Enumerable] :_source_excludes List of fields to exclude from the returned `_source` field. + # @option args [Enumerable] :_source_includes List of fields to extract and return from the `_source` field. # @option args [Boolean] :allow_no_indices Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified). # @option args [Boolean] :allow_partial_search_results Indicate if an error should be returned if there is a partial search failure or timeout. # @option args [Boolean] :analyze_wildcard Specify whether wildcard and prefix queries should be analyzed. @@ -26,8 +26,8 @@ module Actions # @option args [Boolean] :ccs_minimize_roundtrips Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution. # @option args [String] :default_operator The default operator for query string query (AND or OR). # @option args [String] :df The field to use as default where no field prefix is given in the query string. - # @option args [Array] :docvalue_fields Comma-separated list of fields to return as the docvalue representation of a field for each hit. - # @option args [String, String, String, String, String, Array] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. + # @option args [Enumerable] :docvalue_fields Comma-separated list of fields to return as the docvalue representation of a field for each hit. + # @option args [Enumerable, String] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. # @option args [Boolean] :explain Specify whether to return detailed information about score computation as part of a hit. # @option args [Integer] :from Starting offset. # @option args [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indexes should be ignored when throttled. @@ -39,14 +39,14 @@ module Actions # @option args [String] :q Query in the Lucene query string syntax. # @option args [Boolean] :request_cache Specify if request cache should be used for this request or not, defaults to index level setting. # @option args [Boolean] :rest_total_hits_as_int Indicates whether `hits.total` should be rendered as an integer or an object in the rest search response. - # @option args [String, Array] :routing Comma-separated list of specific routing values. + # @option args [Enumerable, String] :routing Comma-separated list of specific routing values. # @option args [String] :scroll Specify how long a consistent view of the index should be maintained for scrolled search. # @option args [String] :search_type Search operation type. # @option args [Boolean] :seq_no_primary_term Specify whether to return sequence number and primary term of the last modification of each hit. # @option args [Integer] :size Number of hits to return. - # @option args [Array] :sort Comma-separated list of : pairs. - # @option args [Array] :stats Specific 'tag' of the request for logging and statistical purposes. - # @option args [Array] :stored_fields Comma-separated list of stored fields to return. + # @option args [Enumerable] :sort Comma-separated list of : pairs. + # @option args [Enumerable] :stats Specific 'tag' of the request for logging and statistical purposes. + # @option args [Enumerable] :stored_fields Comma-separated list of stored fields to return. # @option args [String] :suggest_field Specify which field to use for suggestions. # @option args [String] :suggest_mode Specify suggest mode. # @option args [Integer] :suggest_size How many suggestions to return in response. diff --git a/lib/opensearch/api/actions/knn/stats.rb b/lib/opensearch/api/actions/knn/stats.rb index 4b7e29e6e..1dea62db5 100644 --- a/lib/opensearch/api/actions/knn/stats.rb +++ b/lib/opensearch/api/actions/knn/stats.rb @@ -15,9 +15,9 @@ module Knn module Actions # Provides information about the current status of the k-NN plugin. # - # @option args [Array] :node_id Comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. + # @option args [Enumerable] :node_id Comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. # @option args [String] :timeout Operation timeout. - # @option args [Array] :stat Comma-separated list of stats to retrieve; use `_all` or empty string to retrieve all stats. + # @option args [Enumerable] :stat Comma-separated list of stats to retrieve; use `_all` or empty string to retrieve all stats. def stats(args = {}) args = Utils.normalize_arguments(args) _node_id = args.delete('node_id') diff --git a/lib/opensearch/api/actions/knn/warmup.rb b/lib/opensearch/api/actions/knn/warmup.rb index c7ef5e85a..26614dbb1 100644 --- a/lib/opensearch/api/actions/knn/warmup.rb +++ b/lib/opensearch/api/actions/knn/warmup.rb @@ -15,7 +15,7 @@ module Knn module Actions # Preloads native library files into memory, reducing initial search latency for specified indexes. # - # @option args [Array] :index *Required* Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. + # @option args [Enumerable] :index *Required* Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. def warmup(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'index' missing" unless args['index'] diff --git a/lib/opensearch/api/actions/list/indices.rb b/lib/opensearch/api/actions/list/indices.rb index 477249382..a221262e0 100644 --- a/lib/opensearch/api/actions/list/indices.rb +++ b/lib/opensearch/api/actions/list/indices.rb @@ -17,9 +17,9 @@ module Actions # # @option args [String] :bytes The unit used to display byte values. # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String, String, String, String, String, Array] :expand_wildcards The type of index that wildcard patterns can match. + # @option args [Enumerable, String] :expand_wildcards The type of index that wildcard patterns can match. # @option args [String] :format A short version of the Accept header, such as `JSON`, `YAML`. - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [String] :health The health status used to limit returned indexes. By default, the response includes indexes of any health status. # @option args [Boolean] :help Return help information. # @option args [Boolean] :include_unloaded_segments If `true`, the response includes information from segments that are not loaded into memory. @@ -27,12 +27,12 @@ module Actions # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. # @option args [Hash] :next_token Token to retrieve next page of indexes. # @option args [Boolean] :pri If `true`, the response only includes information from primary shards. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [Integer] :size Maximum number of indexes to be displayed in a page. # @option args [String] :sort Defines order in which indexes will be displayed. Accepted values are `asc` and `desc`. If `desc`, most recently created indexes would be displayed first. # @option args [String] :time The unit used to display time values. # @option args [Boolean] :v Verbose mode. Display column headers. - # @option args [String, Array] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. def indices(args = {}) args = Utils.normalize_arguments(args) _index = args.delete('index') diff --git a/lib/opensearch/api/actions/list/shards.rb b/lib/opensearch/api/actions/list/shards.rb index 95a60df90..6d82126a1 100644 --- a/lib/opensearch/api/actions/list/shards.rb +++ b/lib/opensearch/api/actions/list/shards.rb @@ -18,17 +18,17 @@ module Actions # @option args [String] :bytes The unit used to display byte values. # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. # @option args [String] :format A short version of the Accept header, such as `JSON`, `YAML`. - # @option args [Array] :h Comma-separated list of column names to display. + # @option args [Enumerable] :h Comma-separated list of column names to display. # @option args [Boolean] :help Return help information. # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. # @option args [Hash] :next_token Token to retrieve next page of shards. - # @option args [Array] :s Comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. # @option args [Integer] :size Maximum number of shards to be displayed in a page. # @option args [String] :sort Defines order in which shards will be displayed. Accepted values are `asc` and `desc`. If `desc`, most recently created shards would be displayed first. # @option args [String] :time The unit in which to display time values. # @option args [Boolean] :v Verbose mode. Display column headers. - # @option args [String, Array] :index A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable, String] :index A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. def shards(args = {}) args = Utils.normalize_arguments(args) _index = args.delete('index') diff --git a/lib/opensearch/api/actions/mget.rb b/lib/opensearch/api/actions/mget.rb index b0ad89247..de22a750a 100644 --- a/lib/opensearch/api/actions/mget.rb +++ b/lib/opensearch/api/actions/mget.rb @@ -15,14 +15,14 @@ module Root module Actions # Allows to get multiple documents in one request. # - # @option args [Boolean, String, Array] :_source Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. - # @option args [String, Array] :_source_excludes A comma-separated list of source fields to exclude from the response. You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter. - # @option args [String, Array] :_source_includes A comma-separated list of source fields to include in the response. If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter. If the `_source` parameter is `false`, this parameter is ignored. + # @option args [Boolean, Enumerable, String] :_source Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. + # @option args [Enumerable, String] :_source_excludes A comma-separated list of source fields to exclude from the response. You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter. + # @option args [Enumerable, String] :_source_includes A comma-separated list of source fields to include in the response. If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter. If the `_source` parameter is `false`, this parameter is ignored. # @option args [String] :preference Specifies the node or shard the operation should be performed on. Random by default. # @option args [Boolean] :realtime If `true`, the request is real-time as opposed to near-real-time. # @option args [Boolean, String] :refresh If `true`, the request refreshes relevant shards before retrieving documents. - # @option args [String, Array] :routing Custom value used to route operations to a specific shard. - # @option args [String, Array] :stored_fields If `true`, retrieves the document fields stored in the index rather than the document `_source`. + # @option args [Enumerable, String] :routing Custom value used to route operations to a specific shard. + # @option args [Enumerable, String] :stored_fields If `true`, retrieves the document fields stored in the index rather than the document `_source`. # @option args [String] :index Name of the index to retrieve documents from when `ids` are specified, or when a document in the `docs` array does not specify an index. # @option args [Hash] :body *Required* Document identifiers; can be either `docs` (containing full document information) or `ids` (when index is provided in the URL. def mget(args = {}) diff --git a/lib/opensearch/api/actions/msearch.rb b/lib/opensearch/api/actions/msearch.rb index 54a2c3e57..fb74ad05f 100644 --- a/lib/opensearch/api/actions/msearch.rb +++ b/lib/opensearch/api/actions/msearch.rb @@ -22,8 +22,8 @@ module Actions # @option args [Boolean] :rest_total_hits_as_int If `true`, `hits.total` are returned as an integer in the response. Defaults to false, which returns an object. # @option args [String] :search_type Indicates whether global term and document frequencies should be used when scoring returned documents. # @option args [Boolean] :typed_keys Specifies whether aggregation and suggester names should be prefixed by their respective types in the response. - # @option args [String, Array] :index Comma-separated list of data streams, indexes, and index aliases to search. - # @option args [Array] :body *Required* The request definitions (metadata-search request definition pairs), separated by newlines + # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and index aliases to search. + # @option args [Enumerable] :body *Required* The request definitions (metadata-search request definition pairs), separated by newlines def msearch(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'body' missing" unless args['body'] diff --git a/lib/opensearch/api/actions/msearch_template.rb b/lib/opensearch/api/actions/msearch_template.rb index da5a1a1fc..66313e51c 100644 --- a/lib/opensearch/api/actions/msearch_template.rb +++ b/lib/opensearch/api/actions/msearch_template.rb @@ -20,8 +20,8 @@ module Actions # @option args [Boolean] :rest_total_hits_as_int If `true`, the response returns `hits.total` as an integer. If `false`, it returns `hits.total` as an object. # @option args [String] :search_type The type of the search operation. Available options: `query_then_fetch`, `dfs_query_then_fetch`. # @option args [Boolean] :typed_keys If `true`, the response prefixes aggregation and suggester names with their respective types. - # @option args [String, Array] :index Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams and indexes, omit this parameter or use `*`. - # @option args [Array] :body *Required* The request definitions (metadata-search request definition pairs), separated by newlines + # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams and indexes, omit this parameter or use `*`. + # @option args [Enumerable] :body *Required* The request definitions (metadata-search request definition pairs), separated by newlines def msearch_template(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'body' missing" unless args['body'] diff --git a/lib/opensearch/api/actions/mtermvectors.rb b/lib/opensearch/api/actions/mtermvectors.rb index 2c6f3341d..956736848 100644 --- a/lib/opensearch/api/actions/mtermvectors.rb +++ b/lib/opensearch/api/actions/mtermvectors.rb @@ -16,14 +16,14 @@ module Actions # Returns multiple termvectors in one request. # # @option args [Boolean] :field_statistics If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies. - # @option args [String, Array] :fields Comma-separated list or wildcard expressions of fields to include in the statistics. Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters. - # @option args [Array] :ids A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body + # @option args [Enumerable, String] :fields Comma-separated list or wildcard expressions of fields to include in the statistics. Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters. + # @option args [Enumerable] :ids A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body # @option args [Boolean] :offsets If `true`, the response includes term offsets. # @option args [Boolean] :payloads If `true`, the response includes term payloads. # @option args [Boolean] :positions If `true`, the response includes term positions. # @option args [String] :preference Specifies the node or shard the operation should be performed on. Random by default. # @option args [Boolean] :realtime If `true`, the request is real-time as opposed to near-real-time. - # @option args [String, Array] :routing Custom value used to route operations to a specific shard. + # @option args [Enumerable, String] :routing Custom value used to route operations to a specific shard. # @option args [Boolean] :term_statistics If `true`, the response includes term frequency and document frequency. # @option args [Integer] :version If `true`, returns the document version as part of a hit. # @option args [String] :version_type Specific version type. diff --git a/lib/opensearch/api/actions/nodes/hot_threads.rb b/lib/opensearch/api/actions/nodes/hot_threads.rb index cbc640339..7d0691b5d 100644 --- a/lib/opensearch/api/actions/nodes/hot_threads.rb +++ b/lib/opensearch/api/actions/nodes/hot_threads.rb @@ -15,7 +15,7 @@ module Nodes module Actions # Returns information about hot threads on each node in the cluster. # - # @option args [Array] :node_id Comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. + # @option args [Enumerable] :node_id Comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. # @option args [Boolean] :ignore_idle_threads Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue. # @option args [String] :interval The interval for the second sampling of threads. # @option args [Integer] :snapshots Number of samples of thread stack trace. diff --git a/lib/opensearch/api/actions/nodes/info.rb b/lib/opensearch/api/actions/nodes/info.rb index 480cfd574..87652256a 100644 --- a/lib/opensearch/api/actions/nodes/info.rb +++ b/lib/opensearch/api/actions/nodes/info.rb @@ -17,9 +17,9 @@ module Actions # # @option args [Boolean] :flat_settings If `true`, returns settings in flat format. # @option args [String] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - # @option args [String, Array, Array] :node_id_or_metric Limits the information returned to a list of node IDs or specific metrics. Supports a comma-separated list, such as `node1,node2` or `http,ingest`. - # @option args [Array] :metric Limits the information returned to the specific metrics. Supports a comma-separated list, such as `http,ingest`. - # @option args [String, Array] :node_id Comma-separated list of node IDs or names used to limit returned information. + # @option args [Enumerable, Enumerable, String] :node_id_or_metric Limits the information returned to a list of node IDs or specific metrics. Supports a comma-separated list, such as `node1,node2` or `http,ingest`. + # @option args [Enumerable] :metric Limits the information returned to the specific metrics. Supports a comma-separated list, such as `http,ingest`. + # @option args [Enumerable, String] :node_id Comma-separated list of node IDs or names used to limit returned information. def info(args = {}) args = Utils.normalize_arguments(args) _node_id_or_metric = args.delete('node_id_or_metric') diff --git a/lib/opensearch/api/actions/nodes/reload_secure_settings.rb b/lib/opensearch/api/actions/nodes/reload_secure_settings.rb index 2ae684e72..5bedf196e 100644 --- a/lib/opensearch/api/actions/nodes/reload_secure_settings.rb +++ b/lib/opensearch/api/actions/nodes/reload_secure_settings.rb @@ -15,7 +15,7 @@ module Nodes module Actions # Reloads secure settings. # - # @option args [String, Array] :node_id The names of particular nodes in the cluster to target. + # @option args [Enumerable, String] :node_id The names of particular nodes in the cluster to target. # @option args [String] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. # @option args [Hash] :body An object containing the password for the OpenSearch keystore. def reload_secure_settings(args = {}) diff --git a/lib/opensearch/api/actions/nodes/stats.rb b/lib/opensearch/api/actions/nodes/stats.rb index 5e41cd271..b8f0df4ae 100644 --- a/lib/opensearch/api/actions/nodes/stats.rb +++ b/lib/opensearch/api/actions/nodes/stats.rb @@ -15,17 +15,17 @@ module Nodes module Actions # Returns statistical information about nodes in the cluster. # - # @option args [String, Array] :node_id Comma-separated list of node IDs or names used to limit returned information. - # @option args [String, Array] :completion_fields Comma-separated list or wildcard expressions of fields to include in field data and suggest statistics. - # @option args [String, Array] :fielddata_fields Comma-separated list or wildcard expressions of fields to include in field data statistics. - # @option args [String, Array] :fields Comma-separated list or wildcard expressions of fields to include in the statistics. - # @option args [Array] :groups Comma-separated list of search groups to include in the search statistics. + # @option args [Enumerable, String] :node_id Comma-separated list of node IDs or names used to limit returned information. + # @option args [Enumerable, String] :completion_fields Comma-separated list or wildcard expressions of fields to include in field data and suggest statistics. + # @option args [Enumerable, String] :fielddata_fields Comma-separated list or wildcard expressions of fields to include in field data statistics. + # @option args [Enumerable, String] :fields Comma-separated list or wildcard expressions of fields to include in the statistics. + # @option args [Enumerable] :groups Comma-separated list of search groups to include in the search statistics. # @option args [Boolean] :include_segment_file_sizes If `true`, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested). # @option args [String] :level Indicates whether statistics are aggregated at the cluster, index, or shard level. # @option args [String] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - # @option args [Array] :types A comma-separated list of document types for the indexing index metric. - # @option args [Array] :metric Limit the information returned to the specified metrics - # @option args [Array] :index_metric Limit the information returned for indexes metric to the specific index metrics. It can be used only if indexes (or all) metric is specified. + # @option args [Enumerable] :types A comma-separated list of document types for the indexing index metric. + # @option args [Enumerable] :metric Limit the information returned to the specified metrics + # @option args [Enumerable] :index_metric Limit the information returned for indexes metric to the specific index metrics. It can be used only if indexes (or all) metric is specified. def stats(args = {}) args = Utils.normalize_arguments(args) _node_id = args.delete('node_id') diff --git a/lib/opensearch/api/actions/nodes/usage.rb b/lib/opensearch/api/actions/nodes/usage.rb index c67970b0b..c7199b683 100644 --- a/lib/opensearch/api/actions/nodes/usage.rb +++ b/lib/opensearch/api/actions/nodes/usage.rb @@ -15,9 +15,9 @@ module Nodes module Actions # Returns low-level information about REST actions usage on nodes. # - # @option args [String, Array] :node_id A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + # @option args [Enumerable, String] :node_id A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes # @option args [String] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - # @option args [Array] :metric Limits the information returned to the specific metrics. A comma-separated list of the following options: `_all`, `rest_actions`. + # @option args [Enumerable] :metric Limits the information returned to the specific metrics. A comma-separated list of the following options: `_all`, `rest_actions`. def usage(args = {}) args = Utils.normalize_arguments(args) _node_id = args.delete('node_id') diff --git a/lib/opensearch/api/actions/notifications/get_configs.rb b/lib/opensearch/api/actions/notifications/get_configs.rb index b87cc9ce0..ada1d85b0 100644 --- a/lib/opensearch/api/actions/notifications/get_configs.rb +++ b/lib/opensearch/api/actions/notifications/get_configs.rb @@ -18,7 +18,7 @@ module Actions # @option args [String] :chime.url # @option args [String] :chime.url.keyword # @option args [String] :config_id Notification configuration ID. - # @option args [Array] :config_id_list Notification configuration IDs. + # @option args [Enumerable] :config_id_list Notification configuration IDs. # @option args [String] :config_type Type of notification configuration. # @option args [Integer] :created_time_ms # @option args [String] :description diff --git a/lib/opensearch/api/actions/rank_eval.rb b/lib/opensearch/api/actions/rank_eval.rb index 82959fe15..3497923e8 100644 --- a/lib/opensearch/api/actions/rank_eval.rb +++ b/lib/opensearch/api/actions/rank_eval.rb @@ -16,10 +16,10 @@ module Actions # Allows to evaluate the quality of ranked search results over a set of typical search queries. # # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. - # @option args [String, String, String, String, String, Array] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. + # @option args [Enumerable, String] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. # @option args [Boolean] :ignore_unavailable If `true`, missing or closed indexes are not included in the response. # @option args [String] :search_type Search operation type - # @option args [String, Array] :index Comma-separated list of data streams, indexes, and index aliases used to limit the request. Wildcard (`*`) expressions are supported. To target all data streams and indexes in a cluster, omit this parameter or use `_all` or `*`. + # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and index aliases used to limit the request. Wildcard (`*`) expressions are supported. To target all data streams and indexes in a cluster, omit this parameter or use `_all` or `*`. # @option args [Hash] :body *Required* The ranking evaluation search definition, including search requests, document ratings and ranking metric definition. def rank_eval(args = {}) args = Utils.normalize_arguments(args) diff --git a/lib/opensearch/api/actions/search.rb b/lib/opensearch/api/actions/search.rb index 2574c5691..761341ca5 100644 --- a/lib/opensearch/api/actions/search.rb +++ b/lib/opensearch/api/actions/search.rb @@ -15,9 +15,9 @@ module Root module Actions # Returns results matching a query. # - # @option args [Boolean, String, Array] :_source Indicates which source fields are returned for matching documents. These fields are returned in the `hits._source` property of the search response. Valid values are: `true` to return the entire document source; `false` to not return the document source; `` to return the source fields that are specified as a comma-separated list (supports wildcard (`*`) patterns). - # @option args [String, Array] :_source_excludes A comma-separated list of source fields to exclude from the response. You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter. If the `_source` parameter is `false`, this parameter is ignored. - # @option args [String, Array] :_source_includes A comma-separated list of source fields to include in the response. If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter. If the `_source` parameter is `false`, this parameter is ignored. + # @option args [Boolean, Enumerable, String] :_source Indicates which source fields are returned for matching documents. These fields are returned in the `hits._source` property of the search response. Valid values are: `true` to return the entire document source; `false` to not return the document source; `` to return the source fields that are specified as a comma-separated list (supports wildcard (`*`) patterns). + # @option args [Enumerable, String] :_source_excludes A comma-separated list of source fields to exclude from the response. You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter. If the `_source` parameter is `false`, this parameter is ignored. + # @option args [Enumerable, String] :_source_includes A comma-separated list of source fields to include in the response. If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter. If the `_source` parameter is `false`, this parameter is ignored. # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. # @option args [Boolean] :allow_partial_search_results If `true`, returns partial results if there are shard request timeouts or shard failures. If `false`, returns an error with no partial results. # @option args [Boolean] :analyze_wildcard If `true`, wildcard and prefix queries are analyzed. This parameter can only be used when the q query string parameter is specified. @@ -27,8 +27,8 @@ module Actions # @option args [Boolean] :ccs_minimize_roundtrips If `true`, network round-trips between the coordinating node and the remote clusters are minimized when executing cross-cluster search (CCS) requests. # @option args [String] :default_operator The default operator for query string query: AND or OR. This parameter can only be used when the `q` query string parameter is specified. # @option args [String] :df Field to use as default where no field prefix is given in the query string. This parameter can only be used when the q query string parameter is specified. - # @option args [String, Array] :docvalue_fields A comma-separated list of fields to return as the docvalue representation for each hit. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. + # @option args [Enumerable, String] :docvalue_fields A comma-separated list of fields to return as the docvalue representation for each hit. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. # @option args [Boolean] :explain If `true`, returns detailed information about score computation as part of a hit. # @option args [Integer] :from Starting document offset. Needs to be non-negative. By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters. To page through more hits, use the `search_after` parameter. # @option args [Boolean] :ignore_throttled If `true`, concrete, expanded or aliased indexes will be ignored when frozen. @@ -42,15 +42,15 @@ module Actions # @option args [String] :q Query in the Lucene query string syntax using query parameter search. Query parameter searches do not support the full OpenSearch Query DSL but are handy for testing. # @option args [Boolean] :request_cache If `true`, the caching of search results is enabled for requests where `size` is `0`. Defaults to index level settings. # @option args [Boolean] :rest_total_hits_as_int Indicates whether `hits.total` should be rendered as an integer or an object in the rest search response. - # @option args [String, Array] :routing Custom value used to route operations to a specific shard. + # @option args [Enumerable, String] :routing Custom value used to route operations to a specific shard. # @option args [String] :scroll Period to retain the search context for scrolling. See Scroll search results. By default, this value cannot exceed `1d` (24 hours). You can change this limit using the `search.max_keep_alive` cluster-level setting. # @option args [String] :search_pipeline Customizable sequence of processing stages applied to search queries. # @option args [String] :search_type How distributed term frequencies are calculated for relevance scoring. # @option args [Boolean] :seq_no_primary_term If `true`, returns sequence number and primary term of the last modification of each hit. # @option args [Integer] :size Defines the number of hits to return. By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters. To page through more hits, use the `search_after` parameter. - # @option args [String, Array] :sort A comma-separated list of : pairs. - # @option args [Array] :stats Specific `tag` of the request for logging and statistical purposes. - # @option args [String, Array] :stored_fields A comma-separated list of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the `_source` parameter defaults to `false`. You can pass `_source: true` to return both source fields and stored fields in the search response. + # @option args [Enumerable, String] :sort A comma-separated list of : pairs. + # @option args [Enumerable] :stats Specific `tag` of the request for logging and statistical purposes. + # @option args [Enumerable, String] :stored_fields A comma-separated list of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the `_source` parameter defaults to `false`. You can pass `_source: true` to return both source fields and stored fields in the search response. # @option args [String] :suggest_field Specifies which field to use for suggestions. # @option args [String] :suggest_mode Specifies the suggest mode. This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified. # @option args [Integer] :suggest_size Number of suggestions to return. This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified. @@ -61,7 +61,7 @@ module Actions # @option args [Boolean, Integer] :track_total_hits Number of hits matching the query to count accurately. If `true`, the exact number of hits is returned at the cost of some performance. If `false`, the response does not include the total number of hits matching the query. # @option args [Boolean] :typed_keys If `true`, aggregation and suggester names are be prefixed by their respective types in the response. # @option args [Boolean] :version If `true`, returns document version as part of a hit. - # @option args [String, Array] :index Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams and indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams and indexes, omit this parameter or use `*` or `_all`. # @option args [Hash] :body The search definition using the Query DSL def search(args = {}) args = Utils.normalize_arguments(args) diff --git a/lib/opensearch/api/actions/search_shards.rb b/lib/opensearch/api/actions/search_shards.rb index 2bf6d8ef4..5d7e316b8 100644 --- a/lib/opensearch/api/actions/search_shards.rb +++ b/lib/opensearch/api/actions/search_shards.rb @@ -16,12 +16,12 @@ module Actions # Returns information about the indexes and shards that a search request would be executed against. # # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. # @option args [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index. # @option args [Boolean] :local If `true`, the request retrieves information from the local node only. # @option args [String] :preference Specifies the node or shard the operation should be performed on. Random by default. - # @option args [String, Array] :routing Custom value used to route operations to a specific shard. - # @option args [String, Array] :index Returns the indexes and shards that a search request would be executed against. + # @option args [Enumerable, String] :routing Custom value used to route operations to a specific shard. + # @option args [Enumerable, String] :index Returns the indexes and shards that a search request would be executed against. # @option args [Hash] :body Defines the parameters that can be used in the `search_shards` endpoint request. See documentation for supported query syntax. def search_shards(args = {}) args = Utils.normalize_arguments(args) diff --git a/lib/opensearch/api/actions/search_template.rb b/lib/opensearch/api/actions/search_template.rb index 9ae827510..3e34822f7 100644 --- a/lib/opensearch/api/actions/search_template.rb +++ b/lib/opensearch/api/actions/search_template.rb @@ -17,18 +17,18 @@ module Actions # # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. # @option args [Boolean] :ccs_minimize_roundtrips If `true`, network round-trips are minimized for cross-cluster search requests. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. # @option args [Boolean] :explain If `true`, the response includes additional details about score computation as part of a hit. # @option args [Boolean] :ignore_throttled If `true`, specified concrete, expanded, or aliased indexes are not included in the response when throttled. # @option args [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index. # @option args [String] :preference Specifies the node or shard the operation should be performed on. Random by default. # @option args [Boolean] :profile If `true`, the query execution is profiled. # @option args [Boolean] :rest_total_hits_as_int If `true`, `hits.total` are rendered as an integer in the response. - # @option args [String, Array] :routing Custom value used to route operations to a specific shard. + # @option args [Enumerable, String] :routing Custom value used to route operations to a specific shard. # @option args [String] :scroll Specifies how long a consistent view of the index should be maintained for scrolled search. # @option args [String] :search_type The type of the search operation. # @option args [Boolean] :typed_keys If `true`, the response prefixes aggregation and suggester names with their respective types. - # @option args [String, Array] :index Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (*). + # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (*). # @option args [Hash] :body *Required* The search definition template and its parameters. def search_template(args = {}) args = Utils.normalize_arguments(args) diff --git a/lib/opensearch/api/actions/security/patch_action_group.rb b/lib/opensearch/api/actions/security/patch_action_group.rb index 79d2bd04f..fa79834b2 100644 --- a/lib/opensearch/api/actions/security/patch_action_group.rb +++ b/lib/opensearch/api/actions/security/patch_action_group.rb @@ -16,7 +16,7 @@ module Actions # Updates individual attributes of an action group. # # @option args [String] :action_group *Required* The name of the action group to update. - # @option args [Array] :body *Required* + # @option args [Enumerable] :body *Required* def patch_action_group(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'action_group' missing" unless args['action_group'] diff --git a/lib/opensearch/api/actions/security/patch_action_groups.rb b/lib/opensearch/api/actions/security/patch_action_groups.rb index 032abf620..5509b65bd 100644 --- a/lib/opensearch/api/actions/security/patch_action_groups.rb +++ b/lib/opensearch/api/actions/security/patch_action_groups.rb @@ -15,7 +15,7 @@ module Security module Actions # Creates, updates, or deletes multiple action groups in a single call. # - # @option args [Array] :body *Required* + # @option args [Enumerable] :body *Required* def patch_action_groups(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'body' missing" unless args['body'] diff --git a/lib/opensearch/api/actions/security/patch_allowlist.rb b/lib/opensearch/api/actions/security/patch_allowlist.rb index 1fe090f91..c62a34f68 100644 --- a/lib/opensearch/api/actions/security/patch_allowlist.rb +++ b/lib/opensearch/api/actions/security/patch_allowlist.rb @@ -15,7 +15,7 @@ module Security module Actions # Updates the current list of allowed API accessible to normal user. # - # @option args [Array] :body *Required* + # @option args [Enumerable] :body *Required* def patch_allowlist(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'body' missing" unless args['body'] diff --git a/lib/opensearch/api/actions/security/patch_audit_configuration.rb b/lib/opensearch/api/actions/security/patch_audit_configuration.rb index 3ebe63cde..4309fc282 100644 --- a/lib/opensearch/api/actions/security/patch_audit_configuration.rb +++ b/lib/opensearch/api/actions/security/patch_audit_configuration.rb @@ -15,7 +15,7 @@ module Security module Actions # A PATCH call is used to update specified fields in the audit configuration. # - # @option args [Array] :body *Required* + # @option args [Enumerable] :body *Required* def patch_audit_configuration(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'body' missing" unless args['body'] diff --git a/lib/opensearch/api/actions/security/patch_configuration.rb b/lib/opensearch/api/actions/security/patch_configuration.rb index 57ae6088e..69b27213e 100644 --- a/lib/opensearch/api/actions/security/patch_configuration.rb +++ b/lib/opensearch/api/actions/security/patch_configuration.rb @@ -15,7 +15,7 @@ module Security module Actions # A `PATCH` call is used to update the existing configuration using the REST API. Only accessible by admins and users with REST API access and only when put or patch is enabled. # - # @option args [Array] :body *Required* + # @option args [Enumerable] :body *Required* def patch_configuration(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'body' missing" unless args['body'] diff --git a/lib/opensearch/api/actions/security/patch_distinguished_names.rb b/lib/opensearch/api/actions/security/patch_distinguished_names.rb index 0f5ec9956..d6eaea9b5 100644 --- a/lib/opensearch/api/actions/security/patch_distinguished_names.rb +++ b/lib/opensearch/api/actions/security/patch_distinguished_names.rb @@ -15,7 +15,7 @@ module Security module Actions # Bulk update of distinguished names. Only accessible to super-admins and with rest-api permissions when enabled. # - # @option args [Array] :body *Required* + # @option args [Enumerable] :body *Required* def patch_distinguished_names(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'body' missing" unless args['body'] diff --git a/lib/opensearch/api/actions/security/patch_role.rb b/lib/opensearch/api/actions/security/patch_role.rb index cf10e6074..668bfbb69 100644 --- a/lib/opensearch/api/actions/security/patch_role.rb +++ b/lib/opensearch/api/actions/security/patch_role.rb @@ -16,7 +16,7 @@ module Actions # Updates individual attributes of a role. # # @option args [String] :role *Required* The name of the role to update. - # @option args [Array] :body *Required* + # @option args [Enumerable] :body *Required* def patch_role(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'role' missing" unless args['role'] diff --git a/lib/opensearch/api/actions/security/patch_role_mapping.rb b/lib/opensearch/api/actions/security/patch_role_mapping.rb index db1e453c5..a29aecb03 100644 --- a/lib/opensearch/api/actions/security/patch_role_mapping.rb +++ b/lib/opensearch/api/actions/security/patch_role_mapping.rb @@ -16,7 +16,7 @@ module Actions # Updates individual attributes of a role mapping. # # @option args [String] :role *Required* The name of the role to update role-mapping for. - # @option args [Array] :body *Required* + # @option args [Enumerable] :body *Required* def patch_role_mapping(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'role' missing" unless args['role'] diff --git a/lib/opensearch/api/actions/security/patch_role_mappings.rb b/lib/opensearch/api/actions/security/patch_role_mappings.rb index a24c35a1c..1d61c6dd3 100644 --- a/lib/opensearch/api/actions/security/patch_role_mappings.rb +++ b/lib/opensearch/api/actions/security/patch_role_mappings.rb @@ -15,7 +15,7 @@ module Security module Actions # Creates or updates multiple role mappings in a single call. # - # @option args [Array] :body *Required* + # @option args [Enumerable] :body *Required* def patch_role_mappings(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'body' missing" unless args['body'] diff --git a/lib/opensearch/api/actions/security/patch_roles.rb b/lib/opensearch/api/actions/security/patch_roles.rb index d3c7a8869..1c248d4d1 100644 --- a/lib/opensearch/api/actions/security/patch_roles.rb +++ b/lib/opensearch/api/actions/security/patch_roles.rb @@ -15,7 +15,7 @@ module Security module Actions # Creates, updates, or deletes multiple roles in a single call. # - # @option args [Array] :body *Required* + # @option args [Enumerable] :body *Required* def patch_roles(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'body' missing" unless args['body'] diff --git a/lib/opensearch/api/actions/security/patch_tenant.rb b/lib/opensearch/api/actions/security/patch_tenant.rb index 459946b2e..04a7b0c59 100644 --- a/lib/opensearch/api/actions/security/patch_tenant.rb +++ b/lib/opensearch/api/actions/security/patch_tenant.rb @@ -16,7 +16,7 @@ module Actions # Add, delete, or modify a single tenant. # # @option args [String] :tenant *Required* The name of the tenant to update. - # @option args [Array] :body *Required* + # @option args [Enumerable] :body *Required* def patch_tenant(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'tenant' missing" unless args['tenant'] diff --git a/lib/opensearch/api/actions/security/patch_tenants.rb b/lib/opensearch/api/actions/security/patch_tenants.rb index fec760d9c..25f2e956f 100644 --- a/lib/opensearch/api/actions/security/patch_tenants.rb +++ b/lib/opensearch/api/actions/security/patch_tenants.rb @@ -15,7 +15,7 @@ module Security module Actions # Add, delete, or modify multiple tenants in a single call. # - # @option args [Array] :body *Required* + # @option args [Enumerable] :body *Required* def patch_tenants(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'body' missing" unless args['body'] diff --git a/lib/opensearch/api/actions/security/patch_user.rb b/lib/opensearch/api/actions/security/patch_user.rb index 357e6627b..8783b984e 100644 --- a/lib/opensearch/api/actions/security/patch_user.rb +++ b/lib/opensearch/api/actions/security/patch_user.rb @@ -16,7 +16,7 @@ module Actions # Updates individual attributes of an internal user. # # @option args [String] :username *Required* The name of the user to update. - # @option args [Array] :body *Required* + # @option args [Enumerable] :body *Required* def patch_user(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'username' missing" unless args['username'] diff --git a/lib/opensearch/api/actions/security/patch_users.rb b/lib/opensearch/api/actions/security/patch_users.rb index 4c1be161f..e9f140dc0 100644 --- a/lib/opensearch/api/actions/security/patch_users.rb +++ b/lib/opensearch/api/actions/security/patch_users.rb @@ -15,7 +15,7 @@ module Security module Actions # Creates, updates, or deletes multiple internal users in a single call. # - # @option args [Array] :body *Required* + # @option args [Enumerable] :body *Required* def patch_users(args = {}) args = Utils.normalize_arguments(args) raise ArgumentError, "Required argument 'body' missing" unless args['body'] diff --git a/lib/opensearch/api/actions/snapshot/delete_repository.rb b/lib/opensearch/api/actions/snapshot/delete_repository.rb index 566242bbf..e259dc82b 100644 --- a/lib/opensearch/api/actions/snapshot/delete_repository.rb +++ b/lib/opensearch/api/actions/snapshot/delete_repository.rb @@ -15,7 +15,7 @@ module Snapshot module Actions # Deletes a repository. # - # @option args [String, Array] :repository *Required* Name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported. + # @option args [Enumerable, String] :repository *Required* Name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported. # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. # @option args [String] :master_timeout DEPRECATED Explicit operation timeout for connection to cluster-manager node # @option args [String] :timeout Explicit operation timeout diff --git a/lib/opensearch/api/actions/snapshot/get.rb b/lib/opensearch/api/actions/snapshot/get.rb index 313c2a404..50ef5b029 100644 --- a/lib/opensearch/api/actions/snapshot/get.rb +++ b/lib/opensearch/api/actions/snapshot/get.rb @@ -16,7 +16,7 @@ module Actions # Returns information about a snapshot. # # @option args [String] :repository *Required* Comma-separated list of snapshot repository names used to limit the request. Wildcard (*) expressions are supported. - # @option args [String, Array] :snapshot *Required* Comma-separated list of snapshot names to retrieve. Also accepts wildcards (`*`). - To get information about all snapshots in a registered repository, use a wildcard (`*`) or `_all`. - To get information about any snapshots that are currently running, use `_current`. + # @option args [Enumerable, String] :snapshot *Required* Comma-separated list of snapshot names to retrieve. Also accepts wildcards (`*`). - To get information about all snapshots in a registered repository, use a wildcard (`*`) or `_all`. - To get information about any snapshots that are currently running, use `_current`. # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. # @option args [Boolean] :ignore_unavailable If `false`, the request returns an error for any snapshots that are unavailable. # @option args [String] :master_timeout DEPRECATED Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. diff --git a/lib/opensearch/api/actions/snapshot/get_repository.rb b/lib/opensearch/api/actions/snapshot/get_repository.rb index bd21946ce..f0d6a58b7 100644 --- a/lib/opensearch/api/actions/snapshot/get_repository.rb +++ b/lib/opensearch/api/actions/snapshot/get_repository.rb @@ -18,7 +18,7 @@ module Actions # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. # @option args [String] :master_timeout DEPRECATED Explicit operation timeout for connection to cluster-manager node - # @option args [String, Array] :repository A comma-separated list of repository names + # @option args [Enumerable, String] :repository A comma-separated list of repository names def get_repository(args = {}) args = Utils.normalize_arguments(args) _repository = args.delete('repository') diff --git a/lib/opensearch/api/actions/snapshot/status.rb b/lib/opensearch/api/actions/snapshot/status.rb index a94b110ef..06b37ae7f 100644 --- a/lib/opensearch/api/actions/snapshot/status.rb +++ b/lib/opensearch/api/actions/snapshot/status.rb @@ -19,7 +19,7 @@ module Actions # @option args [Boolean] :ignore_unavailable Whether to ignore unavailable snapshots, defaults to `false` which means a SnapshotMissingException is thrown # @option args [String] :master_timeout DEPRECATED Explicit operation timeout for connection to cluster-manager node # @option args [String] :repository A repository name - # @option args [String, Array] :snapshot A comma-separated list of snapshot names + # @option args [Enumerable, String] :snapshot A comma-separated list of snapshot names def status(args = {}) args = Utils.normalize_arguments(args) _repository = args.delete('repository') diff --git a/lib/opensearch/api/actions/sql/settings.rb b/lib/opensearch/api/actions/sql/settings.rb index b12709703..62e9cfb93 100644 --- a/lib/opensearch/api/actions/sql/settings.rb +++ b/lib/opensearch/api/actions/sql/settings.rb @@ -16,7 +16,7 @@ module Actions # Adds SQL settings to the standard OpenSearch cluster settings. # # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Hash, Hash] :body + # @option args [Hash] :body def settings(args = {}) args = Utils.normalize_arguments(args) headers = args.delete('headers') || {} diff --git a/lib/opensearch/api/actions/tasks/cancel.rb b/lib/opensearch/api/actions/tasks/cancel.rb index 5c267dd01..e82a377c2 100644 --- a/lib/opensearch/api/actions/tasks/cancel.rb +++ b/lib/opensearch/api/actions/tasks/cancel.rb @@ -15,11 +15,11 @@ module Tasks module Actions # Cancels a task, if it can be cancelled through an API. # - # @option args [String, Array] :actions Comma-separated list or wildcard expression of actions used to limit the request. - # @option args [Array] :nodes Comma-separated list of node IDs or names used to limit the request. + # @option args [Enumerable, String] :actions Comma-separated list or wildcard expression of actions used to limit the request. + # @option args [Enumerable] :nodes Comma-separated list of node IDs or names used to limit the request. # @option args [String] :parent_task_id Parent task ID used to limit the tasks. # @option args [Boolean] :wait_for_completion Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false - # @option args [String, Float] :task_id ID of the task. + # @option args [Float, String] :task_id ID of the task. def cancel(args = {}) args = Utils.normalize_arguments(args) _task_id = args.delete('task_id') diff --git a/lib/opensearch/api/actions/tasks/list.rb b/lib/opensearch/api/actions/tasks/list.rb index 30c515c58..9465bcab7 100644 --- a/lib/opensearch/api/actions/tasks/list.rb +++ b/lib/opensearch/api/actions/tasks/list.rb @@ -15,10 +15,10 @@ module Tasks module Actions # Returns a list of tasks. # - # @option args [String, Array] :actions Comma-separated list or wildcard expression of actions used to limit the request. + # @option args [Enumerable, String] :actions Comma-separated list or wildcard expression of actions used to limit the request. # @option args [Boolean] :detailed If `true`, the response includes detailed information about shard recoveries. # @option args [String] :group_by Key used to group tasks in the response. - # @option args [Array] :nodes Comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. + # @option args [Enumerable] :nodes Comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. # @option args [String] :parent_task_id Parent task ID used to limit returned information. To return all tasks, omit this parameter or use a value of `-1`. # @option args [String] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. # @option args [Boolean] :wait_for_completion If `true`, the request blocks until the operation is complete. diff --git a/lib/opensearch/api/actions/termvectors.rb b/lib/opensearch/api/actions/termvectors.rb index ed8881bb1..7fd4da21b 100644 --- a/lib/opensearch/api/actions/termvectors.rb +++ b/lib/opensearch/api/actions/termvectors.rb @@ -17,13 +17,13 @@ module Actions # # @option args [String] :index *Required* Name of the index that contains the document. # @option args [Boolean] :field_statistics If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies. - # @option args [String, Array] :fields Comma-separated list or wildcard expressions of fields to include in the statistics. Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters. + # @option args [Enumerable, String] :fields Comma-separated list or wildcard expressions of fields to include in the statistics. Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters. # @option args [Boolean] :offsets If `true`, the response includes term offsets. # @option args [Boolean] :payloads If `true`, the response includes term payloads. # @option args [Boolean] :positions If `true`, the response includes term positions. # @option args [String] :preference Specifies the node or shard the operation should be performed on. Random by default. # @option args [Boolean] :realtime If `true`, the request is real-time as opposed to near-real-time. - # @option args [String, Array] :routing Custom value used to route operations to a specific shard. + # @option args [Enumerable, String] :routing Custom value used to route operations to a specific shard. # @option args [Boolean] :term_statistics If `true`, the response includes term frequency and document frequency. # @option args [Integer] :version If `true`, returns the document version as part of a hit. # @option args [String] :version_type Specific version type. diff --git a/lib/opensearch/api/actions/update.rb b/lib/opensearch/api/actions/update.rb index c95ffdd64..dbbd935ef 100644 --- a/lib/opensearch/api/actions/update.rb +++ b/lib/opensearch/api/actions/update.rb @@ -17,16 +17,16 @@ module Actions # # @option args [String] :id *Required* Document ID # @option args [String] :index *Required* The name of the index - # @option args [Boolean, String, Array] :_source Set to `false` to disable source retrieval. You can also specify a comma-separated list of the fields you want to retrieve. - # @option args [String, Array] :_source_excludes Specify the source fields you want to exclude. - # @option args [String, Array] :_source_includes Specify the source fields you want to retrieve. + # @option args [Boolean, Enumerable, String] :_source Set to `false` to disable source retrieval. You can also specify a comma-separated list of the fields you want to retrieve. + # @option args [Enumerable, String] :_source_excludes Specify the source fields you want to exclude. + # @option args [Enumerable, String] :_source_includes Specify the source fields you want to retrieve. # @option args [Integer] :if_primary_term Only perform the operation if the document has this primary term. # @option args [Integer] :if_seq_no Only perform the operation if the document has this sequence number. # @option args [String] :lang The script language. # @option args [Boolean, String] :refresh If 'true', OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. # @option args [Boolean] :require_alias If `true`, the destination must be an index alias. # @option args [Integer] :retry_on_conflict Specify how many times should the operation be retried when a conflict occurs. - # @option args [String, Array] :routing Custom value used to route operations to a specific shard. + # @option args [Enumerable, String] :routing Custom value used to route operations to a specific shard. # @option args [String] :timeout Period to wait for dynamic mapping updates and active shards. This guarantees OpenSearch waits for at least the timeout before failing. The actual wait time could be longer, particularly when multiple waits occur. # @option args [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operations. Set to 'all' or any positive integer up to the total number of shards in the index (number_of_replicas+1). Defaults to 1 meaning the primary shard. # @option args [Hash] :body *Required* The request definition requires either `script` or partial `doc` diff --git a/lib/opensearch/api/actions/update_by_query.rb b/lib/opensearch/api/actions/update_by_query.rb index 2723b253a..4b72a1a42 100644 --- a/lib/opensearch/api/actions/update_by_query.rb +++ b/lib/opensearch/api/actions/update_by_query.rb @@ -16,17 +16,17 @@ module Actions # Performs an update on every document in the index without changing the source, # for example to pick up a mapping change. # - # @option args [String, Array] :index *Required* Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams or indexes, omit this parameter or use `*` or `_all`. - # @option args [Array] :_source Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. - # @option args [Array] :_source_excludes List of fields to exclude from the returned `_source` field. - # @option args [Array] :_source_includes List of fields to extract and return from the `_source` field. + # @option args [Enumerable, String] :index *Required* Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams or indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable] :_source Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. + # @option args [Enumerable] :_source_excludes List of fields to exclude from the returned `_source` field. + # @option args [Enumerable] :_source_includes List of fields to extract and return from the `_source` field. # @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. # @option args [Boolean] :analyze_wildcard If `true`, wildcard and prefix queries are analyzed. # @option args [String] :analyzer Analyzer to use for the query string. # @option args [String] :conflicts What to do if update by query hits version conflicts: `abort` or `proceed`. # @option args [String] :default_operator The default operator for query string query: `AND` or `OR`. # @option args [String] :df Field to use as default where no field prefix is given in the query string. - # @option args [String, String, String, String, String, Array] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. # @option args [Integer] :from Starting offset. # @option args [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index. # @option args [Boolean] :lenient If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. @@ -37,15 +37,15 @@ module Actions # @option args [Boolean, String] :refresh If `true`, OpenSearch refreshes affected shards to make the operation visible to search. # @option args [Boolean] :request_cache If `true`, the request cache is used for this request. # @option args [Float] :requests_per_second The throttle for this request in sub-requests per second. - # @option args [String, Array] :routing Custom value used to route operations to a specific shard. + # @option args [Enumerable, String] :routing Custom value used to route operations to a specific shard. # @option args [String] :scroll Period to retain the search context for scrolling. # @option args [Integer] :scroll_size Size of the scroll request that powers the operation. # @option args [String] :search_timeout Explicit timeout for each search request. # @option args [String] :search_type The type of the search operation. Available options: `query_then_fetch`, `dfs_query_then_fetch`. # @option args [Integer] :size Deprecated, use `max_docs` instead. # @option args [Float, String] :slices The number of slices this task should be divided into. - # @option args [Array] :sort A comma-separated list of : pairs. - # @option args [Array] :stats Specific `tag` of the request for logging and statistical purposes. + # @option args [Enumerable] :sort A comma-separated list of : pairs. + # @option args [Enumerable] :stats Specific `tag` of the request for logging and statistical purposes. # @option args [Integer] :terminate_after Maximum number of documents to collect for each shard. If a query reaches this limit, OpenSearch terminates the query early. OpenSearch collects documents before sorting. Use with caution. OpenSearch applies this parameter to each shard handling the request. When possible, let OpenSearch perform early termination automatically. Avoid specifying this parameter for requests that target data streams with backing indexes across multiple data tiers. # @option args [String] :timeout Period each update request waits for the following operations: dynamic mapping updates, waiting for active shards. # @option args [Boolean] :version If `true`, returns the document version as part of a hit.