antbird 0.13.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1219 +1,1219 @@
1
1
  # Generated REST API methods file - DO NOT EDIT!
2
- # opensearch version: 1.3.6
2
+ # opensearch version: 1.3.20
3
3
 
4
4
  module Antbird
5
5
  module RestApi
6
6
  module RestApiOpensearchV1_3
7
7
  def common_params
8
- @common_params ||= {"documentation"=>{"description"=>"Parameters that are accepted by all API endpoints.", "url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html"}, "params"=>{"pretty"=>{"type"=>"boolean", "description"=>"Pretty format the returned JSON response.", "default"=>false}, "human"=>{"type"=>"boolean", "description"=>"Return human readable values for statistics.", "default"=>true}, "error_trace"=>{"type"=>"boolean", "description"=>"Include the stack trace of returned errors.", "default"=>false}, "source"=>{"type"=>"string", "description"=>"The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests."}, "filter_path"=>{"type"=>"list", "description"=>"A comma-separated list of filters used to reduce the response."}}}
8
+ @common_params ||= {"documentation" => {"description" => "Parameters that are accepted by all API endpoints.", "url" => "https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html"}, "params" => {"pretty" => {"type" => "boolean", "description" => "Pretty format the returned JSON response.", "default" => false}, "human" => {"type" => "boolean", "description" => "Return human readable values for statistics.", "default" => true}, "error_trace" => {"type" => "boolean", "description" => "Include the stack trace of returned errors.", "default" => false}, "source" => {"type" => "string", "description" => "The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests."}, "filter_path" => {"type" => "list", "description" => "A comma-separated list of filters used to reduce the response."}}}
9
9
  end
10
10
 
11
11
  # bulk
12
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html", "description"=>"Allows to perform multiple index/update/delete operations in a single request."}
12
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html", "description" => "Allows to perform multiple index/update/delete operations in a single request."}
13
13
  def bulk(params = {})
14
14
  api_name = 'bulk'
15
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html", "description"=>"Allows to perform multiple index/update/delete operations in a single request."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_bulk", "methods"=>["POST", "PUT"]}, {"path"=>"/{index}/_bulk", "methods"=>["POST", "PUT"], "parts"=>{"index"=>{"type"=>"string", "description"=>"Default index for items which don't provide one"}}}, {"path"=>"/{index}/{type}/_bulk", "methods"=>["POST", "PUT"], "parts"=>{"index"=>{"type"=>"string", "description"=>"Default index for items which don't provide one"}, "type"=>{"type"=>"string", "description"=>"Default document type for items which don't provide one"}}}]}, "params"=>{"wait_for_active_shards"=>{"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "refresh"=>{"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh 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` (the default) then do nothing with refreshes."}, "routing"=>{"type"=>"string", "description"=>"Specific routing value"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "type"=>{"type"=>"string", "description"=>"Default document type for items which don't provide one"}, "_source"=>{"type"=>"list", "description"=>"True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request"}, "_source_excludes"=>{"type"=>"list", "description"=>"Default list of fields to exclude from the returned _source field, can be overridden on each sub-request"}, "_source_includes"=>{"type"=>"list", "description"=>"Default list of fields to extract and return from the _source field, can be overridden on each sub-request"}, "pipeline"=>{"type"=>"string", "description"=>"The pipeline id to preprocess incoming documents with"}, "require_alias"=>{"type"=>"boolean", "description"=>"Sets require_alias for all incoming documents. Defaults to unset (false)"}}, "body"=>{"description"=>"The operation definition and data (action-data pairs), separated by newlines", "required"=>true, "serialize"=>"bulk"}}
15
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html", "description" => "Allows to perform multiple index/update/delete operations in a single request."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_bulk", "methods" => ["POST", "PUT"]}, {"path" => "/{index}/_bulk", "methods" => ["POST", "PUT"], "parts" => {"index" => {"type" => "string", "description" => "Default index for items which don't provide one"}}}, {"path" => "/{index}/{type}/_bulk", "methods" => ["POST", "PUT"], "parts" => {"index" => {"type" => "string", "description" => "Default index for items which don't provide one"}, "type" => {"type" => "string", "description" => "Default document type for items which don't provide one"}}}]}, "params" => {"wait_for_active_shards" => {"type" => "string", "description" => "Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "refresh" => {"type" => "enum", "options" => ["true", "false", "wait_for"], "description" => "If `true` then refresh 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` (the default) then do nothing with refreshes."}, "routing" => {"type" => "string", "description" => "Specific routing value"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "type" => {"type" => "string", "description" => "Default document type for items which don't provide one"}, "_source" => {"type" => "list", "description" => "True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request"}, "_source_excludes" => {"type" => "list", "description" => "Default list of fields to exclude from the returned _source field, can be overridden on each sub-request"}, "_source_includes" => {"type" => "list", "description" => "Default list of fields to extract and return from the _source field, can be overridden on each sub-request"}, "pipeline" => {"type" => "string", "description" => "The pipeline id to preprocess incoming documents with"}, "require_alias" => {"type" => "boolean", "description" => "Sets require_alias for all incoming documents. Defaults to unset (false)"}}, "body" => {"description" => "The operation definition and data (action-data pairs), separated by newlines", "required" => true, "serialize" => "bulk"}}
16
16
  request(api_name, api_spec, params)
17
17
  end
18
18
 
19
19
  # cat.aliases
20
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html", "description"=>"Shows information about currently configured aliases to indices including filter and routing infos."}
20
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html", "description" => "Shows information about currently configured aliases to indices including filter and routing infos."}
21
21
  def cat_aliases(params = {})
22
22
  api_name = 'cat.aliases'
23
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html", "description"=>"Shows information about currently configured aliases to indices including filter and routing infos."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cat/aliases", "methods"=>["GET"]}, {"path"=>"/_cat/aliases/{name}", "methods"=>["GET"], "parts"=>{"name"=>{"type"=>"list", "description"=>"A comma-separated list of alias names to return"}}}]}, "params"=>{"format"=>{"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "h"=>{"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help"=>{"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s"=>{"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"all", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}
23
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html", "description" => "Shows information about currently configured aliases to indices including filter and routing infos."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cat/aliases", "methods" => ["GET"]}, {"path" => "/_cat/aliases/{name}", "methods" => ["GET"], "parts" => {"name" => {"type" => "list", "description" => "A comma-separated list of alias names to return"}}}]}, "params" => {"format" => {"type" => "string", "description" => "a short version of the Accept header, e.g. json, yaml"}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}, "h" => {"type" => "list", "description" => "Comma-separated list of column names to display"}, "help" => {"type" => "boolean", "description" => "Return help information", "default" => false}, "s" => {"type" => "list", "description" => "Comma-separated list of column names or column aliases to sort by"}, "v" => {"type" => "boolean", "description" => "Verbose mode. Display column headers", "default" => false}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "all", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}
24
24
  request(api_name, api_spec, params)
25
25
  end
26
26
 
27
27
  # cat.allocation
28
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html", "description"=>"Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using."}
28
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html", "description" => "Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using."}
29
29
  def cat_allocation(params = {})
30
30
  api_name = 'cat.allocation'
31
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html", "description"=>"Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cat/allocation", "methods"=>["GET"]}, {"path"=>"/_cat/allocation/{node_id}", "methods"=>["GET"], "parts"=>{"node_id"=>{"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information"}}}]}, "params"=>{"format"=>{"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "bytes"=>{"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h"=>{"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help"=>{"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s"=>{"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}}}
31
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html", "description" => "Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cat/allocation", "methods" => ["GET"]}, {"path" => "/_cat/allocation/{node_id}", "methods" => ["GET"], "parts" => {"node_id" => {"type" => "list", "description" => "A comma-separated list of node IDs or names to limit the returned information"}}}]}, "params" => {"format" => {"type" => "string", "description" => "a short version of the Accept header, e.g. json, yaml"}, "bytes" => {"type" => "enum", "description" => "The unit in which to display byte values", "options" => ["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "h" => {"type" => "list", "description" => "Comma-separated list of column names to display"}, "help" => {"type" => "boolean", "description" => "Return help information", "default" => false}, "s" => {"type" => "list", "description" => "Comma-separated list of column names or column aliases to sort by"}, "v" => {"type" => "boolean", "description" => "Verbose mode. Display column headers", "default" => false}}}
32
32
  request(api_name, api_spec, params)
33
33
  end
34
34
 
35
35
  # cat.count
36
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html", "description"=>"Provides quick access to the document count of the entire cluster, or individual indices."}
36
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html", "description" => "Provides quick access to the document count of the entire cluster, or individual indices."}
37
37
  def cat_count(params = {})
38
38
  api_name = 'cat.count'
39
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html", "description"=>"Provides quick access to the document count of the entire cluster, or individual indices."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cat/count", "methods"=>["GET"]}, {"path"=>"/_cat/count/{index}", "methods"=>["GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to limit the returned information"}}}]}, "params"=>{"format"=>{"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "h"=>{"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help"=>{"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s"=>{"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}}}
39
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html", "description" => "Provides quick access to the document count of the entire cluster, or individual indices."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cat/count", "methods" => ["GET"]}, {"path" => "/_cat/count/{index}", "methods" => ["GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names to limit the returned information"}}}]}, "params" => {"format" => {"type" => "string", "description" => "a short version of the Accept header, e.g. json, yaml"}, "h" => {"type" => "list", "description" => "Comma-separated list of column names to display"}, "help" => {"type" => "boolean", "description" => "Return help information", "default" => false}, "s" => {"type" => "list", "description" => "Comma-separated list of column names or column aliases to sort by"}, "v" => {"type" => "boolean", "description" => "Verbose mode. Display column headers", "default" => false}}}
40
40
  request(api_name, api_spec, params)
41
41
  end
42
42
 
43
43
  # cat.fielddata
44
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html", "description"=>"Shows how much heap memory is currently being used by fielddata on every data node in the cluster."}
44
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html", "description" => "Shows how much heap memory is currently being used by fielddata on every data node in the cluster."}
45
45
  def cat_fielddata(params = {})
46
46
  api_name = 'cat.fielddata'
47
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html", "description"=>"Shows how much heap memory is currently being used by fielddata on every data node in the cluster."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cat/fielddata", "methods"=>["GET"]}, {"path"=>"/_cat/fielddata/{fields}", "methods"=>["GET"], "parts"=>{"fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields to return the fielddata size"}}}]}, "params"=>{"format"=>{"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "bytes"=>{"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, "h"=>{"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help"=>{"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s"=>{"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, "fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields to return in the output"}}}
47
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html", "description" => "Shows how much heap memory is currently being used by fielddata on every data node in the cluster."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cat/fielddata", "methods" => ["GET"]}, {"path" => "/_cat/fielddata/{fields}", "methods" => ["GET"], "parts" => {"fields" => {"type" => "list", "description" => "A comma-separated list of fields to return the fielddata size"}}}]}, "params" => {"format" => {"type" => "string", "description" => "a short version of the Accept header, e.g. json, yaml"}, "bytes" => {"type" => "enum", "description" => "The unit in which to display byte values", "options" => ["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, "h" => {"type" => "list", "description" => "Comma-separated list of column names to display"}, "help" => {"type" => "boolean", "description" => "Return help information", "default" => false}, "s" => {"type" => "list", "description" => "Comma-separated list of column names or column aliases to sort by"}, "v" => {"type" => "boolean", "description" => "Verbose mode. Display column headers", "default" => false}, "fields" => {"type" => "list", "description" => "A comma-separated list of fields to return in the output"}}}
48
48
  request(api_name, api_spec, params)
49
49
  end
50
50
 
51
51
  # cat.health
52
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html", "description"=>"Returns a concise representation of the cluster health."}
52
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html", "description" => "Returns a concise representation of the cluster health."}
53
53
  def cat_health(params = {})
54
54
  api_name = 'cat.health'
55
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html", "description"=>"Returns a concise representation of the cluster health."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cat/health", "methods"=>["GET"]}]}, "params"=>{"format"=>{"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "h"=>{"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help"=>{"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s"=>{"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "time"=>{"type"=>"enum", "description"=>"The unit in which to display time values", "options"=>["d", "h", "m", "s", "ms", "micros", "nanos"]}, "ts"=>{"type"=>"boolean", "description"=>"Set to false to disable timestamping", "default"=>true}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}}}
55
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html", "description" => "Returns a concise representation of the cluster health."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cat/health", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string", "description" => "a short version of the Accept header, e.g. json, yaml"}, "h" => {"type" => "list", "description" => "Comma-separated list of column names to display"}, "help" => {"type" => "boolean", "description" => "Return help information", "default" => false}, "s" => {"type" => "list", "description" => "Comma-separated list of column names or column aliases to sort by"}, "time" => {"type" => "enum", "description" => "The unit in which to display time values", "options" => ["d", "h", "m", "s", "ms", "micros", "nanos"]}, "ts" => {"type" => "boolean", "description" => "Set to false to disable timestamping", "default" => true}, "v" => {"type" => "boolean", "description" => "Verbose mode. Display column headers", "default" => false}}}
56
56
  request(api_name, api_spec, params)
57
57
  end
58
58
 
59
59
  # cat.help
60
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html", "description"=>"Returns help for the Cat APIs."}
60
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html", "description" => "Returns help for the Cat APIs."}
61
61
  def cat_help(params = {})
62
62
  api_name = 'cat.help'
63
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html", "description"=>"Returns help for the Cat APIs."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cat", "methods"=>["GET"]}]}, "params"=>{"help"=>{"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s"=>{"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}}}
63
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html", "description" => "Returns help for the Cat APIs."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cat", "methods" => ["GET"]}]}, "params" => {"help" => {"type" => "boolean", "description" => "Return help information", "default" => false}, "s" => {"type" => "list", "description" => "Comma-separated list of column names or column aliases to sort by"}}}
64
64
  request(api_name, api_spec, params)
65
65
  end
66
66
 
67
67
  # cat.indices
68
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html", "description"=>"Returns information about indices: number of primaries and replicas, document counts, disk size, ..."}
68
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html", "description" => "Returns information about indices: number of primaries and replicas, document counts, disk size, ..."}
69
69
  def cat_indices(params = {})
70
70
  api_name = 'cat.indices'
71
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html", "description"=>"Returns information about indices: number of primaries and replicas, document counts, disk size, ..."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cat/indices", "methods"=>["GET"]}, {"path"=>"/_cat/indices/{index}", "methods"=>["GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to limit the returned information"}}}]}, "params"=>{"format"=>{"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "bytes"=>{"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h"=>{"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "health"=>{"type"=>"enum", "options"=>["green", "yellow", "red"], "description"=>"A health status (\"green\", \"yellow\", or \"red\" to filter only indices matching the specified health status"}, "help"=>{"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "pri"=>{"type"=>"boolean", "description"=>"Set to true to return stats only for primary shards", "default"=>false}, "s"=>{"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "time"=>{"type"=>"enum", "description"=>"The unit in which to display time values", "options"=>["d", "h", "m", "s", "ms", "micros", "nanos"]}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, "include_unloaded_segments"=>{"type"=>"boolean", "description"=>"If set to true segment stats will include stats for segments that are not currently loaded into memory", "default"=>false}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"all", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}
71
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html", "description" => "Returns information about indices: number of primaries and replicas, document counts, disk size, ..."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cat/indices", "methods" => ["GET"]}, {"path" => "/_cat/indices/{index}", "methods" => ["GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names to limit the returned information"}}}]}, "params" => {"format" => {"type" => "string", "description" => "a short version of the Accept header, e.g. json, yaml"}, "bytes" => {"type" => "enum", "description" => "The unit in which to display byte values", "options" => ["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "h" => {"type" => "list", "description" => "Comma-separated list of column names to display"}, "health" => {"type" => "enum", "options" => ["green", "yellow", "red"], "description" => "A health status (\"green\", \"yellow\", or \"red\" to filter only indices matching the specified health status"}, "help" => {"type" => "boolean", "description" => "Return help information", "default" => false}, "pri" => {"type" => "boolean", "description" => "Set to true to return stats only for primary shards", "default" => false}, "s" => {"type" => "list", "description" => "Comma-separated list of column names or column aliases to sort by"}, "time" => {"type" => "enum", "description" => "The unit in which to display time values", "options" => ["d", "h", "m", "s", "ms", "micros", "nanos"]}, "v" => {"type" => "boolean", "description" => "Verbose mode. Display column headers", "default" => false}, "include_unloaded_segments" => {"type" => "boolean", "description" => "If set to true segment stats will include stats for segments that are not currently loaded into memory", "default" => false}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "all", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}
72
72
  request(api_name, api_spec, params)
73
73
  end
74
74
 
75
75
  # cat.master
76
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html", "description"=>"Returns information about the master node."}
76
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html", "description" => "Returns information about the master node."}
77
77
  def cat_master(params = {})
78
78
  api_name = 'cat.master'
79
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html", "description"=>"Returns information about the master node."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cat/master", "methods"=>["GET"]}]}, "params"=>{"format"=>{"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h"=>{"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help"=>{"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s"=>{"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}}}
79
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html", "description" => "Returns information about the master node."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cat/master", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string", "description" => "a short version of the Accept header, e.g. json, yaml"}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "h" => {"type" => "list", "description" => "Comma-separated list of column names to display"}, "help" => {"type" => "boolean", "description" => "Return help information", "default" => false}, "s" => {"type" => "list", "description" => "Comma-separated list of column names or column aliases to sort by"}, "v" => {"type" => "boolean", "description" => "Verbose mode. Display column headers", "default" => false}}}
80
80
  request(api_name, api_spec, params)
81
81
  end
82
82
 
83
83
  # cat.nodeattrs
84
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html", "description"=>"Returns information about custom node attributes."}
84
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html", "description" => "Returns information about custom node attributes."}
85
85
  def cat_nodeattrs(params = {})
86
86
  api_name = 'cat.nodeattrs'
87
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html", "description"=>"Returns information about custom node attributes."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cat/nodeattrs", "methods"=>["GET"]}]}, "params"=>{"format"=>{"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h"=>{"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help"=>{"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s"=>{"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}}}
87
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html", "description" => "Returns information about custom node attributes."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cat/nodeattrs", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string", "description" => "a short version of the Accept header, e.g. json, yaml"}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "h" => {"type" => "list", "description" => "Comma-separated list of column names to display"}, "help" => {"type" => "boolean", "description" => "Return help information", "default" => false}, "s" => {"type" => "list", "description" => "Comma-separated list of column names or column aliases to sort by"}, "v" => {"type" => "boolean", "description" => "Verbose mode. Display column headers", "default" => false}}}
88
88
  request(api_name, api_spec, params)
89
89
  end
90
90
 
91
91
  # cat.nodes
92
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html", "description"=>"Returns basic statistics about performance of cluster nodes."}
92
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html", "description" => "Returns basic statistics about performance of cluster nodes."}
93
93
  def cat_nodes(params = {})
94
94
  api_name = 'cat.nodes'
95
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html", "description"=>"Returns basic statistics about performance of cluster nodes."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cat/nodes", "methods"=>["GET"]}]}, "params"=>{"bytes"=>{"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, "format"=>{"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "full_id"=>{"type"=>"boolean", "description"=>"Return the full node ID instead of the shortened version (default: false)"}, "local"=>{"type"=>"boolean", "description"=>"Calculate the selected nodes using the local cluster state rather than the state from master node (default: false)", "deprecated"=>{"version"=>"7.6.0", "description"=>"This parameter does not cause this API to act locally."}}, "master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h"=>{"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help"=>{"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s"=>{"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "time"=>{"type"=>"enum", "description"=>"The unit in which to display time values", "options"=>["d", "h", "m", "s", "ms", "micros", "nanos"]}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}}}
95
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html", "description" => "Returns basic statistics about performance of cluster nodes."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cat/nodes", "methods" => ["GET"]}]}, "params" => {"bytes" => {"type" => "enum", "description" => "The unit in which to display byte values", "options" => ["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, "format" => {"type" => "string", "description" => "a short version of the Accept header, e.g. json, yaml"}, "full_id" => {"type" => "boolean", "description" => "Return the full node ID instead of the shortened version (default: false)"}, "local" => {"type" => "boolean", "description" => "Calculate the selected nodes using the local cluster state rather than the state from master node (default: false)", "deprecated" => {"version" => "7.6.0", "description" => "This parameter does not cause this API to act locally."}}, "master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "h" => {"type" => "list", "description" => "Comma-separated list of column names to display"}, "help" => {"type" => "boolean", "description" => "Return help information", "default" => false}, "s" => {"type" => "list", "description" => "Comma-separated list of column names or column aliases to sort by"}, "time" => {"type" => "enum", "description" => "The unit in which to display time values", "options" => ["d", "h", "m", "s", "ms", "micros", "nanos"]}, "v" => {"type" => "boolean", "description" => "Verbose mode. Display column headers", "default" => false}}}
96
96
  request(api_name, api_spec, params)
97
97
  end
98
98
 
99
99
  # cat.pending_tasks
100
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html", "description"=>"Returns a concise representation of the cluster pending tasks."}
100
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html", "description" => "Returns a concise representation of the cluster pending tasks."}
101
101
  def cat_pending_tasks(params = {})
102
102
  api_name = 'cat.pending_tasks'
103
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html", "description"=>"Returns a concise representation of the cluster pending tasks."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cat/pending_tasks", "methods"=>["GET"]}]}, "params"=>{"format"=>{"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h"=>{"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help"=>{"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s"=>{"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "time"=>{"type"=>"enum", "description"=>"The unit in which to display time values", "options"=>["d", "h", "m", "s", "ms", "micros", "nanos"]}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}}}
103
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html", "description" => "Returns a concise representation of the cluster pending tasks."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cat/pending_tasks", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string", "description" => "a short version of the Accept header, e.g. json, yaml"}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "h" => {"type" => "list", "description" => "Comma-separated list of column names to display"}, "help" => {"type" => "boolean", "description" => "Return help information", "default" => false}, "s" => {"type" => "list", "description" => "Comma-separated list of column names or column aliases to sort by"}, "time" => {"type" => "enum", "description" => "The unit in which to display time values", "options" => ["d", "h", "m", "s", "ms", "micros", "nanos"]}, "v" => {"type" => "boolean", "description" => "Verbose mode. Display column headers", "default" => false}}}
104
104
  request(api_name, api_spec, params)
105
105
  end
106
106
 
107
107
  # cat.plugins
108
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html", "description"=>"Returns information about installed plugins across nodes node."}
108
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html", "description" => "Returns information about installed plugins across nodes node."}
109
109
  def cat_plugins(params = {})
110
110
  api_name = 'cat.plugins'
111
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html", "description"=>"Returns information about installed plugins across nodes node."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cat/plugins", "methods"=>["GET"]}]}, "params"=>{"format"=>{"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h"=>{"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help"=>{"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s"=>{"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}}}
111
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html", "description" => "Returns information about installed plugins across nodes node."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cat/plugins", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string", "description" => "a short version of the Accept header, e.g. json, yaml"}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "h" => {"type" => "list", "description" => "Comma-separated list of column names to display"}, "help" => {"type" => "boolean", "description" => "Return help information", "default" => false}, "s" => {"type" => "list", "description" => "Comma-separated list of column names or column aliases to sort by"}, "v" => {"type" => "boolean", "description" => "Verbose mode. Display column headers", "default" => false}}}
112
112
  request(api_name, api_spec, params)
113
113
  end
114
114
 
115
115
  # cat.recovery
116
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html", "description"=>"Returns information about index shard recoveries, both on-going completed."}
116
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html", "description" => "Returns information about index shard recoveries, both on-going completed."}
117
117
  def cat_recovery(params = {})
118
118
  api_name = 'cat.recovery'
119
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html", "description"=>"Returns information about index shard recoveries, both on-going completed."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cat/recovery", "methods"=>["GET"]}, {"path"=>"/_cat/recovery/{index}", "methods"=>["GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"Comma-separated list or wildcard expression of index names to limit the returned information"}}}]}, "params"=>{"format"=>{"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "active_only"=>{"type"=>"boolean", "description"=>"If `true`, the response only includes ongoing shard recoveries", "default"=>false}, "bytes"=>{"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, "detailed"=>{"type"=>"boolean", "description"=>"If `true`, the response includes detailed information about shard recoveries", "default"=>false}, "h"=>{"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help"=>{"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "index"=>{"type"=>"list", "description"=>"Comma-separated list or wildcard expression of index names to limit the returned information"}, "s"=>{"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "time"=>{"type"=>"enum", "description"=>"The unit in which to display time values", "options"=>["d", "h", "m", "s", "ms", "micros", "nanos"]}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}}}
119
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html", "description" => "Returns information about index shard recoveries, both on-going completed."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cat/recovery", "methods" => ["GET"]}, {"path" => "/_cat/recovery/{index}", "methods" => ["GET"], "parts" => {"index" => {"type" => "list", "description" => "Comma-separated list or wildcard expression of index names to limit the returned information"}}}]}, "params" => {"format" => {"type" => "string", "description" => "a short version of the Accept header, e.g. json, yaml"}, "active_only" => {"type" => "boolean", "description" => "If `true`, the response only includes ongoing shard recoveries", "default" => false}, "bytes" => {"type" => "enum", "description" => "The unit in which to display byte values", "options" => ["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, "detailed" => {"type" => "boolean", "description" => "If `true`, the response includes detailed information about shard recoveries", "default" => false}, "h" => {"type" => "list", "description" => "Comma-separated list of column names to display"}, "help" => {"type" => "boolean", "description" => "Return help information", "default" => false}, "index" => {"type" => "list", "description" => "Comma-separated list or wildcard expression of index names to limit the returned information"}, "s" => {"type" => "list", "description" => "Comma-separated list of column names or column aliases to sort by"}, "time" => {"type" => "enum", "description" => "The unit in which to display time values", "options" => ["d", "h", "m", "s", "ms", "micros", "nanos"]}, "v" => {"type" => "boolean", "description" => "Verbose mode. Display column headers", "default" => false}}}
120
120
  request(api_name, api_spec, params)
121
121
  end
122
122
 
123
123
  # cat.repositories
124
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html", "description"=>"Returns information about snapshot repositories registered in the cluster."}
124
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html", "description" => "Returns information about snapshot repositories registered in the cluster."}
125
125
  def cat_repositories(params = {})
126
126
  api_name = 'cat.repositories'
127
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html", "description"=>"Returns information about snapshot repositories registered in the cluster."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cat/repositories", "methods"=>["GET"]}]}, "params"=>{"format"=>{"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node", "default"=>false}, "master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h"=>{"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help"=>{"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s"=>{"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}}}
127
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html", "description" => "Returns information about snapshot repositories registered in the cluster."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cat/repositories", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string", "description" => "a short version of the Accept header, e.g. json, yaml"}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node", "default" => false}, "master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "h" => {"type" => "list", "description" => "Comma-separated list of column names to display"}, "help" => {"type" => "boolean", "description" => "Return help information", "default" => false}, "s" => {"type" => "list", "description" => "Comma-separated list of column names or column aliases to sort by"}, "v" => {"type" => "boolean", "description" => "Verbose mode. Display column headers", "default" => false}}}
128
128
  request(api_name, api_spec, params)
129
129
  end
130
130
 
131
131
  # cat.segments
132
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html", "description"=>"Provides low-level information about the segments in the shards of an index."}
132
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html", "description" => "Provides low-level information about the segments in the shards of an index."}
133
133
  def cat_segments(params = {})
134
134
  api_name = 'cat.segments'
135
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html", "description"=>"Provides low-level information about the segments in the shards of an index."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cat/segments", "methods"=>["GET"]}, {"path"=>"/_cat/segments/{index}", "methods"=>["GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to limit the returned information"}}}]}, "params"=>{"format"=>{"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "bytes"=>{"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, "h"=>{"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help"=>{"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s"=>{"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}}}
135
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html", "description" => "Provides low-level information about the segments in the shards of an index."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cat/segments", "methods" => ["GET"]}, {"path" => "/_cat/segments/{index}", "methods" => ["GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names to limit the returned information"}}}]}, "params" => {"format" => {"type" => "string", "description" => "a short version of the Accept header, e.g. json, yaml"}, "bytes" => {"type" => "enum", "description" => "The unit in which to display byte values", "options" => ["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, "h" => {"type" => "list", "description" => "Comma-separated list of column names to display"}, "help" => {"type" => "boolean", "description" => "Return help information", "default" => false}, "s" => {"type" => "list", "description" => "Comma-separated list of column names or column aliases to sort by"}, "v" => {"type" => "boolean", "description" => "Verbose mode. Display column headers", "default" => false}}}
136
136
  request(api_name, api_spec, params)
137
137
  end
138
138
 
139
139
  # cat.shards
140
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html", "description"=>"Provides a detailed view of shard allocation on nodes."}
140
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html", "description" => "Provides a detailed view of shard allocation on nodes."}
141
141
  def cat_shards(params = {})
142
142
  api_name = 'cat.shards'
143
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html", "description"=>"Provides a detailed view of shard allocation on nodes."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cat/shards", "methods"=>["GET"]}, {"path"=>"/_cat/shards/{index}", "methods"=>["GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to limit the returned information"}}}]}, "params"=>{"format"=>{"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "bytes"=>{"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h"=>{"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help"=>{"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s"=>{"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "time"=>{"type"=>"enum", "description"=>"The unit in which to display time values", "options"=>["d", "h", "m", "s", "ms", "micros", "nanos"]}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}}}
143
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html", "description" => "Provides a detailed view of shard allocation on nodes."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cat/shards", "methods" => ["GET"]}, {"path" => "/_cat/shards/{index}", "methods" => ["GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names to limit the returned information"}}}]}, "params" => {"format" => {"type" => "string", "description" => "a short version of the Accept header, e.g. json, yaml"}, "bytes" => {"type" => "enum", "description" => "The unit in which to display byte values", "options" => ["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "h" => {"type" => "list", "description" => "Comma-separated list of column names to display"}, "help" => {"type" => "boolean", "description" => "Return help information", "default" => false}, "s" => {"type" => "list", "description" => "Comma-separated list of column names or column aliases to sort by"}, "time" => {"type" => "enum", "description" => "The unit in which to display time values", "options" => ["d", "h", "m", "s", "ms", "micros", "nanos"]}, "v" => {"type" => "boolean", "description" => "Verbose mode. Display column headers", "default" => false}}}
144
144
  request(api_name, api_spec, params)
145
145
  end
146
146
 
147
147
  # cat.snapshots
148
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html", "description"=>"Returns all snapshots in a specific repository."}
148
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html", "description" => "Returns all snapshots in a specific repository."}
149
149
  def cat_snapshots(params = {})
150
150
  api_name = 'cat.snapshots'
151
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html", "description"=>"Returns all snapshots in a specific repository."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cat/snapshots", "methods"=>["GET"]}, {"path"=>"/_cat/snapshots/{repository}", "methods"=>["GET"], "parts"=>{"repository"=>{"type"=>"list", "description"=>"Name of repository from which to fetch the snapshot information"}}}]}, "params"=>{"format"=>{"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Set to true to ignore unavailable snapshots", "default"=>false}, "master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h"=>{"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help"=>{"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s"=>{"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "time"=>{"type"=>"enum", "description"=>"The unit in which to display time values", "options"=>["d", "h", "m", "s", "ms", "micros", "nanos"]}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}}}
151
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html", "description" => "Returns all snapshots in a specific repository."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cat/snapshots", "methods" => ["GET"]}, {"path" => "/_cat/snapshots/{repository}", "methods" => ["GET"], "parts" => {"repository" => {"type" => "list", "description" => "Name of repository from which to fetch the snapshot information"}}}]}, "params" => {"format" => {"type" => "string", "description" => "a short version of the Accept header, e.g. json, yaml"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Set to true to ignore unavailable snapshots", "default" => false}, "master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "h" => {"type" => "list", "description" => "Comma-separated list of column names to display"}, "help" => {"type" => "boolean", "description" => "Return help information", "default" => false}, "s" => {"type" => "list", "description" => "Comma-separated list of column names or column aliases to sort by"}, "time" => {"type" => "enum", "description" => "The unit in which to display time values", "options" => ["d", "h", "m", "s", "ms", "micros", "nanos"]}, "v" => {"type" => "boolean", "description" => "Verbose mode. Display column headers", "default" => false}}}
152
152
  request(api_name, api_spec, params)
153
153
  end
154
154
 
155
155
  # cat.tasks
156
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html", "description"=>"Returns information about the tasks currently executing on one or more nodes in the cluster."}
156
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html", "description" => "Returns information about the tasks currently executing on one or more nodes in the cluster."}
157
157
  def cat_tasks(params = {})
158
158
  api_name = 'cat.tasks'
159
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html", "description"=>"Returns information about the tasks currently executing on one or more nodes in the cluster."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cat/tasks", "methods"=>["GET"]}]}, "params"=>{"format"=>{"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "nodes"=>{"type"=>"list", "description"=>"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"}, "actions"=>{"type"=>"list", "description"=>"A comma-separated list of actions that should be returned. Leave empty to return all."}, "detailed"=>{"type"=>"boolean", "description"=>"Return detailed task information (default: false)"}, "parent_task_id"=>{"type"=>"string", "description"=>"Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all."}, "h"=>{"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help"=>{"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s"=>{"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "time"=>{"type"=>"enum", "description"=>"The unit in which to display time values", "options"=>["d", "h", "m", "s", "ms", "micros", "nanos"]}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}}}
159
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html", "description" => "Returns information about the tasks currently executing on one or more nodes in the cluster."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cat/tasks", "methods" => ["GET"]}]}, "params" => {"format" => {"type" => "string", "description" => "a short version of the Accept header, e.g. json, yaml"}, "nodes" => {"type" => "list", "description" => "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"}, "actions" => {"type" => "list", "description" => "A comma-separated list of actions that should be returned. Leave empty to return all."}, "detailed" => {"type" => "boolean", "description" => "Return detailed task information (default: false)"}, "parent_task_id" => {"type" => "string", "description" => "Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all."}, "h" => {"type" => "list", "description" => "Comma-separated list of column names to display"}, "help" => {"type" => "boolean", "description" => "Return help information", "default" => false}, "s" => {"type" => "list", "description" => "Comma-separated list of column names or column aliases to sort by"}, "time" => {"type" => "enum", "description" => "The unit in which to display time values", "options" => ["d", "h", "m", "s", "ms", "micros", "nanos"]}, "v" => {"type" => "boolean", "description" => "Verbose mode. Display column headers", "default" => false}}}
160
160
  request(api_name, api_spec, params)
161
161
  end
162
162
 
163
163
  # cat.templates
164
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html", "description"=>"Returns information about existing templates."}
164
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html", "description" => "Returns information about existing templates."}
165
165
  def cat_templates(params = {})
166
166
  api_name = 'cat.templates'
167
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html", "description"=>"Returns information about existing templates."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cat/templates", "methods"=>["GET"]}, {"path"=>"/_cat/templates/{name}", "methods"=>["GET"], "parts"=>{"name"=>{"type"=>"string", "description"=>"A pattern that returned template names must match"}}}]}, "params"=>{"format"=>{"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h"=>{"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help"=>{"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s"=>{"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}}}
167
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html", "description" => "Returns information about existing templates."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cat/templates", "methods" => ["GET"]}, {"path" => "/_cat/templates/{name}", "methods" => ["GET"], "parts" => {"name" => {"type" => "string", "description" => "A pattern that returned template names must match"}}}]}, "params" => {"format" => {"type" => "string", "description" => "a short version of the Accept header, e.g. json, yaml"}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "h" => {"type" => "list", "description" => "Comma-separated list of column names to display"}, "help" => {"type" => "boolean", "description" => "Return help information", "default" => false}, "s" => {"type" => "list", "description" => "Comma-separated list of column names or column aliases to sort by"}, "v" => {"type" => "boolean", "description" => "Verbose mode. Display column headers", "default" => false}}}
168
168
  request(api_name, api_spec, params)
169
169
  end
170
170
 
171
171
  # cat.thread_pool
172
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html", "description"=>"Returns cluster-wide thread pool statistics per node.\nBy default the active, queue and rejected statistics are returned for all thread pools."}
172
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html", "description" => "Returns cluster-wide thread pool statistics per node.\nBy default the active, queue and rejected statistics are returned for all thread pools."}
173
173
  def cat_thread_pool(params = {})
174
174
  api_name = 'cat.thread_pool'
175
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html", "description"=>"Returns cluster-wide thread pool statistics per node.\nBy default the active, queue and rejected statistics are returned for all thread pools."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cat/thread_pool", "methods"=>["GET"]}, {"path"=>"/_cat/thread_pool/{thread_pool_patterns}", "methods"=>["GET"], "parts"=>{"thread_pool_patterns"=>{"type"=>"list", "description"=>"A comma-separated list of regular-expressions to filter the thread pools in the output"}}}]}, "params"=>{"format"=>{"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "size"=>{"type"=>"enum", "description"=>"The multiplier in which to display values", "options"=>["", "k", "m", "g", "t", "p"], "deprecated"=>{"version"=>"7.7.0", "description"=>"Setting this value has no effect and will be removed from the specification."}}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h"=>{"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help"=>{"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s"=>{"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}}}
175
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html", "description" => "Returns cluster-wide thread pool statistics per node.\nBy default the active, queue and rejected statistics are returned for all thread pools."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cat/thread_pool", "methods" => ["GET"]}, {"path" => "/_cat/thread_pool/{thread_pool_patterns}", "methods" => ["GET"], "parts" => {"thread_pool_patterns" => {"type" => "list", "description" => "A comma-separated list of regular-expressions to filter the thread pools in the output"}}}]}, "params" => {"format" => {"type" => "string", "description" => "a short version of the Accept header, e.g. json, yaml"}, "size" => {"type" => "enum", "description" => "The multiplier in which to display values", "options" => ["", "k", "m", "g", "t", "p"], "deprecated" => {"version" => "7.7.0", "description" => "Setting this value has no effect and will be removed from the specification."}}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "h" => {"type" => "list", "description" => "Comma-separated list of column names to display"}, "help" => {"type" => "boolean", "description" => "Return help information", "default" => false}, "s" => {"type" => "list", "description" => "Comma-separated list of column names or column aliases to sort by"}, "v" => {"type" => "boolean", "description" => "Verbose mode. Display column headers", "default" => false}}}
176
176
  request(api_name, api_spec, params)
177
177
  end
178
178
 
179
179
  # clear_scroll
180
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html", "description"=>"Explicitly clears the search context for a scroll."}
180
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html", "description" => "Explicitly clears the search context for a scroll."}
181
181
  def clear_scroll(params = {})
182
182
  api_name = 'clear_scroll'
183
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html", "description"=>"Explicitly clears the search context for a scroll."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_search/scroll", "methods"=>["DELETE"]}, {"path"=>"/_search/scroll/{scroll_id}", "methods"=>["DELETE"], "parts"=>{"scroll_id"=>{"type"=>"list", "description"=>"A comma-separated list of scroll IDs to clear", "deprecated"=>true}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"A scroll id can be quite large and should be specified as part of the body"}}]}, "params"=>{}, "body"=>{"description"=>"A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter"}}
183
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html", "description" => "Explicitly clears the search context for a scroll."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_search/scroll", "methods" => ["DELETE"]}, {"path" => "/_search/scroll/{scroll_id}", "methods" => ["DELETE"], "parts" => {"scroll_id" => {"type" => "list", "description" => "A comma-separated list of scroll IDs to clear", "deprecated" => true}}, "deprecated" => {"version" => "7.0.0", "description" => "A scroll id can be quite large and should be specified as part of the body"}}]}, "params" => {}, "body" => {"description" => "A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter"}}
184
184
  request(api_name, api_spec, params)
185
185
  end
186
186
 
187
187
  # cluster.allocation_explain
188
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html", "description"=>"Provides explanations for shard allocations in the cluster."}
188
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html", "description" => "Provides explanations for shard allocations in the cluster."}
189
189
  def cluster_allocation_explain(params = {})
190
190
  api_name = 'cluster.allocation_explain'
191
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html", "description"=>"Provides explanations for shard allocations in the cluster."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cluster/allocation/explain", "methods"=>["GET", "POST"]}]}, "params"=>{"include_yes_decisions"=>{"type"=>"boolean", "description"=>"Return 'YES' decisions in explanation (default: false)"}, "include_disk_info"=>{"type"=>"boolean", "description"=>"Return information about disk usage and shard sizes (default: false)"}}, "body"=>{"description"=>"The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'"}}
191
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html", "description" => "Provides explanations for shard allocations in the cluster."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cluster/allocation/explain", "methods" => ["GET", "POST"]}]}, "params" => {"include_yes_decisions" => {"type" => "boolean", "description" => "Return 'YES' decisions in explanation (default: false)"}, "include_disk_info" => {"type" => "boolean", "description" => "Return information about disk usage and shard sizes (default: false)"}}, "body" => {"description" => "The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'"}}
192
192
  request(api_name, api_spec, params)
193
193
  end
194
194
 
195
195
  # cluster.delete_component_template
196
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html", "description"=>"Deletes a component template"}
196
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html", "description" => "Deletes a component template"}
197
197
  def cluster_delete_component_template(params = {})
198
198
  api_name = 'cluster.delete_component_template'
199
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html", "description"=>"Deletes a component template"}, "stability"=>"experimental", "url"=>{"paths"=>[{"path"=>"/_component_template/{name}", "methods"=>["DELETE"], "parts"=>{"name"=>{"type"=>"string", "description"=>"The name of the template"}}}]}, "params"=>{"timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}}}
199
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html", "description" => "Deletes a component template"}, "stability" => "experimental", "url" => {"paths" => [{"path" => "/_component_template/{name}", "methods" => ["DELETE"], "parts" => {"name" => {"type" => "string", "description" => "The name of the template"}}}]}, "params" => {"timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}}}
200
200
  request(api_name, api_spec, params)
201
201
  end
202
202
 
203
203
  # cluster.delete_voting_config_exclusions
204
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html", "description"=>"Clears cluster voting config exclusions."}
204
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html", "description" => "Clears cluster voting config exclusions."}
205
205
  def cluster_delete_voting_config_exclusions(params = {})
206
206
  api_name = 'cluster.delete_voting_config_exclusions'
207
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html", "description"=>"Clears cluster voting config exclusions."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cluster/voting_config_exclusions", "methods"=>["DELETE"]}]}, "params"=>{"wait_for_removal"=>{"type"=>"boolean", "description"=>"Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list.", "default"=>true}}}
207
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html", "description" => "Clears cluster voting config exclusions."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cluster/voting_config_exclusions", "methods" => ["DELETE"]}]}, "params" => {"wait_for_removal" => {"type" => "boolean", "description" => "Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list.", "default" => true}}}
208
208
  request(api_name, api_spec, params)
209
209
  end
210
210
 
211
211
  # cluster.exists_component_template
212
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html", "description"=>"Returns information about whether a particular component template exist"}
212
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html", "description" => "Returns information about whether a particular component template exist"}
213
213
  def cluster_exists_component_template(params = {})
214
214
  api_name = 'cluster.exists_component_template'
215
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html", "description"=>"Returns information about whether a particular component template exist"}, "stability"=>"experimental", "url"=>{"paths"=>[{"path"=>"/_component_template/{name}", "methods"=>["HEAD"], "parts"=>{"name"=>{"type"=>"string", "description"=>"The name of the template"}}}]}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}}}
215
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html", "description" => "Returns information about whether a particular component template exist"}, "stability" => "experimental", "url" => {"paths" => [{"path" => "/_component_template/{name}", "methods" => ["HEAD"], "parts" => {"name" => {"type" => "string", "description" => "The name of the template"}}}]}, "params" => {"master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}}}
216
216
  request(api_name, api_spec, params)
217
217
  end
218
218
  alias :cluster_exists_component_template? :cluster_exists_component_template
219
219
 
220
220
  # cluster.get_component_template
221
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html", "description"=>"Returns one or more component templates"}
221
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html", "description" => "Returns one or more component templates"}
222
222
  def cluster_get_component_template(params = {})
223
223
  api_name = 'cluster.get_component_template'
224
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html", "description"=>"Returns one or more component templates"}, "stability"=>"experimental", "url"=>{"paths"=>[{"path"=>"/_component_template", "methods"=>["GET"]}, {"path"=>"/_component_template/{name}", "methods"=>["GET"], "parts"=>{"name"=>{"type"=>"list", "description"=>"The comma separated names of the component templates"}}}]}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}}}
224
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html", "description" => "Returns one or more component templates"}, "stability" => "experimental", "url" => {"paths" => [{"path" => "/_component_template", "methods" => ["GET"]}, {"path" => "/_component_template/{name}", "methods" => ["GET"], "parts" => {"name" => {"type" => "list", "description" => "The comma separated names of the component templates"}}}]}, "params" => {"master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}}}
225
225
  request(api_name, api_spec, params)
226
226
  end
227
227
 
228
228
  # cluster.get_settings
229
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html", "description"=>"Returns cluster settings."}
229
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html", "description" => "Returns cluster settings."}
230
230
  def cluster_get_settings(params = {})
231
231
  api_name = 'cluster.get_settings'
232
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html", "description"=>"Returns cluster settings."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cluster/settings", "methods"=>["GET"]}]}, "params"=>{"flat_settings"=>{"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "include_defaults"=>{"type"=>"boolean", "description"=>"Whether to return all default clusters setting.", "default"=>false}}}
232
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html", "description" => "Returns cluster settings."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cluster/settings", "methods" => ["GET"]}]}, "params" => {"flat_settings" => {"type" => "boolean", "description" => "Return settings in flat format (default: false)"}, "master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "include_defaults" => {"type" => "boolean", "description" => "Whether to return all default clusters setting.", "default" => false}}}
233
233
  request(api_name, api_spec, params)
234
234
  end
235
235
 
236
236
  # cluster.health
237
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html", "description"=>"Returns basic information about the health of the cluster."}
237
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html", "description" => "Returns basic information about the health of the cluster."}
238
238
  def cluster_health(params = {})
239
239
  api_name = 'cluster.health'
240
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html", "description"=>"Returns basic information about the health of the cluster."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cluster/health", "methods"=>["GET"]}, {"path"=>"/_cluster/health/{index}", "methods"=>["GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"Limit the information returned to a specific index"}}}]}, "params"=>{"expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"all", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "level"=>{"type"=>"enum", "options"=>["cluster", "indices", "shards"], "default"=>"cluster", "description"=>"Specify the level of detail for returned information"}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Wait until the specified number of shards is active"}, "wait_for_nodes"=>{"type"=>"string", "description"=>"Wait until the specified number of nodes is available"}, "wait_for_events"=>{"type"=>"enum", "options"=>["immediate", "urgent", "high", "normal", "low", "languid"], "description"=>"Wait until all currently queued events with the given priority are processed"}, "wait_for_no_relocating_shards"=>{"type"=>"boolean", "description"=>"Whether to wait until there are no relocating shards in the cluster"}, "wait_for_no_initializing_shards"=>{"type"=>"boolean", "description"=>"Whether to wait until there are no initializing shards in the cluster"}, "wait_for_status"=>{"type"=>"enum", "options"=>["green", "yellow", "red"], "description"=>"Wait until cluster is in a specific state"}}}
240
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html", "description" => "Returns basic information about the health of the cluster."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cluster/health", "methods" => ["GET"]}, {"path" => "/_cluster/health/{index}", "methods" => ["GET"], "parts" => {"index" => {"type" => "list", "description" => "Limit the information returned to a specific index"}}}]}, "params" => {"expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "all", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "level" => {"type" => "enum", "options" => ["cluster", "indices", "shards"], "default" => "cluster", "description" => "Specify the level of detail for returned information"}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "wait_for_active_shards" => {"type" => "string", "description" => "Wait until the specified number of shards is active"}, "wait_for_nodes" => {"type" => "string", "description" => "Wait until the specified number of nodes is available"}, "wait_for_events" => {"type" => "enum", "options" => ["immediate", "urgent", "high", "normal", "low", "languid"], "description" => "Wait until all currently queued events with the given priority are processed"}, "wait_for_no_relocating_shards" => {"type" => "boolean", "description" => "Whether to wait until there are no relocating shards in the cluster"}, "wait_for_no_initializing_shards" => {"type" => "boolean", "description" => "Whether to wait until there are no initializing shards in the cluster"}, "wait_for_status" => {"type" => "enum", "options" => ["green", "yellow", "red"], "description" => "Wait until cluster is in a specific state"}}}
241
241
  request(api_name, api_spec, params)
242
242
  end
243
243
 
244
244
  # cluster.pending_tasks
245
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html", "description"=>"Returns a list of any cluster-level changes (e.g. create index, update mapping,\nallocate or fail shard) which have not yet been executed."}
245
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html", "description" => "Returns a list of any cluster-level changes (e.g. create index, update mapping,\nallocate or fail shard) which have not yet been executed."}
246
246
  def cluster_pending_tasks(params = {})
247
247
  api_name = 'cluster.pending_tasks'
248
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html", "description"=>"Returns a list of any cluster-level changes (e.g. create index, update mapping,\nallocate or fail shard) which have not yet been executed."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cluster/pending_tasks", "methods"=>["GET"]}]}, "params"=>{"local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}}}
248
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html", "description" => "Returns a list of any cluster-level changes (e.g. create index, update mapping,\nallocate or fail shard) which have not yet been executed."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cluster/pending_tasks", "methods" => ["GET"]}]}, "params" => {"local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}}}
249
249
  request(api_name, api_spec, params)
250
250
  end
251
251
 
252
252
  # cluster.post_voting_config_exclusions
253
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html", "description"=>"Updates the cluster voting config exclusions by node ids or node names."}
253
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html", "description" => "Updates the cluster voting config exclusions by node ids or node names."}
254
254
  def cluster_post_voting_config_exclusions(params = {})
255
255
  api_name = 'cluster.post_voting_config_exclusions'
256
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html", "description"=>"Updates the cluster voting config exclusions by node ids or node names."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cluster/voting_config_exclusions", "methods"=>["POST"]}]}, "params"=>{"node_ids"=>{"type"=>"string", "description"=>"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."}, "node_names"=>{"type"=>"string", "description"=>"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."}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout", "default"=>"30s"}}}
256
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html", "description" => "Updates the cluster voting config exclusions by node ids or node names."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cluster/voting_config_exclusions", "methods" => ["POST"]}]}, "params" => {"node_ids" => {"type" => "string", "description" => "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."}, "node_names" => {"type" => "string", "description" => "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."}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout", "default" => "30s"}}}
257
257
  request(api_name, api_spec, params)
258
258
  end
259
259
 
260
260
  # cluster.put_component_template
261
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html", "description"=>"Creates or updates a component template"}
261
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html", "description" => "Creates or updates a component template"}
262
262
  def cluster_put_component_template(params = {})
263
263
  api_name = 'cluster.put_component_template'
264
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html", "description"=>"Creates or updates a component template"}, "stability"=>"experimental", "url"=>{"paths"=>[{"path"=>"/_component_template/{name}", "methods"=>["PUT", "POST"], "parts"=>{"name"=>{"type"=>"string", "description"=>"The name of the template"}}}]}, "params"=>{"create"=>{"type"=>"boolean", "description"=>"Whether the index template should only be added if new or can also replace an existing one", "default"=>false}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}}, "body"=>{"description"=>"The template definition", "required"=>true}}
264
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html", "description" => "Creates or updates a component template"}, "stability" => "experimental", "url" => {"paths" => [{"path" => "/_component_template/{name}", "methods" => ["PUT", "POST"], "parts" => {"name" => {"type" => "string", "description" => "The name of the template"}}}]}, "params" => {"create" => {"type" => "boolean", "description" => "Whether the index template should only be added if new or can also replace an existing one", "default" => false}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}}, "body" => {"description" => "The template definition", "required" => true}}
265
265
  request(api_name, api_spec, params)
266
266
  end
267
267
 
268
268
  # cluster.put_settings
269
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html", "description"=>"Updates the cluster settings."}
269
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html", "description" => "Updates the cluster settings."}
270
270
  def cluster_put_settings(params = {})
271
271
  api_name = 'cluster.put_settings'
272
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html", "description"=>"Updates the cluster settings."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cluster/settings", "methods"=>["PUT"]}]}, "params"=>{"flat_settings"=>{"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}, "body"=>{"description"=>"The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart).", "required"=>true}}
272
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html", "description" => "Updates the cluster settings."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cluster/settings", "methods" => ["PUT"]}]}, "params" => {"flat_settings" => {"type" => "boolean", "description" => "Return settings in flat format (default: false)"}, "master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}}, "body" => {"description" => "The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart).", "required" => true}}
273
273
  request(api_name, api_spec, params)
274
274
  end
275
275
 
276
276
  # cluster.remote_info
277
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html", "description"=>"Returns the information about configured remote clusters."}
277
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html", "description" => "Returns the information about configured remote clusters."}
278
278
  def cluster_remote_info(params = {})
279
279
  api_name = 'cluster.remote_info'
280
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html", "description"=>"Returns the information about configured remote clusters."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_remote/info", "methods"=>["GET"]}]}, "params"=>{}}
280
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html", "description" => "Returns the information about configured remote clusters."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_remote/info", "methods" => ["GET"]}]}, "params" => {}}
281
281
  request(api_name, api_spec, params)
282
282
  end
283
283
 
284
284
  # cluster.reroute
285
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html", "description"=>"Allows to manually change the allocation of individual shards in the cluster."}
285
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html", "description" => "Allows to manually change the allocation of individual shards in the cluster."}
286
286
  def cluster_reroute(params = {})
287
287
  api_name = 'cluster.reroute'
288
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html", "description"=>"Allows to manually change the allocation of individual shards in the cluster."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cluster/reroute", "methods"=>["POST"]}]}, "params"=>{"dry_run"=>{"type"=>"boolean", "description"=>"Simulate the operation only and return the resulting state"}, "explain"=>{"type"=>"boolean", "description"=>"Return an explanation of why the commands can or cannot be executed"}, "retry_failed"=>{"type"=>"boolean", "description"=>"Retries allocation of shards that are blocked due to too many subsequent allocation failures"}, "metric"=>{"type"=>"list", "options"=>["_all", "blocks", "metadata", "nodes", "routing_table", "master_node", "version"], "description"=>"Limit the information returned to the specified metrics. Defaults to all but metadata"}, "master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}, "body"=>{"description"=>"The definition of `commands` to perform (`move`, `cancel`, `allocate`)"}}
288
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html", "description" => "Allows to manually change the allocation of individual shards in the cluster."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cluster/reroute", "methods" => ["POST"]}]}, "params" => {"dry_run" => {"type" => "boolean", "description" => "Simulate the operation only and return the resulting state"}, "explain" => {"type" => "boolean", "description" => "Return an explanation of why the commands can or cannot be executed"}, "retry_failed" => {"type" => "boolean", "description" => "Retries allocation of shards that are blocked due to too many subsequent allocation failures"}, "metric" => {"type" => "list", "options" => ["_all", "blocks", "metadata", "nodes", "routing_table", "master_node", "version"], "description" => "Limit the information returned to the specified metrics. Defaults to all but metadata"}, "master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}}, "body" => {"description" => "The definition of `commands` to perform (`move`, `cancel`, `allocate`)"}}
289
289
  request(api_name, api_spec, params)
290
290
  end
291
291
 
292
292
  # cluster.state
293
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html", "description"=>"Returns a comprehensive information about the state of the cluster."}
293
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html", "description" => "Returns a comprehensive information about the state of the cluster."}
294
294
  def cluster_state(params = {})
295
295
  api_name = 'cluster.state'
296
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html", "description"=>"Returns a comprehensive information about the state of the cluster."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cluster/state", "methods"=>["GET"]}, {"path"=>"/_cluster/state/{metric}", "methods"=>["GET"], "parts"=>{"metric"=>{"type"=>"list", "options"=>["_all", "blocks", "metadata", "nodes", "routing_table", "routing_nodes", "master_node", "version"], "description"=>"Limit the information returned to the specified metrics"}}}, {"path"=>"/_cluster/state/{metric}/{index}", "methods"=>["GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, "metric"=>{"type"=>"list", "options"=>["_all", "blocks", "metadata", "nodes", "routing_table", "routing_nodes", "master_node", "version"], "description"=>"Limit the information returned to the specified metrics"}}}]}, "params"=>{"local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "flat_settings"=>{"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "wait_for_metadata_version"=>{"type"=>"number", "description"=>"Wait for the metadata version to be equal or greater than the specified metadata version"}, "wait_for_timeout"=>{"type"=>"time", "description"=>"The maximum time to wait for wait_for_metadata_version before timing out"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}
296
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html", "description" => "Returns a comprehensive information about the state of the cluster."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cluster/state", "methods" => ["GET"]}, {"path" => "/_cluster/state/{metric}", "methods" => ["GET"], "parts" => {"metric" => {"type" => "list", "options" => ["_all", "blocks", "metadata", "nodes", "routing_table", "routing_nodes", "master_node", "version"], "description" => "Limit the information returned to the specified metrics"}}}, {"path" => "/_cluster/state/{metric}/{index}", "methods" => ["GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, "metric" => {"type" => "list", "options" => ["_all", "blocks", "metadata", "nodes", "routing_table", "routing_nodes", "master_node", "version"], "description" => "Limit the information returned to the specified metrics"}}}]}, "params" => {"local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}, "flat_settings" => {"type" => "boolean", "description" => "Return settings in flat format (default: false)"}, "wait_for_metadata_version" => {"type" => "number", "description" => "Wait for the metadata version to be equal or greater than the specified metadata version"}, "wait_for_timeout" => {"type" => "time", "description" => "The maximum time to wait for wait_for_metadata_version before timing out"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}
297
297
  request(api_name, api_spec, params)
298
298
  end
299
299
 
300
300
  # cluster.stats
301
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html", "description"=>"Returns high-level overview of cluster statistics."}
301
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html", "description" => "Returns high-level overview of cluster statistics."}
302
302
  def cluster_stats(params = {})
303
303
  api_name = 'cluster.stats'
304
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html", "description"=>"Returns high-level overview of cluster statistics."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cluster/stats", "methods"=>["GET"]}, {"path"=>"/_cluster/stats/nodes/{node_id}", "methods"=>["GET"], "parts"=>{"node_id"=>{"type"=>"list", "description"=>"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"}}}]}, "params"=>{"flat_settings"=>{"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}}
304
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html", "description" => "Returns high-level overview of cluster statistics."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cluster/stats", "methods" => ["GET"]}, {"path" => "/_cluster/stats/nodes/{node_id}", "methods" => ["GET"], "parts" => {"node_id" => {"type" => "list", "description" => "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"}}}]}, "params" => {"flat_settings" => {"type" => "boolean", "description" => "Return settings in flat format (default: false)"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}}}
305
305
  request(api_name, api_spec, params)
306
306
  end
307
307
 
308
308
  # count
309
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html", "description"=>"Returns number of documents matching a query."}
309
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html", "description" => "Returns number of documents matching a query."}
310
310
  def count(params = {})
311
311
  api_name = 'count'
312
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html", "description"=>"Returns number of documents matching a query."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_count", "methods"=>["POST", "GET"]}, {"path"=>"/{index}/_count", "methods"=>["POST", "GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of indices to restrict the results"}}}, {"path"=>"/{index}/{type}/_count", "methods"=>["POST", "GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of indices to restrict the results"}, "type"=>{"type"=>"list", "description"=>"A comma-separated list of types to restrict the results"}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "ignore_throttled"=>{"type"=>"boolean", "description"=>"Whether specified concrete, expanded or aliased indices should be ignored when throttled"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "min_score"=>{"type"=>"number", "description"=>"Include only documents with a specific `_score` value in the result"}, "preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "routing"=>{"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, "q"=>{"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, "analyzer"=>{"type"=>"string", "description"=>"The analyzer to use for the query string"}, "analyze_wildcard"=>{"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, "default_operator"=>{"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, "df"=>{"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, "lenient"=>{"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "terminate_after"=>{"type"=>"number", "description"=>"The maximum count for each shard, upon reaching which the query execution will terminate early"}}, "body"=>{"description"=>"A query to restrict the results specified with the Query DSL (optional)"}}
312
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html", "description" => "Returns number of documents matching a query."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_count", "methods" => ["POST", "GET"]}, {"path" => "/{index}/_count", "methods" => ["POST", "GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of indices to restrict the results"}}}, {"path" => "/{index}/{type}/_count", "methods" => ["POST", "GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of indices to restrict the results"}, "type" => {"type" => "list", "description" => "A comma-separated list of types to restrict the results"}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "ignore_throttled" => {"type" => "boolean", "description" => "Whether specified concrete, expanded or aliased indices should be ignored when throttled"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "min_score" => {"type" => "number", "description" => "Include only documents with a specific `_score` value in the result"}, "preference" => {"type" => "string", "description" => "Specify the node or shard the operation should be performed on (default: random)"}, "routing" => {"type" => "list", "description" => "A comma-separated list of specific routing values"}, "q" => {"type" => "string", "description" => "Query in the Lucene query string syntax"}, "analyzer" => {"type" => "string", "description" => "The analyzer to use for the query string"}, "analyze_wildcard" => {"type" => "boolean", "description" => "Specify whether wildcard and prefix queries should be analyzed (default: false)"}, "default_operator" => {"type" => "enum", "options" => ["AND", "OR"], "default" => "OR", "description" => "The default operator for query string query (AND or OR)"}, "df" => {"type" => "string", "description" => "The field to use as default where no field prefix is given in the query string"}, "lenient" => {"type" => "boolean", "description" => "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "terminate_after" => {"type" => "number", "description" => "The maximum count for each shard, upon reaching which the query execution will terminate early"}}, "body" => {"description" => "A query to restrict the results specified with the Query DSL (optional)"}}
313
313
  request(api_name, api_spec, params)
314
314
  end
315
315
 
316
316
  # create
317
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html", "description"=>"Creates a new document in the index.\n\nReturns a 409 response when a document with a same ID already exists in the index."}
317
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html", "description" => "Creates a new document in the index.\n\nReturns a 409 response when a document with a same ID already exists in the index."}
318
318
  def create(params = {})
319
319
  api_name = 'create'
320
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html", "description"=>"Creates a new document in the index.\n\nReturns a 409 response when a document with a same ID already exists in the index."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}/_create/{id}", "methods"=>["PUT", "POST"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Document ID"}, "index"=>{"type"=>"string", "description"=>"The name of the index"}}}, {"path"=>"/{index}/{type}/{id}/_create", "methods"=>["PUT", "POST"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Document ID"}, "index"=>{"type"=>"string", "description"=>"The name of the index"}, "type"=>{"type"=>"string", "description"=>"The type of the document", "deprecated"=>true}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"wait_for_active_shards"=>{"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "refresh"=>{"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh 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` (the default) then do nothing with refreshes."}, "routing"=>{"type"=>"string", "description"=>"Specific routing value"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "version"=>{"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type"=>{"type"=>"enum", "options"=>["internal", "external", "external_gte"], "description"=>"Specific version type"}, "pipeline"=>{"type"=>"string", "description"=>"The pipeline id to preprocess incoming documents with"}}, "body"=>{"description"=>"The document", "required"=>true}}
320
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html", "description" => "Creates a new document in the index.\n\nReturns a 409 response when a document with a same ID already exists in the index."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}/_create/{id}", "methods" => ["PUT", "POST"], "parts" => {"id" => {"type" => "string", "description" => "Document ID"}, "index" => {"type" => "string", "description" => "The name of the index"}}}, {"path" => "/{index}/{type}/{id}/_create", "methods" => ["PUT", "POST"], "parts" => {"id" => {"type" => "string", "description" => "Document ID"}, "index" => {"type" => "string", "description" => "The name of the index"}, "type" => {"type" => "string", "description" => "The type of the document", "deprecated" => true}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"wait_for_active_shards" => {"type" => "string", "description" => "Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "refresh" => {"type" => "enum", "options" => ["true", "false", "wait_for"], "description" => "If `true` then refresh 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` (the default) then do nothing with refreshes."}, "routing" => {"type" => "string", "description" => "Specific routing value"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "version" => {"type" => "number", "description" => "Explicit version number for concurrency control"}, "version_type" => {"type" => "enum", "options" => ["internal", "external", "external_gte"], "description" => "Specific version type"}, "pipeline" => {"type" => "string", "description" => "The pipeline id to preprocess incoming documents with"}}, "body" => {"description" => "The document", "required" => true}}
321
321
  request(api_name, api_spec, params)
322
322
  end
323
323
 
324
324
  # dangling_indices.delete_dangling_index
325
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html", "description"=>"Deletes the specified dangling index"}
325
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html", "description" => "Deletes the specified dangling index"}
326
326
  def dangling_indices_delete_dangling_index(params = {})
327
327
  api_name = 'dangling_indices.delete_dangling_index'
328
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html", "description"=>"Deletes the specified dangling index"}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_dangling/{index_uuid}", "methods"=>["DELETE"], "parts"=>{"index_uuid"=>{"type"=>"string", "description"=>"The UUID of the dangling index"}}}]}, "params"=>{"accept_data_loss"=>{"type"=>"boolean", "description"=>"Must be set to true in order to delete the dangling index"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}}}
328
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html", "description" => "Deletes the specified dangling index"}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_dangling/{index_uuid}", "methods" => ["DELETE"], "parts" => {"index_uuid" => {"type" => "string", "description" => "The UUID of the dangling index"}}}]}, "params" => {"accept_data_loss" => {"type" => "boolean", "description" => "Must be set to true in order to delete the dangling index"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}}}
329
329
  request(api_name, api_spec, params)
330
330
  end
331
331
 
332
332
  # dangling_indices.import_dangling_index
333
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html", "description"=>"Imports the specified dangling index"}
333
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html", "description" => "Imports the specified dangling index"}
334
334
  def dangling_indices_import_dangling_index(params = {})
335
335
  api_name = 'dangling_indices.import_dangling_index'
336
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html", "description"=>"Imports the specified dangling index"}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_dangling/{index_uuid}", "methods"=>["POST"], "parts"=>{"index_uuid"=>{"type"=>"string", "description"=>"The UUID of the dangling index"}}}]}, "params"=>{"accept_data_loss"=>{"type"=>"boolean", "description"=>"Must be set to true in order to import the dangling index"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}}}
336
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html", "description" => "Imports the specified dangling index"}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_dangling/{index_uuid}", "methods" => ["POST"], "parts" => {"index_uuid" => {"type" => "string", "description" => "The UUID of the dangling index"}}}]}, "params" => {"accept_data_loss" => {"type" => "boolean", "description" => "Must be set to true in order to import the dangling index"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}}}
337
337
  request(api_name, api_spec, params)
338
338
  end
339
339
 
340
340
  # dangling_indices.list_dangling_indices
341
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html", "description"=>"Returns all dangling indices."}
341
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html", "description" => "Returns all dangling indices."}
342
342
  def dangling_indices_list_dangling_indices(params = {})
343
343
  api_name = 'dangling_indices.list_dangling_indices'
344
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html", "description"=>"Returns all dangling indices."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_dangling", "methods"=>["GET"]}]}, "params"=>{}}
344
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html", "description" => "Returns all dangling indices."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_dangling", "methods" => ["GET"]}]}, "params" => {}}
345
345
  request(api_name, api_spec, params)
346
346
  end
347
347
 
348
348
  # delete
349
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html", "description"=>"Removes a document from the index."}
349
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html", "description" => "Removes a document from the index."}
350
350
  def delete(params = {})
351
351
  api_name = 'delete'
352
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html", "description"=>"Removes a document from the index."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}/_doc/{id}", "methods"=>["DELETE"], "parts"=>{"id"=>{"type"=>"string", "description"=>"The document ID"}, "index"=>{"type"=>"string", "description"=>"The name of the index"}}}, {"path"=>"/{index}/{type}/{id}", "methods"=>["DELETE"], "parts"=>{"id"=>{"type"=>"string", "description"=>"The document ID"}, "index"=>{"type"=>"string", "description"=>"The name of the index"}, "type"=>{"type"=>"string", "description"=>"The type of the document", "deprecated"=>true}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"wait_for_active_shards"=>{"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "refresh"=>{"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh 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` (the default) then do nothing with refreshes."}, "routing"=>{"type"=>"string", "description"=>"Specific routing value"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "if_seq_no"=>{"type"=>"number", "description"=>"only perform the delete operation if the last operation that has changed the document has the specified sequence number"}, "if_primary_term"=>{"type"=>"number", "description"=>"only perform the delete operation if the last operation that has changed the document has the specified primary term"}, "version"=>{"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type"=>{"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}}}
352
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html", "description" => "Removes a document from the index."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}/_doc/{id}", "methods" => ["DELETE"], "parts" => {"id" => {"type" => "string", "description" => "The document ID"}, "index" => {"type" => "string", "description" => "The name of the index"}}}, {"path" => "/{index}/{type}/{id}", "methods" => ["DELETE"], "parts" => {"id" => {"type" => "string", "description" => "The document ID"}, "index" => {"type" => "string", "description" => "The name of the index"}, "type" => {"type" => "string", "description" => "The type of the document", "deprecated" => true}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"wait_for_active_shards" => {"type" => "string", "description" => "Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "refresh" => {"type" => "enum", "options" => ["true", "false", "wait_for"], "description" => "If `true` then refresh 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` (the default) then do nothing with refreshes."}, "routing" => {"type" => "string", "description" => "Specific routing value"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "if_seq_no" => {"type" => "number", "description" => "only perform the delete operation if the last operation that has changed the document has the specified sequence number"}, "if_primary_term" => {"type" => "number", "description" => "only perform the delete operation if the last operation that has changed the document has the specified primary term"}, "version" => {"type" => "number", "description" => "Explicit version number for concurrency control"}, "version_type" => {"type" => "enum", "options" => ["internal", "external", "external_gte", "force"], "description" => "Specific version type"}}}
353
353
  request(api_name, api_spec, params)
354
354
  end
355
355
 
356
356
  # delete_by_query
357
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html", "description"=>"Deletes documents matching the provided query."}
357
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html", "description" => "Deletes documents matching the provided query."}
358
358
  def delete_by_query(params = {})
359
359
  api_name = 'delete_by_query'
360
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html", "description"=>"Deletes documents matching the provided query."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}/_delete_by_query", "methods"=>["POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}}}, {"path"=>"/{index}/{type}/_delete_by_query", "methods"=>["POST"], "parts"=>{"index"=>{"required"=>true, "type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, "type"=>{"type"=>"list", "description"=>"A comma-separated list of document types to search; leave empty to perform the operation on all types"}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"analyzer"=>{"type"=>"string", "description"=>"The analyzer to use for the query string"}, "analyze_wildcard"=>{"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, "default_operator"=>{"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, "df"=>{"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, "from"=>{"type"=>"number", "description"=>"Starting offset (default: 0)"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "conflicts"=>{"type"=>"enum", "options"=>["abort", "proceed"], "default"=>"abort", "description"=>"What to do when the delete by query hits version conflicts?"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "lenient"=>{"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "q"=>{"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, "routing"=>{"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, "scroll"=>{"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, "search_type"=>{"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}, "search_timeout"=>{"type"=>"time", "description"=>"Explicit timeout for each search request. Defaults to no timeout."}, "size"=>{"type"=>"number", "description"=>"Deprecated, please use `max_docs` instead"}, "max_docs"=>{"type"=>"number", "description"=>"Maximum number of documents to process (default: all documents)"}, "sort"=>{"type"=>"list", "description"=>"A comma-separated list of <field>:<direction> pairs"}, "_source"=>{"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_excludes"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_includes"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "terminate_after"=>{"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, "stats"=>{"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, "version"=>{"type"=>"boolean", "description"=>"Specify whether to return document version as part of a hit"}, "request_cache"=>{"type"=>"boolean", "description"=>"Specify if request cache should be used for this request or not, defaults to index level setting"}, "refresh"=>{"type"=>"boolean", "description"=>"Should the effected indexes be refreshed?"}, "timeout"=>{"type"=>"time", "default"=>"1m", "description"=>"Time each individual bulk request should wait for shards that are unavailable."}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "scroll_size"=>{"type"=>"number", "default"=>100, "description"=>"Size on the scroll request powering the delete by query"}, "wait_for_completion"=>{"type"=>"boolean", "default"=>true, "description"=>"Should the request should block until the delete by query is complete."}, "requests_per_second"=>{"type"=>"number", "default"=>0, "description"=>"The throttle for this request in sub-requests per second. -1 means no throttle."}, "slices"=>{"type"=>"number|string", "default"=>1, "description"=>"The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`."}}, "body"=>{"description"=>"The search definition using the Query DSL", "required"=>true}}
360
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html", "description" => "Deletes documents matching the provided query."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}/_delete_by_query", "methods" => ["POST"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}}}, {"path" => "/{index}/{type}/_delete_by_query", "methods" => ["POST"], "parts" => {"index" => {"required" => true, "type" => "list", "description" => "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, "type" => {"type" => "list", "description" => "A comma-separated list of document types to search; leave empty to perform the operation on all types"}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"analyzer" => {"type" => "string", "description" => "The analyzer to use for the query string"}, "analyze_wildcard" => {"type" => "boolean", "description" => "Specify whether wildcard and prefix queries should be analyzed (default: false)"}, "default_operator" => {"type" => "enum", "options" => ["AND", "OR"], "default" => "OR", "description" => "The default operator for query string query (AND or OR)"}, "df" => {"type" => "string", "description" => "The field to use as default where no field prefix is given in the query string"}, "from" => {"type" => "number", "description" => "Starting offset (default: 0)"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "conflicts" => {"type" => "enum", "options" => ["abort", "proceed"], "default" => "abort", "description" => "What to do when the delete by query hits version conflicts?"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "lenient" => {"type" => "boolean", "description" => "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "preference" => {"type" => "string", "description" => "Specify the node or shard the operation should be performed on (default: random)"}, "q" => {"type" => "string", "description" => "Query in the Lucene query string syntax"}, "routing" => {"type" => "list", "description" => "A comma-separated list of specific routing values"}, "scroll" => {"type" => "time", "description" => "Specify how long a consistent view of the index should be maintained for scrolled search"}, "search_type" => {"type" => "enum", "options" => ["query_then_fetch", "dfs_query_then_fetch"], "description" => "Search operation type"}, "search_timeout" => {"type" => "time", "description" => "Explicit timeout for each search request. Defaults to no timeout."}, "size" => {"type" => "number", "description" => "Deprecated, please use `max_docs` instead"}, "max_docs" => {"type" => "number", "description" => "Maximum number of documents to process (default: all documents)"}, "sort" => {"type" => "list", "description" => "A comma-separated list of <field>:<direction> pairs"}, "_source" => {"type" => "list", "description" => "True or false to return the _source field or not, or a list of fields to return"}, "_source_excludes" => {"type" => "list", "description" => "A list of fields to exclude from the returned _source field"}, "_source_includes" => {"type" => "list", "description" => "A list of fields to extract and return from the _source field"}, "terminate_after" => {"type" => "number", "description" => "The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, "stats" => {"type" => "list", "description" => "Specific 'tag' of the request for logging and statistical purposes"}, "version" => {"type" => "boolean", "description" => "Specify whether to return document version as part of a hit"}, "request_cache" => {"type" => "boolean", "description" => "Specify if request cache should be used for this request or not, defaults to index level setting"}, "refresh" => {"type" => "boolean", "description" => "Should the effected indexes be refreshed?"}, "timeout" => {"type" => "time", "default" => "1m", "description" => "Time each individual bulk request should wait for shards that are unavailable."}, "wait_for_active_shards" => {"type" => "string", "description" => "Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "scroll_size" => {"type" => "number", "default" => 100, "description" => "Size on the scroll request powering the delete by query"}, "wait_for_completion" => {"type" => "boolean", "default" => true, "description" => "Should the request should block until the delete by query is complete."}, "requests_per_second" => {"type" => "number", "default" => 0, "description" => "The throttle for this request in sub-requests per second. -1 means no throttle."}, "slices" => {"type" => "number|string", "default" => 1, "description" => "The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`."}}, "body" => {"description" => "The search definition using the Query DSL", "required" => true}}
361
361
  request(api_name, api_spec, params)
362
362
  end
363
363
 
364
364
  # delete_by_query_rethrottle
365
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html", "description"=>"Changes the number of requests per second for a particular Delete By Query operation."}
365
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html", "description" => "Changes the number of requests per second for a particular Delete By Query operation."}
366
366
  def delete_by_query_rethrottle(params = {})
367
367
  api_name = 'delete_by_query_rethrottle'
368
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html", "description"=>"Changes the number of requests per second for a particular Delete By Query operation."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_delete_by_query/{task_id}/_rethrottle", "methods"=>["POST"], "parts"=>{"task_id"=>{"type"=>"string", "description"=>"The task id to rethrottle"}}}]}, "params"=>{"requests_per_second"=>{"type"=>"number", "required"=>true, "description"=>"The throttle to set on this request in floating sub-requests per second. -1 means set no throttle."}}}
368
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html", "description" => "Changes the number of requests per second for a particular Delete By Query operation."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_delete_by_query/{task_id}/_rethrottle", "methods" => ["POST"], "parts" => {"task_id" => {"type" => "string", "description" => "The task id to rethrottle"}}}]}, "params" => {"requests_per_second" => {"type" => "number", "required" => true, "description" => "The throttle to set on this request in floating sub-requests per second. -1 means set no throttle."}}}
369
369
  request(api_name, api_spec, params)
370
370
  end
371
371
 
372
372
  # delete_script
373
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html", "description"=>"Deletes a script."}
373
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html", "description" => "Deletes a script."}
374
374
  def delete_script(params = {})
375
375
  api_name = 'delete_script'
376
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html", "description"=>"Deletes a script."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_scripts/{id}", "methods"=>["DELETE"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Script ID"}}}]}, "params"=>{"timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}}}
376
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html", "description" => "Deletes a script."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_scripts/{id}", "methods" => ["DELETE"], "parts" => {"id" => {"type" => "string", "description" => "Script ID"}}}]}, "params" => {"timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}}}
377
377
  request(api_name, api_spec, params)
378
378
  end
379
379
 
380
380
  # exists
381
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html", "description"=>"Returns information about whether a document exists in an index."}
381
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html", "description" => "Returns information about whether a document exists in an index."}
382
382
  def exists(params = {})
383
383
  api_name = 'exists'
384
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html", "description"=>"Returns information about whether a document exists in an index."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}/_doc/{id}", "methods"=>["HEAD"], "parts"=>{"id"=>{"type"=>"string", "description"=>"The document ID"}, "index"=>{"type"=>"string", "description"=>"The name of the index"}}}, {"path"=>"/{index}/{type}/{id}", "methods"=>["HEAD"], "parts"=>{"id"=>{"type"=>"string", "description"=>"The document ID"}, "index"=>{"type"=>"string", "description"=>"The name of the index"}, "type"=>{"type"=>"string", "description"=>"The type of the document (use `_all` to fetch the first document matching the ID across all types)", "deprecated"=>true}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"stored_fields"=>{"type"=>"list", "description"=>"A comma-separated list of stored fields to return in the response"}, "preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "realtime"=>{"type"=>"boolean", "description"=>"Specify whether to perform the operation in realtime or search mode"}, "refresh"=>{"type"=>"boolean", "description"=>"Refresh the shard containing the document before performing the operation"}, "routing"=>{"type"=>"string", "description"=>"Specific routing value"}, "_source"=>{"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_excludes"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_includes"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "version"=>{"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type"=>{"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}}}
384
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html", "description" => "Returns information about whether a document exists in an index."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}/_doc/{id}", "methods" => ["HEAD"], "parts" => {"id" => {"type" => "string", "description" => "The document ID"}, "index" => {"type" => "string", "description" => "The name of the index"}}}, {"path" => "/{index}/{type}/{id}", "methods" => ["HEAD"], "parts" => {"id" => {"type" => "string", "description" => "The document ID"}, "index" => {"type" => "string", "description" => "The name of the index"}, "type" => {"type" => "string", "description" => "The type of the document (use `_all` to fetch the first document matching the ID across all types)", "deprecated" => true}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"stored_fields" => {"type" => "list", "description" => "A comma-separated list of stored fields to return in the response"}, "preference" => {"type" => "string", "description" => "Specify the node or shard the operation should be performed on (default: random)"}, "realtime" => {"type" => "boolean", "description" => "Specify whether to perform the operation in realtime or search mode"}, "refresh" => {"type" => "boolean", "description" => "Refresh the shard containing the document before performing the operation"}, "routing" => {"type" => "string", "description" => "Specific routing value"}, "_source" => {"type" => "list", "description" => "True or false to return the _source field or not, or a list of fields to return"}, "_source_excludes" => {"type" => "list", "description" => "A list of fields to exclude from the returned _source field"}, "_source_includes" => {"type" => "list", "description" => "A list of fields to extract and return from the _source field"}, "version" => {"type" => "number", "description" => "Explicit version number for concurrency control"}, "version_type" => {"type" => "enum", "options" => ["internal", "external", "external_gte", "force"], "description" => "Specific version type"}}}
385
385
  request(api_name, api_spec, params)
386
386
  end
387
387
  alias :exists? :exists
388
388
 
389
389
  # exists_source
390
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html", "description"=>"Returns information about whether a document source exists in an index."}
390
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html", "description" => "Returns information about whether a document source exists in an index."}
391
391
  def exists_source(params = {})
392
392
  api_name = 'exists_source'
393
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html", "description"=>"Returns information about whether a document source exists in an index."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}/_source/{id}", "methods"=>["HEAD"], "parts"=>{"id"=>{"type"=>"string", "description"=>"The document ID"}, "index"=>{"type"=>"string", "description"=>"The name of the index"}}}, {"path"=>"/{index}/{type}/{id}/_source", "methods"=>["HEAD"], "parts"=>{"id"=>{"type"=>"string", "description"=>"The document ID"}, "index"=>{"type"=>"string", "description"=>"The name of the index"}, "type"=>{"type"=>"string", "description"=>"The type of the document; deprecated and optional starting with 7.0", "deprecated"=>true}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "realtime"=>{"type"=>"boolean", "description"=>"Specify whether to perform the operation in realtime or search mode"}, "refresh"=>{"type"=>"boolean", "description"=>"Refresh the shard containing the document before performing the operation"}, "routing"=>{"type"=>"string", "description"=>"Specific routing value"}, "_source"=>{"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_excludes"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_includes"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "version"=>{"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type"=>{"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}}}
393
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html", "description" => "Returns information about whether a document source exists in an index."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}/_source/{id}", "methods" => ["HEAD"], "parts" => {"id" => {"type" => "string", "description" => "The document ID"}, "index" => {"type" => "string", "description" => "The name of the index"}}}, {"path" => "/{index}/{type}/{id}/_source", "methods" => ["HEAD"], "parts" => {"id" => {"type" => "string", "description" => "The document ID"}, "index" => {"type" => "string", "description" => "The name of the index"}, "type" => {"type" => "string", "description" => "The type of the document; deprecated and optional starting with 7.0", "deprecated" => true}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"preference" => {"type" => "string", "description" => "Specify the node or shard the operation should be performed on (default: random)"}, "realtime" => {"type" => "boolean", "description" => "Specify whether to perform the operation in realtime or search mode"}, "refresh" => {"type" => "boolean", "description" => "Refresh the shard containing the document before performing the operation"}, "routing" => {"type" => "string", "description" => "Specific routing value"}, "_source" => {"type" => "list", "description" => "True or false to return the _source field or not, or a list of fields to return"}, "_source_excludes" => {"type" => "list", "description" => "A list of fields to exclude from the returned _source field"}, "_source_includes" => {"type" => "list", "description" => "A list of fields to extract and return from the _source field"}, "version" => {"type" => "number", "description" => "Explicit version number for concurrency control"}, "version_type" => {"type" => "enum", "options" => ["internal", "external", "external_gte", "force"], "description" => "Specific version type"}}}
394
394
  request(api_name, api_spec, params)
395
395
  end
396
396
  alias :exists_source? :exists_source
397
397
 
398
398
  # explain
399
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html", "description"=>"Returns information about why a specific matches (or doesn't match) a query."}
399
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html", "description" => "Returns information about why a specific matches (or doesn't match) a query."}
400
400
  def explain(params = {})
401
401
  api_name = 'explain'
402
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html", "description"=>"Returns information about why a specific matches (or doesn't match) a query."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}/_explain/{id}", "methods"=>["GET", "POST"], "parts"=>{"id"=>{"type"=>"string", "description"=>"The document ID"}, "index"=>{"type"=>"string", "description"=>"The name of the index"}}}, {"path"=>"/{index}/{type}/{id}/_explain", "methods"=>["GET", "POST"], "parts"=>{"id"=>{"type"=>"string", "description"=>"The document ID"}, "index"=>{"type"=>"string", "description"=>"The name of the index"}, "type"=>{"type"=>"string", "description"=>"The type of the document", "deprecated"=>true}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"analyze_wildcard"=>{"type"=>"boolean", "description"=>"Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)"}, "analyzer"=>{"type"=>"string", "description"=>"The analyzer for the query string query"}, "default_operator"=>{"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, "df"=>{"type"=>"string", "description"=>"The default field for query string query (default: _all)"}, "stored_fields"=>{"type"=>"list", "description"=>"A comma-separated list of stored fields to return in the response"}, "lenient"=>{"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "q"=>{"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, "routing"=>{"type"=>"string", "description"=>"Specific routing value"}, "_source"=>{"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_excludes"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_includes"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}}, "body"=>{"description"=>"The query definition using the Query DSL"}}
402
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html", "description" => "Returns information about why a specific matches (or doesn't match) a query."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}/_explain/{id}", "methods" => ["GET", "POST"], "parts" => {"id" => {"type" => "string", "description" => "The document ID"}, "index" => {"type" => "string", "description" => "The name of the index"}}}, {"path" => "/{index}/{type}/{id}/_explain", "methods" => ["GET", "POST"], "parts" => {"id" => {"type" => "string", "description" => "The document ID"}, "index" => {"type" => "string", "description" => "The name of the index"}, "type" => {"type" => "string", "description" => "The type of the document", "deprecated" => true}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"analyze_wildcard" => {"type" => "boolean", "description" => "Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)"}, "analyzer" => {"type" => "string", "description" => "The analyzer for the query string query"}, "default_operator" => {"type" => "enum", "options" => ["AND", "OR"], "default" => "OR", "description" => "The default operator for query string query (AND or OR)"}, "df" => {"type" => "string", "description" => "The default field for query string query (default: _all)"}, "stored_fields" => {"type" => "list", "description" => "A comma-separated list of stored fields to return in the response"}, "lenient" => {"type" => "boolean", "description" => "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "preference" => {"type" => "string", "description" => "Specify the node or shard the operation should be performed on (default: random)"}, "q" => {"type" => "string", "description" => "Query in the Lucene query string syntax"}, "routing" => {"type" => "string", "description" => "Specific routing value"}, "_source" => {"type" => "list", "description" => "True or false to return the _source field or not, or a list of fields to return"}, "_source_excludes" => {"type" => "list", "description" => "A list of fields to exclude from the returned _source field"}, "_source_includes" => {"type" => "list", "description" => "A list of fields to extract and return from the _source field"}}, "body" => {"description" => "The query definition using the Query DSL"}}
403
403
  request(api_name, api_spec, params)
404
404
  end
405
405
 
406
406
  # field_caps
407
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html", "description"=>"Returns the information about the capabilities of fields among multiple indices."}
407
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html", "description" => "Returns the information about the capabilities of fields among multiple indices."}
408
408
  def field_caps(params = {})
409
409
  api_name = 'field_caps'
410
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html", "description"=>"Returns the information about the capabilities of fields among multiple indices."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_field_caps", "methods"=>["GET", "POST"]}, {"path"=>"/{index}/_field_caps", "methods"=>["GET", "POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}}]}, "params"=>{"fields"=>{"type"=>"list", "description"=>"A comma-separated list of field names"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "include_unmapped"=>{"type"=>"boolean", "default"=>false, "description"=>"Indicates whether unmapped fields should be included in the response."}}, "body"=>{"description"=>"An index filter specified with the Query DSL"}}
410
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html", "description" => "Returns the information about the capabilities of fields among multiple indices."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_field_caps", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_field_caps", "methods" => ["GET", "POST"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}}]}, "params" => {"fields" => {"type" => "list", "description" => "A comma-separated list of field names"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "include_unmapped" => {"type" => "boolean", "default" => false, "description" => "Indicates whether unmapped fields should be included in the response."}}, "body" => {"description" => "An index filter specified with the Query DSL"}}
411
411
  request(api_name, api_spec, params)
412
412
  end
413
413
 
414
414
  # get
415
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html", "description"=>"Returns a document."}
415
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html", "description" => "Returns a document."}
416
416
  def get(params = {})
417
417
  api_name = 'get'
418
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html", "description"=>"Returns a document."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}/_doc/{id}", "methods"=>["GET"], "parts"=>{"id"=>{"type"=>"string", "description"=>"The document ID"}, "index"=>{"type"=>"string", "description"=>"The name of the index"}}}, {"path"=>"/{index}/{type}/{id}", "methods"=>["GET"], "parts"=>{"id"=>{"type"=>"string", "description"=>"The document ID"}, "index"=>{"type"=>"string", "description"=>"The name of the index"}, "type"=>{"type"=>"string", "description"=>"The type of the document (use `_all` to fetch the first document matching the ID across all types)", "deprecated"=>true}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"stored_fields"=>{"type"=>"list", "description"=>"A comma-separated list of stored fields to return in the response"}, "preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "realtime"=>{"type"=>"boolean", "description"=>"Specify whether to perform the operation in realtime or search mode"}, "refresh"=>{"type"=>"boolean", "description"=>"Refresh the shard containing the document before performing the operation"}, "routing"=>{"type"=>"string", "description"=>"Specific routing value"}, "_source"=>{"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_excludes"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_includes"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "version"=>{"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type"=>{"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}}}
418
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html", "description" => "Returns a document."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}/_doc/{id}", "methods" => ["GET"], "parts" => {"id" => {"type" => "string", "description" => "The document ID"}, "index" => {"type" => "string", "description" => "The name of the index"}}}, {"path" => "/{index}/{type}/{id}", "methods" => ["GET"], "parts" => {"id" => {"type" => "string", "description" => "The document ID"}, "index" => {"type" => "string", "description" => "The name of the index"}, "type" => {"type" => "string", "description" => "The type of the document (use `_all` to fetch the first document matching the ID across all types)", "deprecated" => true}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"stored_fields" => {"type" => "list", "description" => "A comma-separated list of stored fields to return in the response"}, "preference" => {"type" => "string", "description" => "Specify the node or shard the operation should be performed on (default: random)"}, "realtime" => {"type" => "boolean", "description" => "Specify whether to perform the operation in realtime or search mode"}, "refresh" => {"type" => "boolean", "description" => "Refresh the shard containing the document before performing the operation"}, "routing" => {"type" => "string", "description" => "Specific routing value"}, "_source" => {"type" => "list", "description" => "True or false to return the _source field or not, or a list of fields to return"}, "_source_excludes" => {"type" => "list", "description" => "A list of fields to exclude from the returned _source field"}, "_source_includes" => {"type" => "list", "description" => "A list of fields to extract and return from the _source field"}, "version" => {"type" => "number", "description" => "Explicit version number for concurrency control"}, "version_type" => {"type" => "enum", "options" => ["internal", "external", "external_gte", "force"], "description" => "Specific version type"}}}
419
419
  request(api_name, api_spec, params)
420
420
  end
421
421
 
422
422
  # get_script
423
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html", "description"=>"Returns a script."}
423
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html", "description" => "Returns a script."}
424
424
  def get_script(params = {})
425
425
  api_name = 'get_script'
426
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html", "description"=>"Returns a script."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_scripts/{id}", "methods"=>["GET"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Script ID"}}}]}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}}}
426
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html", "description" => "Returns a script."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_scripts/{id}", "methods" => ["GET"], "parts" => {"id" => {"type" => "string", "description" => "Script ID"}}}]}, "params" => {"master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}}}
427
427
  request(api_name, api_spec, params)
428
428
  end
429
429
 
430
430
  # get_script_context
431
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-contexts.html", "description"=>"Returns all script contexts."}
431
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-contexts.html", "description" => "Returns all script contexts."}
432
432
  def get_script_context(params = {})
433
433
  api_name = 'get_script_context'
434
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-contexts.html", "description"=>"Returns all script contexts."}, "stability"=>"experimental", "url"=>{"paths"=>[{"path"=>"/_script_context", "methods"=>["GET"]}]}, "params"=>{}}
434
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-contexts.html", "description" => "Returns all script contexts."}, "stability" => "experimental", "url" => {"paths" => [{"path" => "/_script_context", "methods" => ["GET"]}]}, "params" => {}}
435
435
  request(api_name, api_spec, params)
436
436
  end
437
437
 
438
438
  # get_script_languages
439
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html", "description"=>"Returns available script types, languages and contexts"}
439
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html", "description" => "Returns available script types, languages and contexts"}
440
440
  def get_script_languages(params = {})
441
441
  api_name = 'get_script_languages'
442
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html", "description"=>"Returns available script types, languages and contexts"}, "stability"=>"experimental", "url"=>{"paths"=>[{"path"=>"/_script_language", "methods"=>["GET"]}]}, "params"=>{}}
442
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html", "description" => "Returns available script types, languages and contexts"}, "stability" => "experimental", "url" => {"paths" => [{"path" => "/_script_language", "methods" => ["GET"]}]}, "params" => {}}
443
443
  request(api_name, api_spec, params)
444
444
  end
445
445
 
446
446
  # get_source
447
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html", "description"=>"Returns the source of a document."}
447
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html", "description" => "Returns the source of a document."}
448
448
  def get_source(params = {})
449
449
  api_name = 'get_source'
450
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html", "description"=>"Returns the source of a document."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}/_source/{id}", "methods"=>["GET"], "parts"=>{"id"=>{"type"=>"string", "description"=>"The document ID"}, "index"=>{"type"=>"string", "description"=>"The name of the index"}}}, {"path"=>"/{index}/{type}/{id}/_source", "methods"=>["GET"], "parts"=>{"id"=>{"type"=>"string", "description"=>"The document ID"}, "index"=>{"type"=>"string", "description"=>"The name of the index"}, "type"=>{"type"=>"string", "description"=>"The type of the document; deprecated and optional starting with 7.0", "deprecated"=>true}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "realtime"=>{"type"=>"boolean", "description"=>"Specify whether to perform the operation in realtime or search mode"}, "refresh"=>{"type"=>"boolean", "description"=>"Refresh the shard containing the document before performing the operation"}, "routing"=>{"type"=>"string", "description"=>"Specific routing value"}, "_source"=>{"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_excludes"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_includes"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "version"=>{"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type"=>{"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}}}
450
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html", "description" => "Returns the source of a document."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}/_source/{id}", "methods" => ["GET"], "parts" => {"id" => {"type" => "string", "description" => "The document ID"}, "index" => {"type" => "string", "description" => "The name of the index"}}}, {"path" => "/{index}/{type}/{id}/_source", "methods" => ["GET"], "parts" => {"id" => {"type" => "string", "description" => "The document ID"}, "index" => {"type" => "string", "description" => "The name of the index"}, "type" => {"type" => "string", "description" => "The type of the document; deprecated and optional starting with 7.0", "deprecated" => true}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"preference" => {"type" => "string", "description" => "Specify the node or shard the operation should be performed on (default: random)"}, "realtime" => {"type" => "boolean", "description" => "Specify whether to perform the operation in realtime or search mode"}, "refresh" => {"type" => "boolean", "description" => "Refresh the shard containing the document before performing the operation"}, "routing" => {"type" => "string", "description" => "Specific routing value"}, "_source" => {"type" => "list", "description" => "True or false to return the _source field or not, or a list of fields to return"}, "_source_excludes" => {"type" => "list", "description" => "A list of fields to exclude from the returned _source field"}, "_source_includes" => {"type" => "list", "description" => "A list of fields to extract and return from the _source field"}, "version" => {"type" => "number", "description" => "Explicit version number for concurrency control"}, "version_type" => {"type" => "enum", "options" => ["internal", "external", "external_gte", "force"], "description" => "Specific version type"}}}
451
451
  request(api_name, api_spec, params)
452
452
  end
453
453
 
454
454
  # index
455
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html", "description"=>"Creates or updates a document in an index."}
455
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html", "description" => "Creates or updates a document in an index."}
456
456
  def index(params = {})
457
457
  api_name = 'index'
458
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html", "description"=>"Creates or updates a document in an index."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}/_doc/{id}", "methods"=>["PUT", "POST"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Document ID"}, "index"=>{"type"=>"string", "description"=>"The name of the index"}}}, {"path"=>"/{index}/_doc", "methods"=>["POST"], "parts"=>{"index"=>{"type"=>"string", "description"=>"The name of the index"}}}, {"path"=>"/{index}/{type}", "methods"=>["POST"], "parts"=>{"index"=>{"type"=>"string", "description"=>"The name of the index"}, "type"=>{"type"=>"string", "description"=>"The type of the document", "deprecated"=>true}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}, {"path"=>"/{index}/{type}/{id}", "methods"=>["PUT", "POST"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Document ID"}, "index"=>{"type"=>"string", "description"=>"The name of the index"}, "type"=>{"type"=>"string", "description"=>"The type of the document", "deprecated"=>true}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"wait_for_active_shards"=>{"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "op_type"=>{"type"=>"enum", "options"=>["index", "create"], "description"=>"Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create`for requests without an explicit document ID"}, "refresh"=>{"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh 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` (the default) then do nothing with refreshes."}, "routing"=>{"type"=>"string", "description"=>"Specific routing value"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "version"=>{"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type"=>{"type"=>"enum", "options"=>["internal", "external", "external_gte"], "description"=>"Specific version type"}, "if_seq_no"=>{"type"=>"number", "description"=>"only perform the index operation if the last operation that has changed the document has the specified sequence number"}, "if_primary_term"=>{"type"=>"number", "description"=>"only perform the index operation if the last operation that has changed the document has the specified primary term"}, "pipeline"=>{"type"=>"string", "description"=>"The pipeline id to preprocess incoming documents with"}, "require_alias"=>{"type"=>"boolean", "description"=>"When true, requires destination to be an alias. Default is false"}}, "body"=>{"description"=>"The document", "required"=>true}}
458
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html", "description" => "Creates or updates a document in an index."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}/_doc/{id}", "methods" => ["PUT", "POST"], "parts" => {"id" => {"type" => "string", "description" => "Document ID"}, "index" => {"type" => "string", "description" => "The name of the index"}}}, {"path" => "/{index}/_doc", "methods" => ["POST"], "parts" => {"index" => {"type" => "string", "description" => "The name of the index"}}}, {"path" => "/{index}/{type}", "methods" => ["POST"], "parts" => {"index" => {"type" => "string", "description" => "The name of the index"}, "type" => {"type" => "string", "description" => "The type of the document", "deprecated" => true}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}, {"path" => "/{index}/{type}/{id}", "methods" => ["PUT", "POST"], "parts" => {"id" => {"type" => "string", "description" => "Document ID"}, "index" => {"type" => "string", "description" => "The name of the index"}, "type" => {"type" => "string", "description" => "The type of the document", "deprecated" => true}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"wait_for_active_shards" => {"type" => "string", "description" => "Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "op_type" => {"type" => "enum", "options" => ["index", "create"], "description" => "Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create`for requests without an explicit document ID"}, "refresh" => {"type" => "enum", "options" => ["true", "false", "wait_for"], "description" => "If `true` then refresh 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` (the default) then do nothing with refreshes."}, "routing" => {"type" => "string", "description" => "Specific routing value"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "version" => {"type" => "number", "description" => "Explicit version number for concurrency control"}, "version_type" => {"type" => "enum", "options" => ["internal", "external", "external_gte"], "description" => "Specific version type"}, "if_seq_no" => {"type" => "number", "description" => "only perform the index operation if the last operation that has changed the document has the specified sequence number"}, "if_primary_term" => {"type" => "number", "description" => "only perform the index operation if the last operation that has changed the document has the specified primary term"}, "pipeline" => {"type" => "string", "description" => "The pipeline id to preprocess incoming documents with"}, "require_alias" => {"type" => "boolean", "description" => "When true, requires destination to be an alias. Default is false"}}, "body" => {"description" => "The document", "required" => true}}
459
459
  request(api_name, api_spec, params)
460
460
  end
461
461
 
462
462
  # indices.add_block
463
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/index-modules-blocks.html", "description"=>"Adds a block to an index."}
463
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/index-modules-blocks.html", "description" => "Adds a block to an index."}
464
464
  def indices_add_block(params = {})
465
465
  api_name = 'indices.add_block'
466
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/index-modules-blocks.html", "description"=>"Adds a block to an index."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}/_block/{block}", "methods"=>["PUT"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma separated list of indices to add a block to"}, "block"=>{"type"=>"string", "description"=>"The block to add (one of read, write, read_only or metadata)"}}}]}, "params"=>{"timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}
466
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/index-modules-blocks.html", "description" => "Adds a block to an index."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}/_block/{block}", "methods" => ["PUT"], "parts" => {"index" => {"type" => "list", "description" => "A comma separated list of indices to add a block to"}, "block" => {"type" => "string", "description" => "The block to add (one of read, write, read_only or metadata)"}}}]}, "params" => {"timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}
467
467
  request(api_name, api_spec, params)
468
468
  end
469
469
 
470
470
  # indices.analyze
471
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html", "description"=>"Performs the analysis process on a text and return the tokens breakdown of the text."}
471
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html", "description" => "Performs the analysis process on a text and return the tokens breakdown of the text."}
472
472
  def indices_analyze(params = {})
473
473
  api_name = 'indices.analyze'
474
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html", "description"=>"Performs the analysis process on a text and return the tokens breakdown of the text."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_analyze", "methods"=>["GET", "POST"]}, {"path"=>"/{index}/_analyze", "methods"=>["GET", "POST"], "parts"=>{"index"=>{"type"=>"string", "description"=>"The name of the index to scope the operation"}}}]}, "params"=>{"index"=>{"type"=>"string", "description"=>"The name of the index to scope the operation"}}, "body"=>{"description"=>"Define analyzer/tokenizer parameters and the text on which the analysis should be performed"}}
474
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html", "description" => "Performs the analysis process on a text and return the tokens breakdown of the text."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_analyze", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_analyze", "methods" => ["GET", "POST"], "parts" => {"index" => {"type" => "string", "description" => "The name of the index to scope the operation"}}}]}, "params" => {"index" => {"type" => "string", "description" => "The name of the index to scope the operation"}}, "body" => {"description" => "Define analyzer/tokenizer parameters and the text on which the analysis should be performed"}}
475
475
  request(api_name, api_spec, params)
476
476
  end
477
477
 
478
478
  # indices.clear_cache
479
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html", "description"=>"Clears all or specific caches for one or more indices."}
479
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html", "description" => "Clears all or specific caches for one or more indices."}
480
480
  def indices_clear_cache(params = {})
481
481
  api_name = 'indices.clear_cache'
482
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html", "description"=>"Clears all or specific caches for one or more indices."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_cache/clear", "methods"=>["POST"]}, {"path"=>"/{index}/_cache/clear", "methods"=>["POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index name to limit the operation"}}}]}, "params"=>{"fielddata"=>{"type"=>"boolean", "description"=>"Clear field data"}, "fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields to clear when using the `fielddata` parameter (default: all)"}, "query"=>{"type"=>"boolean", "description"=>"Clear query caches"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "index"=>{"type"=>"list", "description"=>"A comma-separated list of index name to limit the operation"}, "request"=>{"type"=>"boolean", "description"=>"Clear request cache"}}}
482
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html", "description" => "Clears all or specific caches for one or more indices."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_cache/clear", "methods" => ["POST"]}, {"path" => "/{index}/_cache/clear", "methods" => ["POST"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index name to limit the operation"}}}]}, "params" => {"fielddata" => {"type" => "boolean", "description" => "Clear field data"}, "fields" => {"type" => "list", "description" => "A comma-separated list of fields to clear when using the `fielddata` parameter (default: all)"}, "query" => {"type" => "boolean", "description" => "Clear query caches"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "index" => {"type" => "list", "description" => "A comma-separated list of index name to limit the operation"}, "request" => {"type" => "boolean", "description" => "Clear request cache"}}}
483
483
  request(api_name, api_spec, params)
484
484
  end
485
485
 
486
486
  # indices.clone
487
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clone-index.html", "description"=>"Clones an index"}
487
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clone-index.html", "description" => "Clones an index"}
488
488
  def indices_clone(params = {})
489
489
  api_name = 'indices.clone'
490
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clone-index.html", "description"=>"Clones an index"}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}/_clone/{target}", "methods"=>["PUT", "POST"], "parts"=>{"index"=>{"type"=>"string", "description"=>"The name of the source index to clone"}, "target"=>{"type"=>"string", "description"=>"The name of the target index to clone into"}}}]}, "params"=>{"timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Set the number of active shards to wait for on the cloned index before the operation returns."}}, "body"=>{"description"=>"The configuration for the target index (`settings` and `aliases`)"}}
490
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clone-index.html", "description" => "Clones an index"}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}/_clone/{target}", "methods" => ["PUT", "POST"], "parts" => {"index" => {"type" => "string", "description" => "The name of the source index to clone"}, "target" => {"type" => "string", "description" => "The name of the target index to clone into"}}}]}, "params" => {"timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}, "wait_for_active_shards" => {"type" => "string", "description" => "Set the number of active shards to wait for on the cloned index before the operation returns."}}, "body" => {"description" => "The configuration for the target index (`settings` and `aliases`)"}}
491
491
  request(api_name, api_spec, params)
492
492
  end
493
493
 
494
494
  # indices.close
495
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html", "description"=>"Closes an index."}
495
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html", "description" => "Closes an index."}
496
496
  def indices_close(params = {})
497
497
  api_name = 'indices.close'
498
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html", "description"=>"Closes an index."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}/_close", "methods"=>["POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma separated list of indices to close"}}}]}, "params"=>{"timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Sets the number of active shards to wait for before the operation returns."}}}
498
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html", "description" => "Closes an index."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}/_close", "methods" => ["POST"], "parts" => {"index" => {"type" => "list", "description" => "A comma separated list of indices to close"}}}]}, "params" => {"timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "wait_for_active_shards" => {"type" => "string", "description" => "Sets the number of active shards to wait for before the operation returns."}}}
499
499
  request(api_name, api_spec, params)
500
500
  end
501
501
 
502
502
  # indices.create
503
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html", "description"=>"Creates an index with optional settings and mappings."}
503
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html", "description" => "Creates an index with optional settings and mappings."}
504
504
  def indices_create(params = {})
505
505
  api_name = 'indices.create'
506
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html", "description"=>"Creates an index with optional settings and mappings."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}", "methods"=>["PUT"], "parts"=>{"index"=>{"type"=>"string", "description"=>"The name of the index"}}}]}, "params"=>{"include_type_name"=>{"type"=>"boolean", "description"=>"Whether a type should be expected in the body of the mappings."}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Set the number of active shards to wait for before the operation returns."}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}}, "body"=>{"description"=>"The configuration for the index (`settings` and `mappings`)"}}
506
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html", "description" => "Creates an index with optional settings and mappings."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}", "methods" => ["PUT"], "parts" => {"index" => {"type" => "string", "description" => "The name of the index"}}}]}, "params" => {"include_type_name" => {"type" => "boolean", "description" => "Whether a type should be expected in the body of the mappings."}, "wait_for_active_shards" => {"type" => "string", "description" => "Set the number of active shards to wait for before the operation returns."}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}}, "body" => {"description" => "The configuration for the index (`settings` and `mappings`)"}}
507
507
  request(api_name, api_spec, params)
508
508
  end
509
509
 
510
510
  # indices.create_data_stream
511
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", "description"=>"Creates or updates a data stream"}
511
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", "description" => "Creates or updates a data stream"}
512
512
  def indices_create_data_stream(params = {})
513
513
  api_name = 'indices.create_data_stream'
514
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", "description"=>"Creates or updates a data stream"}, "stability"=>"experimental", "url"=>{"paths"=>[{"path"=>"/_data_stream/{name}", "methods"=>["PUT"], "parts"=>{"name"=>{"type"=>"string", "description"=>"The name of the data stream"}}}]}, "params"=>{}, "body"=>{"description"=>"The data stream definition"}}
514
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", "description" => "Creates or updates a data stream"}, "stability" => "experimental", "url" => {"paths" => [{"path" => "/_data_stream/{name}", "methods" => ["PUT"], "parts" => {"name" => {"type" => "string", "description" => "The name of the data stream"}}}]}, "params" => {}, "body" => {"description" => "The data stream definition"}}
515
515
  request(api_name, api_spec, params)
516
516
  end
517
517
 
518
518
  # indices.data_streams_stats
519
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", "description"=>"Provides statistics on operations happening in a data stream."}
519
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", "description" => "Provides statistics on operations happening in a data stream."}
520
520
  def indices_data_streams_stats(params = {})
521
521
  api_name = 'indices.data_streams_stats'
522
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", "description"=>"Provides statistics on operations happening in a data stream."}, "stability"=>"experimental", "url"=>{"paths"=>[{"path"=>"/_data_stream/_stats", "methods"=>["GET"]}, {"path"=>"/_data_stream/{name}/_stats", "methods"=>["GET"], "parts"=>{"name"=>{"type"=>"list", "description"=>"A comma-separated list of data stream names; use `_all` or empty string to perform the operation on all data streams"}}}]}}
522
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", "description" => "Provides statistics on operations happening in a data stream."}, "stability" => "experimental", "url" => {"paths" => [{"path" => "/_data_stream/_stats", "methods" => ["GET"]}, {"path" => "/_data_stream/{name}/_stats", "methods" => ["GET"], "parts" => {"name" => {"type" => "list", "description" => "A comma-separated list of data stream names; use `_all` or empty string to perform the operation on all data streams"}}}]}}
523
523
  request(api_name, api_spec, params)
524
524
  end
525
525
 
526
526
  # indices.delete
527
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html", "description"=>"Deletes an index."}
527
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html", "description" => "Deletes an index."}
528
528
  def indices_delete(params = {})
529
529
  api_name = 'indices.delete'
530
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html", "description"=>"Deletes an index."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}", "methods"=>["DELETE"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices"}}}]}, "params"=>{"timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Ignore unavailable indexes (default: false)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Ignore if a wildcard expression resolves to no concrete indices (default: false)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether wildcard expressions should get expanded to open or closed indices (default: open)"}}}
530
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html", "description" => "Deletes an index."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}", "methods" => ["DELETE"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices"}}}]}, "params" => {"timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Ignore unavailable indexes (default: false)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Ignore if a wildcard expression resolves to no concrete indices (default: false)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether wildcard expressions should get expanded to open or closed indices (default: open)"}}}
531
531
  request(api_name, api_spec, params)
532
532
  end
533
533
 
534
534
  # indices.delete_alias
535
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "description"=>"Deletes an alias."}
535
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "description" => "Deletes an alias."}
536
536
  def indices_delete_alias(params = {})
537
537
  api_name = 'indices.delete_alias'
538
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "description"=>"Deletes an alias."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}/_alias/{name}", "methods"=>["DELETE"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names (supports wildcards); use `_all` for all indices"}, "name"=>{"type"=>"list", "description"=>"A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices."}}}, {"path"=>"/{index}/_aliases/{name}", "methods"=>["DELETE"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names (supports wildcards); use `_all` for all indices"}, "name"=>{"type"=>"list", "description"=>"A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices."}}}]}, "params"=>{"timeout"=>{"type"=>"time", "description"=>"Explicit timestamp for the document"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}}}
538
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "description" => "Deletes an alias."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}/_alias/{name}", "methods" => ["DELETE"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names (supports wildcards); use `_all` for all indices"}, "name" => {"type" => "list", "description" => "A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices."}}}, {"path" => "/{index}/_aliases/{name}", "methods" => ["DELETE"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names (supports wildcards); use `_all` for all indices"}, "name" => {"type" => "list", "description" => "A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices."}}}]}, "params" => {"timeout" => {"type" => "time", "description" => "Explicit timestamp for the document"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}}}
539
539
  request(api_name, api_spec, params)
540
540
  end
541
541
 
542
542
  # indices.delete_data_stream
543
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", "description"=>"Deletes a data stream."}
543
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", "description" => "Deletes a data stream."}
544
544
  def indices_delete_data_stream(params = {})
545
545
  api_name = 'indices.delete_data_stream'
546
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", "description"=>"Deletes a data stream."}, "stability"=>"experimental", "url"=>{"paths"=>[{"path"=>"/_data_stream/{name}", "methods"=>["DELETE"], "parts"=>{"name"=>{"type"=>"list", "description"=>"A comma-separated list of data streams to delete; use `*` to delete all data streams"}}}]}, "params"=>{}}
546
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", "description" => "Deletes a data stream."}, "stability" => "experimental", "url" => {"paths" => [{"path" => "/_data_stream/{name}", "methods" => ["DELETE"], "parts" => {"name" => {"type" => "list", "description" => "A comma-separated list of data streams to delete; use `*` to delete all data streams"}}}]}, "params" => {}}
547
547
  request(api_name, api_spec, params)
548
548
  end
549
549
 
550
550
  # indices.delete_index_template
551
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description"=>"Deletes an index template."}
551
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description" => "Deletes an index template."}
552
552
  def indices_delete_index_template(params = {})
553
553
  api_name = 'indices.delete_index_template'
554
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description"=>"Deletes an index template."}, "stability"=>"experimental", "url"=>{"paths"=>[{"path"=>"/_index_template/{name}", "methods"=>["DELETE"], "parts"=>{"name"=>{"type"=>"string", "description"=>"The name of the template"}}}]}, "params"=>{"timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}}}
554
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description" => "Deletes an index template."}, "stability" => "experimental", "url" => {"paths" => [{"path" => "/_index_template/{name}", "methods" => ["DELETE"], "parts" => {"name" => {"type" => "string", "description" => "The name of the template"}}}]}, "params" => {"timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}}}
555
555
  request(api_name, api_spec, params)
556
556
  end
557
557
 
558
558
  # indices.delete_template
559
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description"=>"Deletes an index template."}
559
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description" => "Deletes an index template."}
560
560
  def indices_delete_template(params = {})
561
561
  api_name = 'indices.delete_template'
562
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description"=>"Deletes an index template."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_template/{name}", "methods"=>["DELETE"], "parts"=>{"name"=>{"type"=>"string", "description"=>"The name of the template"}}}]}, "params"=>{"timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}}}
562
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description" => "Deletes an index template."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_template/{name}", "methods" => ["DELETE"], "parts" => {"name" => {"type" => "string", "description" => "The name of the template"}}}]}, "params" => {"timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}}}
563
563
  request(api_name, api_spec, params)
564
564
  end
565
565
 
566
566
  # indices.exists
567
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html", "description"=>"Returns information about whether a particular index exists."}
567
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html", "description" => "Returns information about whether a particular index exists."}
568
568
  def indices_exists(params = {})
569
569
  api_name = 'indices.exists'
570
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html", "description"=>"Returns information about whether a particular index exists."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}", "methods"=>["HEAD"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names"}}}]}, "params"=>{"local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Ignore unavailable indexes (default: false)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Ignore if a wildcard expression resolves to no concrete indices (default: false)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether wildcard expressions should get expanded to open or closed indices (default: open)"}, "flat_settings"=>{"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "include_defaults"=>{"type"=>"boolean", "description"=>"Whether to return all default setting for each of the indices.", "default"=>false}}}
570
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html", "description" => "Returns information about whether a particular index exists."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}", "methods" => ["HEAD"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names"}}}]}, "params" => {"local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Ignore unavailable indexes (default: false)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Ignore if a wildcard expression resolves to no concrete indices (default: false)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether wildcard expressions should get expanded to open or closed indices (default: open)"}, "flat_settings" => {"type" => "boolean", "description" => "Return settings in flat format (default: false)"}, "include_defaults" => {"type" => "boolean", "description" => "Whether to return all default setting for each of the indices.", "default" => false}}}
571
571
  request(api_name, api_spec, params)
572
572
  end
573
573
  alias :indices_exists? :indices_exists
574
574
 
575
575
  # indices.exists_alias
576
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "description"=>"Returns information about whether a particular alias exists."}
576
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "description" => "Returns information about whether a particular alias exists."}
577
577
  def indices_exists_alias(params = {})
578
578
  api_name = 'indices.exists_alias'
579
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "description"=>"Returns information about whether a particular alias exists."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_alias/{name}", "methods"=>["HEAD"], "parts"=>{"name"=>{"type"=>"list", "description"=>"A comma-separated list of alias names to return"}}}, {"path"=>"/{index}/_alias/{name}", "methods"=>["HEAD"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to filter aliases"}, "name"=>{"type"=>"list", "description"=>"A comma-separated list of alias names to return"}}}]}, "params"=>{"ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"all", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}}}
579
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "description" => "Returns information about whether a particular alias exists."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_alias/{name}", "methods" => ["HEAD"], "parts" => {"name" => {"type" => "list", "description" => "A comma-separated list of alias names to return"}}}, {"path" => "/{index}/_alias/{name}", "methods" => ["HEAD"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names to filter aliases"}, "name" => {"type" => "list", "description" => "A comma-separated list of alias names to return"}}}]}, "params" => {"ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "all", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}}}
580
580
  request(api_name, api_spec, params)
581
581
  end
582
582
  alias :indices_exists_alias? :indices_exists_alias
583
583
 
584
584
  # indices.exists_index_template
585
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description"=>"Returns information about whether a particular index template exists."}
585
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description" => "Returns information about whether a particular index template exists."}
586
586
  def indices_exists_index_template(params = {})
587
587
  api_name = 'indices.exists_index_template'
588
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description"=>"Returns information about whether a particular index template exists."}, "stability"=>"experimental", "url"=>{"paths"=>[{"path"=>"/_index_template/{name}", "methods"=>["HEAD"], "parts"=>{"name"=>{"type"=>"string", "description"=>"The name of the template"}}}]}, "params"=>{"flat_settings"=>{"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}}}
588
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description" => "Returns information about whether a particular index template exists."}, "stability" => "experimental", "url" => {"paths" => [{"path" => "/_index_template/{name}", "methods" => ["HEAD"], "parts" => {"name" => {"type" => "string", "description" => "The name of the template"}}}]}, "params" => {"flat_settings" => {"type" => "boolean", "description" => "Return settings in flat format (default: false)"}, "master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}}}
589
589
  request(api_name, api_spec, params)
590
590
  end
591
591
  alias :indices_exists_index_template? :indices_exists_index_template
592
592
 
593
593
  # indices.exists_template
594
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description"=>"Returns information about whether a particular index template exists."}
594
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description" => "Returns information about whether a particular index template exists."}
595
595
  def indices_exists_template(params = {})
596
596
  api_name = 'indices.exists_template'
597
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description"=>"Returns information about whether a particular index template exists."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_template/{name}", "methods"=>["HEAD"], "parts"=>{"name"=>{"type"=>"list", "description"=>"The comma separated names of the index templates"}}}]}, "params"=>{"flat_settings"=>{"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}}}
597
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description" => "Returns information about whether a particular index template exists."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_template/{name}", "methods" => ["HEAD"], "parts" => {"name" => {"type" => "list", "description" => "The comma separated names of the index templates"}}}]}, "params" => {"flat_settings" => {"type" => "boolean", "description" => "Return settings in flat format (default: false)"}, "master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}}}
598
598
  request(api_name, api_spec, params)
599
599
  end
600
600
  alias :indices_exists_template? :indices_exists_template
601
601
 
602
602
  # indices.exists_type
603
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html", "description"=>"Returns information about whether a particular document type exists. (DEPRECATED)"}
603
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html", "description" => "Returns information about whether a particular document type exists. (DEPRECATED)"}
604
604
  def indices_exists_type(params = {})
605
605
  api_name = 'indices.exists_type'
606
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html", "description"=>"Returns information about whether a particular document type exists. (DEPRECATED)"}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}/_mapping/{type}", "methods"=>["HEAD"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` to check the types across all indices"}, "type"=>{"type"=>"list", "description"=>"A comma-separated list of document types to check"}}}]}, "params"=>{"ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}}}
606
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html", "description" => "Returns information about whether a particular document type exists. (DEPRECATED)"}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}/_mapping/{type}", "methods" => ["HEAD"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names; use `_all` to check the types across all indices"}, "type" => {"type" => "list", "description" => "A comma-separated list of document types to check"}}}]}, "params" => {"ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}}}
607
607
  request(api_name, api_spec, params)
608
608
  end
609
609
  alias :indices_exists_type? :indices_exists_type
610
610
 
611
611
  # indices.flush
612
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html", "description"=>"Performs the flush operation on one or more indices."}
612
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html", "description" => "Performs the flush operation on one or more indices."}
613
613
  def indices_flush(params = {})
614
614
  api_name = 'indices.flush'
615
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html", "description"=>"Performs the flush operation on one or more indices."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_flush", "methods"=>["POST", "GET"]}, {"path"=>"/{index}/_flush", "methods"=>["POST", "GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string for all indices"}}}]}, "params"=>{"force"=>{"type"=>"boolean", "description"=>"Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)"}, "wait_if_ongoing"=>{"type"=>"boolean", "description"=>"If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running."}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}
615
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html", "description" => "Performs the flush operation on one or more indices."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_flush", "methods" => ["POST", "GET"]}, {"path" => "/{index}/_flush", "methods" => ["POST", "GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names; use `_all` or empty string for all indices"}}}]}, "params" => {"force" => {"type" => "boolean", "description" => "Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)"}, "wait_if_ongoing" => {"type" => "boolean", "description" => "If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running."}, "ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}
616
616
  request(api_name, api_spec, params)
617
617
  end
618
618
 
619
619
  # indices.flush_synced
620
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush-api.html", "description"=>"Performs a synced flush operation on one or more indices. Synced flush is deprecated and will be removed in 8.0. Use flush instead"}
620
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush-api.html", "description" => "Performs a synced flush operation on one or more indices. Synced flush is deprecated and will be removed in 8.0. Use flush instead"}
621
621
  def indices_flush_synced(params = {})
622
622
  api_name = 'indices.flush_synced'
623
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush-api.html", "description"=>"Performs a synced flush operation on one or more indices. Synced flush is deprecated and will be removed in 8.0. Use flush instead"}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_flush/synced", "methods"=>["POST", "GET"], "deprecated"=>{"version"=>"7.6.0", "description"=>"Synced flush is deprecated and will be removed in 8.0. Use flush instead."}}, {"path"=>"/{index}/_flush/synced", "methods"=>["POST", "GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string for all indices"}}, "deprecated"=>{"version"=>"7.6.0", "description"=>"Synced flush is deprecated and will be removed in 8.0. Use flush instead."}}]}, "params"=>{"ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}
623
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush-api.html", "description" => "Performs a synced flush operation on one or more indices. Synced flush is deprecated and will be removed in 8.0. Use flush instead"}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_flush/synced", "methods" => ["POST", "GET"], "deprecated" => {"version" => "7.6.0", "description" => "Synced flush is deprecated and will be removed in 8.0. Use flush instead."}}, {"path" => "/{index}/_flush/synced", "methods" => ["POST", "GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names; use `_all` or empty string for all indices"}}, "deprecated" => {"version" => "7.6.0", "description" => "Synced flush is deprecated and will be removed in 8.0. Use flush instead."}}]}, "params" => {"ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}
624
624
  request(api_name, api_spec, params)
625
625
  end
626
626
 
627
627
  # indices.forcemerge
628
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html", "description"=>"Performs the force merge operation on one or more indices."}
628
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html", "description" => "Performs the force merge operation on one or more indices."}
629
629
  def indices_forcemerge(params = {})
630
630
  api_name = 'indices.forcemerge'
631
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html", "description"=>"Performs the force merge operation on one or more indices."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_forcemerge", "methods"=>["POST"]}, {"path"=>"/{index}/_forcemerge", "methods"=>["POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}}]}, "params"=>{"flush"=>{"type"=>"boolean", "description"=>"Specify whether the index should be flushed after performing the operation (default: true)"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "max_num_segments"=>{"type"=>"number", "description"=>"The number of segments the index should be merged into (default: dynamic)"}, "only_expunge_deletes"=>{"type"=>"boolean", "description"=>"Specify whether the operation should only expunge deleted documents"}}}
631
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html", "description" => "Performs the force merge operation on one or more indices."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_forcemerge", "methods" => ["POST"]}, {"path" => "/{index}/_forcemerge", "methods" => ["POST"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}}]}, "params" => {"flush" => {"type" => "boolean", "description" => "Specify whether the index should be flushed after performing the operation (default: true)"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "max_num_segments" => {"type" => "number", "description" => "The number of segments the index should be merged into (default: dynamic)"}, "only_expunge_deletes" => {"type" => "boolean", "description" => "Specify whether the operation should only expunge deleted documents"}}}
632
632
  request(api_name, api_spec, params)
633
633
  end
634
634
 
635
635
  # indices.get
636
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html", "description"=>"Returns information about one or more indices."}
636
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html", "description" => "Returns information about one or more indices."}
637
637
  def indices_get(params = {})
638
638
  api_name = 'indices.get'
639
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html", "description"=>"Returns information about one or more indices."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}", "methods"=>["GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names"}}}]}, "params"=>{"include_type_name"=>{"type"=>"boolean", "description"=>"Whether to add the type name to the response (default: false)"}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Ignore unavailable indexes (default: false)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Ignore if a wildcard expression resolves to no concrete indices (default: false)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether wildcard expressions should get expanded to open or closed indices (default: open)"}, "flat_settings"=>{"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "include_defaults"=>{"type"=>"boolean", "description"=>"Whether to return all default setting for each of the indices.", "default"=>false}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}}}
639
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html", "description" => "Returns information about one or more indices."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}", "methods" => ["GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names"}}}]}, "params" => {"include_type_name" => {"type" => "boolean", "description" => "Whether to add the type name to the response (default: false)"}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Ignore unavailable indexes (default: false)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Ignore if a wildcard expression resolves to no concrete indices (default: false)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether wildcard expressions should get expanded to open or closed indices (default: open)"}, "flat_settings" => {"type" => "boolean", "description" => "Return settings in flat format (default: false)"}, "include_defaults" => {"type" => "boolean", "description" => "Whether to return all default setting for each of the indices.", "default" => false}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}}}
640
640
  request(api_name, api_spec, params)
641
641
  end
642
642
 
643
643
  # indices.get_alias
644
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "description"=>"Returns an alias."}
644
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "description" => "Returns an alias."}
645
645
  def indices_get_alias(params = {})
646
646
  api_name = 'indices.get_alias'
647
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "description"=>"Returns an alias."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_alias", "methods"=>["GET"]}, {"path"=>"/_alias/{name}", "methods"=>["GET"], "parts"=>{"name"=>{"type"=>"list", "description"=>"A comma-separated list of alias names to return"}}}, {"path"=>"/{index}/_alias/{name}", "methods"=>["GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to filter aliases"}, "name"=>{"type"=>"list", "description"=>"A comma-separated list of alias names to return"}}}, {"path"=>"/{index}/_alias", "methods"=>["GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to filter aliases"}}}]}, "params"=>{"ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"all", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}}}
647
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "description" => "Returns an alias."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_alias", "methods" => ["GET"]}, {"path" => "/_alias/{name}", "methods" => ["GET"], "parts" => {"name" => {"type" => "list", "description" => "A comma-separated list of alias names to return"}}}, {"path" => "/{index}/_alias/{name}", "methods" => ["GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names to filter aliases"}, "name" => {"type" => "list", "description" => "A comma-separated list of alias names to return"}}}, {"path" => "/{index}/_alias", "methods" => ["GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names to filter aliases"}}}]}, "params" => {"ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "all", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}}}
648
648
  request(api_name, api_spec, params)
649
649
  end
650
650
 
651
651
  # indices.get_data_stream
652
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", "description"=>"Returns data streams."}
652
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", "description" => "Returns data streams."}
653
653
  def indices_get_data_stream(params = {})
654
654
  api_name = 'indices.get_data_stream'
655
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", "description"=>"Returns data streams."}, "stability"=>"experimental", "url"=>{"paths"=>[{"path"=>"/_data_stream", "methods"=>["GET"]}, {"path"=>"/_data_stream/{name}", "methods"=>["GET"], "parts"=>{"name"=>{"type"=>"list", "description"=>"A comma-separated list of data streams to get; use `*` to get all data streams"}}}]}, "params"=>{}}
655
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", "description" => "Returns data streams."}, "stability" => "experimental", "url" => {"paths" => [{"path" => "/_data_stream", "methods" => ["GET"]}, {"path" => "/_data_stream/{name}", "methods" => ["GET"], "parts" => {"name" => {"type" => "list", "description" => "A comma-separated list of data streams to get; use `*` to get all data streams"}}}]}, "params" => {}}
656
656
  request(api_name, api_spec, params)
657
657
  end
658
658
 
659
659
  # indices.get_field_mapping
660
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html", "description"=>"Returns mapping for one or more fields."}
660
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html", "description" => "Returns mapping for one or more fields."}
661
661
  def indices_get_field_mapping(params = {})
662
662
  api_name = 'indices.get_field_mapping'
663
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html", "description"=>"Returns mapping for one or more fields."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_mapping/field/{fields}", "methods"=>["GET"], "parts"=>{"fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields"}}}, {"path"=>"/{index}/_mapping/field/{fields}", "methods"=>["GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names"}, "fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields"}}}, {"path"=>"/_mapping/{type}/field/{fields}", "methods"=>["GET"], "parts"=>{"type"=>{"type"=>"list", "description"=>"A comma-separated list of document types", "deprecated"=>true}, "fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields"}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}, {"path"=>"/{index}/_mapping/{type}/field/{fields}", "methods"=>["GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names"}, "type"=>{"type"=>"list", "description"=>"A comma-separated list of document types", "deprecated"=>true}, "fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields"}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"include_type_name"=>{"type"=>"boolean", "description"=>"Whether a type should be returned in the body of the mappings."}, "include_defaults"=>{"type"=>"boolean", "description"=>"Whether the default mapping values should be returned as well"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}}}
663
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html", "description" => "Returns mapping for one or more fields."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_mapping/field/{fields}", "methods" => ["GET"], "parts" => {"fields" => {"type" => "list", "description" => "A comma-separated list of fields"}}}, {"path" => "/{index}/_mapping/field/{fields}", "methods" => ["GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names"}, "fields" => {"type" => "list", "description" => "A comma-separated list of fields"}}}, {"path" => "/_mapping/{type}/field/{fields}", "methods" => ["GET"], "parts" => {"type" => {"type" => "list", "description" => "A comma-separated list of document types", "deprecated" => true}, "fields" => {"type" => "list", "description" => "A comma-separated list of fields"}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}, {"path" => "/{index}/_mapping/{type}/field/{fields}", "methods" => ["GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names"}, "type" => {"type" => "list", "description" => "A comma-separated list of document types", "deprecated" => true}, "fields" => {"type" => "list", "description" => "A comma-separated list of fields"}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"include_type_name" => {"type" => "boolean", "description" => "Whether a type should be returned in the body of the mappings."}, "include_defaults" => {"type" => "boolean", "description" => "Whether the default mapping values should be returned as well"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}}}
664
664
  request(api_name, api_spec, params)
665
665
  end
666
666
 
667
667
  # indices.get_index_template
668
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description"=>"Returns an index template."}
668
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description" => "Returns an index template."}
669
669
  def indices_get_index_template(params = {})
670
670
  api_name = 'indices.get_index_template'
671
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description"=>"Returns an index template."}, "stability"=>"experimental", "url"=>{"paths"=>[{"path"=>"/_index_template", "methods"=>["GET"]}, {"path"=>"/_index_template/{name}", "methods"=>["GET"], "parts"=>{"name"=>{"type"=>"list", "description"=>"The comma separated names of the index templates"}}}]}, "params"=>{"flat_settings"=>{"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}}}
671
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description" => "Returns an index template."}, "stability" => "experimental", "url" => {"paths" => [{"path" => "/_index_template", "methods" => ["GET"]}, {"path" => "/_index_template/{name}", "methods" => ["GET"], "parts" => {"name" => {"type" => "list", "description" => "The comma separated names of the index templates"}}}]}, "params" => {"flat_settings" => {"type" => "boolean", "description" => "Return settings in flat format (default: false)"}, "master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}}}
672
672
  request(api_name, api_spec, params)
673
673
  end
674
674
 
675
675
  # indices.get_mapping
676
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html", "description"=>"Returns mappings for one or more indices."}
676
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html", "description" => "Returns mappings for one or more indices."}
677
677
  def indices_get_mapping(params = {})
678
678
  api_name = 'indices.get_mapping'
679
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html", "description"=>"Returns mappings for one or more indices."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_mapping", "methods"=>["GET"]}, {"path"=>"/{index}/_mapping", "methods"=>["GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names"}}}, {"path"=>"/_mapping/{type}", "methods"=>["GET"], "parts"=>{"type"=>{"type"=>"list", "description"=>"A comma-separated list of document types", "deprecated"=>true}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}, {"path"=>"/{index}/_mapping/{type}", "methods"=>["GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names"}, "type"=>{"type"=>"list", "description"=>"A comma-separated list of document types", "deprecated"=>true}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"include_type_name"=>{"type"=>"boolean", "description"=>"Whether to add the type name to the response (default: false)"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)", "deprecated"=>{"version"=>"7.8.0", "description"=>"This parameter is a no-op and field mappings are always retrieved locally."}}}}
679
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html", "description" => "Returns mappings for one or more indices."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_mapping", "methods" => ["GET"]}, {"path" => "/{index}/_mapping", "methods" => ["GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names"}}}, {"path" => "/_mapping/{type}", "methods" => ["GET"], "parts" => {"type" => {"type" => "list", "description" => "A comma-separated list of document types", "deprecated" => true}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}, {"path" => "/{index}/_mapping/{type}", "methods" => ["GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names"}, "type" => {"type" => "list", "description" => "A comma-separated list of document types", "deprecated" => true}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"include_type_name" => {"type" => "boolean", "description" => "Whether to add the type name to the response (default: false)"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)", "deprecated" => {"version" => "7.8.0", "description" => "This parameter is a no-op and field mappings are always retrieved locally."}}}}
680
680
  request(api_name, api_spec, params)
681
681
  end
682
682
 
683
683
  # indices.get_settings
684
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html", "description"=>"Returns settings for one or more indices."}
684
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html", "description" => "Returns settings for one or more indices."}
685
685
  def indices_get_settings(params = {})
686
686
  api_name = 'indices.get_settings'
687
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html", "description"=>"Returns settings for one or more indices."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_settings", "methods"=>["GET"]}, {"path"=>"/{index}/_settings", "methods"=>["GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}}, {"path"=>"/{index}/_settings/{name}", "methods"=>["GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, "name"=>{"type"=>"list", "description"=>"The name of the settings that should be included"}}}, {"path"=>"/_settings/{name}", "methods"=>["GET"], "parts"=>{"name"=>{"type"=>"list", "description"=>"The name of the settings that should be included"}}}]}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"all", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "flat_settings"=>{"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "include_defaults"=>{"type"=>"boolean", "description"=>"Whether to return all default setting for each of the indices.", "default"=>false}}}
687
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html", "description" => "Returns settings for one or more indices."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_settings", "methods" => ["GET"]}, {"path" => "/{index}/_settings", "methods" => ["GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}}, {"path" => "/{index}/_settings/{name}", "methods" => ["GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, "name" => {"type" => "list", "description" => "The name of the settings that should be included"}}}, {"path" => "/_settings/{name}", "methods" => ["GET"], "parts" => {"name" => {"type" => "list", "description" => "The name of the settings that should be included"}}}]}, "params" => {"master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "all", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "flat_settings" => {"type" => "boolean", "description" => "Return settings in flat format (default: false)"}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}, "include_defaults" => {"type" => "boolean", "description" => "Whether to return all default setting for each of the indices.", "default" => false}}}
688
688
  request(api_name, api_spec, params)
689
689
  end
690
690
 
691
691
  # indices.get_template
692
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description"=>"Returns an index template."}
692
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description" => "Returns an index template."}
693
693
  def indices_get_template(params = {})
694
694
  api_name = 'indices.get_template'
695
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description"=>"Returns an index template."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_template", "methods"=>["GET"]}, {"path"=>"/_template/{name}", "methods"=>["GET"], "parts"=>{"name"=>{"type"=>"list", "description"=>"The comma separated names of the index templates"}}}]}, "params"=>{"include_type_name"=>{"type"=>"boolean", "description"=>"Whether a type should be returned in the body of the mappings."}, "flat_settings"=>{"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}}}
695
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description" => "Returns an index template."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_template", "methods" => ["GET"]}, {"path" => "/_template/{name}", "methods" => ["GET"], "parts" => {"name" => {"type" => "list", "description" => "The comma separated names of the index templates"}}}]}, "params" => {"include_type_name" => {"type" => "boolean", "description" => "Whether a type should be returned in the body of the mappings."}, "flat_settings" => {"type" => "boolean", "description" => "Return settings in flat format (default: false)"}, "master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}}}
696
696
  request(api_name, api_spec, params)
697
697
  end
698
698
 
699
699
  # indices.get_upgrade
700
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html", "description"=>"The _upgrade API is no longer useful and will be removed."}
700
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html", "description" => "The _upgrade API is no longer useful and will be removed."}
701
701
  def indices_get_upgrade(params = {})
702
702
  api_name = 'indices.get_upgrade'
703
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html", "description"=>"The _upgrade API is no longer useful and will be removed."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_upgrade", "methods"=>["GET"]}, {"path"=>"/{index}/_upgrade", "methods"=>["GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}}]}, "params"=>{"ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}
703
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html", "description" => "The _upgrade API is no longer useful and will be removed."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_upgrade", "methods" => ["GET"]}, {"path" => "/{index}/_upgrade", "methods" => ["GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}}]}, "params" => {"ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}
704
704
  request(api_name, api_spec, params)
705
705
  end
706
706
 
707
707
  # indices.open
708
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html", "description"=>"Opens an index."}
708
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html", "description" => "Opens an index."}
709
709
  def indices_open(params = {})
710
710
  api_name = 'indices.open'
711
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html", "description"=>"Opens an index."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}/_open", "methods"=>["POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma separated list of indices to open"}}}]}, "params"=>{"timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"closed", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Sets the number of active shards to wait for before the operation returns."}}}
711
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html", "description" => "Opens an index."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}/_open", "methods" => ["POST"], "parts" => {"index" => {"type" => "list", "description" => "A comma separated list of indices to open"}}}]}, "params" => {"timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "closed", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "wait_for_active_shards" => {"type" => "string", "description" => "Sets the number of active shards to wait for before the operation returns."}}}
712
712
  request(api_name, api_spec, params)
713
713
  end
714
714
 
715
715
  # indices.put_alias
716
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "description"=>"Creates or updates an alias."}
716
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "description" => "Creates or updates an alias."}
717
717
  def indices_put_alias(params = {})
718
718
  api_name = 'indices.put_alias'
719
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "description"=>"Creates or updates an alias."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}/_alias/{name}", "methods"=>["PUT", "POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices."}, "name"=>{"type"=>"string", "description"=>"The name of the alias to be created or updated"}}}, {"path"=>"/{index}/_aliases/{name}", "methods"=>["PUT", "POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices."}, "name"=>{"type"=>"string", "description"=>"The name of the alias to be created or updated"}}}]}, "params"=>{"timeout"=>{"type"=>"time", "description"=>"Explicit timestamp for the document"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}}, "body"=>{"description"=>"The settings for the alias, such as `routing` or `filter`", "required"=>false}}
719
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "description" => "Creates or updates an alias."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}/_alias/{name}", "methods" => ["PUT", "POST"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices."}, "name" => {"type" => "string", "description" => "The name of the alias to be created or updated"}}}, {"path" => "/{index}/_aliases/{name}", "methods" => ["PUT", "POST"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices."}, "name" => {"type" => "string", "description" => "The name of the alias to be created or updated"}}}]}, "params" => {"timeout" => {"type" => "time", "description" => "Explicit timestamp for the document"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}}, "body" => {"description" => "The settings for the alias, such as `routing` or `filter`", "required" => false}}
720
720
  request(api_name, api_spec, params)
721
721
  end
722
722
 
723
723
  # indices.put_index_template
724
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description"=>"Creates or updates an index template."}
724
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description" => "Creates or updates an index template."}
725
725
  def indices_put_index_template(params = {})
726
726
  api_name = 'indices.put_index_template'
727
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description"=>"Creates or updates an index template."}, "stability"=>"experimental", "url"=>{"paths"=>[{"path"=>"/_index_template/{name}", "methods"=>["PUT", "POST"], "parts"=>{"name"=>{"type"=>"string", "description"=>"The name of the template"}}}]}, "params"=>{"create"=>{"type"=>"boolean", "description"=>"Whether the index template should only be added if new or can also replace an existing one", "default"=>false}, "cause"=>{"type"=>"string", "description"=>"User defined reason for creating/updating the index template", "default"=>false}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}}, "body"=>{"description"=>"The template definition", "required"=>true}}
727
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description" => "Creates or updates an index template."}, "stability" => "experimental", "url" => {"paths" => [{"path" => "/_index_template/{name}", "methods" => ["PUT", "POST"], "parts" => {"name" => {"type" => "string", "description" => "The name of the template"}}}]}, "params" => {"create" => {"type" => "boolean", "description" => "Whether the index template should only be added if new or can also replace an existing one", "default" => false}, "cause" => {"type" => "string", "description" => "User defined reason for creating/updating the index template", "default" => false}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}}, "body" => {"description" => "The template definition", "required" => true}}
728
728
  request(api_name, api_spec, params)
729
729
  end
730
730
 
731
731
  # indices.put_mapping
732
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html", "description"=>"Updates the index mappings."}
732
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html", "description" => "Updates the index mappings."}
733
733
  def indices_put_mapping(params = {})
734
734
  api_name = 'indices.put_mapping'
735
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html", "description"=>"Updates the index mappings."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}/_mapping", "methods"=>["PUT", "POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"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 indices."}}}, {"path"=>"/{index}/{type}/_mapping", "methods"=>["PUT", "POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"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 indices."}, "type"=>{"type"=>"string", "description"=>"The name of the document type", "deprecated"=>true}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}, {"path"=>"/{index}/_mapping/{type}", "methods"=>["PUT", "POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"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 indices."}, "type"=>{"type"=>"string", "description"=>"The name of the document type", "deprecated"=>true}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}, {"path"=>"/{index}/{type}/_mappings", "methods"=>["PUT", "POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"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 indices."}, "type"=>{"type"=>"string", "description"=>"The name of the document type", "deprecated"=>true}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}, {"path"=>"/{index}/_mappings/{type}", "methods"=>["PUT", "POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"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 indices."}, "type"=>{"type"=>"string", "description"=>"The name of the document type", "deprecated"=>true}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}, {"path"=>"/_mappings/{type}", "methods"=>["PUT", "POST"], "parts"=>{"type"=>{"type"=>"string", "description"=>"The name of the document type", "deprecated"=>true}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}, {"path"=>"/{index}/_mappings", "methods"=>["PUT", "POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"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 indices."}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"The plural mappings is accepted but only /_mapping is documented"}}, {"path"=>"/_mapping/{type}", "methods"=>["PUT", "POST"], "parts"=>{"type"=>{"type"=>"string", "description"=>"The name of the document type", "deprecated"=>true}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"include_type_name"=>{"type"=>"boolean", "description"=>"Whether a type should be expected in the body of the mappings."}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "write_index_only"=>{"type"=>"boolean", "default"=>false, "description"=>"When true, applies mappings only to the write index of an alias or data stream"}}, "body"=>{"description"=>"The mapping definition", "required"=>true}}
735
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html", "description" => "Updates the index mappings."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}/_mapping", "methods" => ["PUT", "POST"], "parts" => {"index" => {"type" => "list", "description" => "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 indices."}}}, {"path" => "/{index}/{type}/_mapping", "methods" => ["PUT", "POST"], "parts" => {"index" => {"type" => "list", "description" => "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 indices."}, "type" => {"type" => "string", "description" => "The name of the document type", "deprecated" => true}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}, {"path" => "/{index}/_mapping/{type}", "methods" => ["PUT", "POST"], "parts" => {"index" => {"type" => "list", "description" => "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 indices."}, "type" => {"type" => "string", "description" => "The name of the document type", "deprecated" => true}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}, {"path" => "/{index}/{type}/_mappings", "methods" => ["PUT", "POST"], "parts" => {"index" => {"type" => "list", "description" => "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 indices."}, "type" => {"type" => "string", "description" => "The name of the document type", "deprecated" => true}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}, {"path" => "/{index}/_mappings/{type}", "methods" => ["PUT", "POST"], "parts" => {"index" => {"type" => "list", "description" => "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 indices."}, "type" => {"type" => "string", "description" => "The name of the document type", "deprecated" => true}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}, {"path" => "/_mappings/{type}", "methods" => ["PUT", "POST"], "parts" => {"type" => {"type" => "string", "description" => "The name of the document type", "deprecated" => true}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}, {"path" => "/{index}/_mappings", "methods" => ["PUT", "POST"], "parts" => {"index" => {"type" => "list", "description" => "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 indices."}}, "deprecated" => {"version" => "7.0.0", "description" => "The plural mappings is accepted but only /_mapping is documented"}}, {"path" => "/_mapping/{type}", "methods" => ["PUT", "POST"], "parts" => {"type" => {"type" => "string", "description" => "The name of the document type", "deprecated" => true}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"include_type_name" => {"type" => "boolean", "description" => "Whether a type should be expected in the body of the mappings."}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "write_index_only" => {"type" => "boolean", "default" => false, "description" => "When true, applies mappings only to the write index of an alias or data stream"}}, "body" => {"description" => "The mapping definition", "required" => true}}
736
736
  request(api_name, api_spec, params)
737
737
  end
738
738
 
739
739
  # indices.put_settings
740
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html", "description"=>"Updates the index settings."}
740
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html", "description" => "Updates the index settings."}
741
741
  def indices_put_settings(params = {})
742
742
  api_name = 'indices.put_settings'
743
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html", "description"=>"Updates the index settings."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_settings", "methods"=>["PUT"]}, {"path"=>"/{index}/_settings", "methods"=>["PUT"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}}]}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "preserve_existing"=>{"type"=>"boolean", "description"=>"Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false`"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "flat_settings"=>{"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}}, "body"=>{"description"=>"The index settings to be updated", "required"=>true}}
743
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html", "description" => "Updates the index settings."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_settings", "methods" => ["PUT"]}, {"path" => "/{index}/_settings", "methods" => ["PUT"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}}]}, "params" => {"master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "preserve_existing" => {"type" => "boolean", "description" => "Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false`"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "flat_settings" => {"type" => "boolean", "description" => "Return settings in flat format (default: false)"}}, "body" => {"description" => "The index settings to be updated", "required" => true}}
744
744
  request(api_name, api_spec, params)
745
745
  end
746
746
 
747
747
  # indices.put_template
748
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description"=>"Creates or updates an index template."}
748
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description" => "Creates or updates an index template."}
749
749
  def indices_put_template(params = {})
750
750
  api_name = 'indices.put_template'
751
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description"=>"Creates or updates an index template."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_template/{name}", "methods"=>["PUT", "POST"], "parts"=>{"name"=>{"type"=>"string", "description"=>"The name of the template"}}}]}, "params"=>{"include_type_name"=>{"type"=>"boolean", "description"=>"Whether a type should be returned in the body of the mappings."}, "order"=>{"type"=>"number", "description"=>"The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)"}, "create"=>{"type"=>"boolean", "description"=>"Whether the index template should only be added if new or can also replace an existing one", "default"=>false}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}}, "body"=>{"description"=>"The template definition", "required"=>true}}
751
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description" => "Creates or updates an index template."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_template/{name}", "methods" => ["PUT", "POST"], "parts" => {"name" => {"type" => "string", "description" => "The name of the template"}}}]}, "params" => {"include_type_name" => {"type" => "boolean", "description" => "Whether a type should be returned in the body of the mappings."}, "order" => {"type" => "number", "description" => "The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)"}, "create" => {"type" => "boolean", "description" => "Whether the index template should only be added if new or can also replace an existing one", "default" => false}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}}, "body" => {"description" => "The template definition", "required" => true}}
752
752
  request(api_name, api_spec, params)
753
753
  end
754
754
 
755
755
  # indices.recovery
756
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html", "description"=>"Returns information about ongoing index shard recoveries."}
756
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html", "description" => "Returns information about ongoing index shard recoveries."}
757
757
  def indices_recovery(params = {})
758
758
  api_name = 'indices.recovery'
759
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html", "description"=>"Returns information about ongoing index shard recoveries."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_recovery", "methods"=>["GET"]}, {"path"=>"/{index}/_recovery", "methods"=>["GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}}]}, "params"=>{"detailed"=>{"type"=>"boolean", "description"=>"Whether to display detailed information about shard recovery", "default"=>false}, "active_only"=>{"type"=>"boolean", "description"=>"Display only those recoveries that are currently on-going", "default"=>false}}}
759
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html", "description" => "Returns information about ongoing index shard recoveries."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_recovery", "methods" => ["GET"]}, {"path" => "/{index}/_recovery", "methods" => ["GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}}]}, "params" => {"detailed" => {"type" => "boolean", "description" => "Whether to display detailed information about shard recovery", "default" => false}, "active_only" => {"type" => "boolean", "description" => "Display only those recoveries that are currently on-going", "default" => false}}}
760
760
  request(api_name, api_spec, params)
761
761
  end
762
762
 
763
763
  # indices.refresh
764
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html", "description"=>"Performs the refresh operation in one or more indices."}
764
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html", "description" => "Performs the refresh operation in one or more indices."}
765
765
  def indices_refresh(params = {})
766
766
  api_name = 'indices.refresh'
767
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html", "description"=>"Performs the refresh operation in one or more indices."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_refresh", "methods"=>["POST", "GET"]}, {"path"=>"/{index}/_refresh", "methods"=>["POST", "GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}}]}, "params"=>{"ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}
767
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html", "description" => "Performs the refresh operation in one or more indices."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_refresh", "methods" => ["POST", "GET"]}, {"path" => "/{index}/_refresh", "methods" => ["POST", "GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}}]}, "params" => {"ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}
768
768
  request(api_name, api_spec, params)
769
769
  end
770
770
 
771
771
  # indices.resolve_index
772
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-index-api.html", "description"=>"Returns information about any matching indices, aliases, and data streams"}
772
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-index-api.html", "description" => "Returns information about any matching indices, aliases, and data streams"}
773
773
  def indices_resolve_index(params = {})
774
774
  api_name = 'indices.resolve_index'
775
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-index-api.html", "description"=>"Returns information about any matching indices, aliases, and data streams"}, "stability"=>"experimental", "url"=>{"paths"=>[{"path"=>"/_resolve/index/{name}", "methods"=>["GET"], "parts"=>{"name"=>{"type"=>"list", "description"=>"A comma-separated list of names or wildcard expressions"}}}]}, "params"=>{"expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether wildcard expressions should get expanded to open or closed indices (default: open)"}}}
775
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-index-api.html", "description" => "Returns information about any matching indices, aliases, and data streams"}, "stability" => "experimental", "url" => {"paths" => [{"path" => "/_resolve/index/{name}", "methods" => ["GET"], "parts" => {"name" => {"type" => "list", "description" => "A comma-separated list of names or wildcard expressions"}}}]}, "params" => {"expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether wildcard expressions should get expanded to open or closed indices (default: open)"}}}
776
776
  request(api_name, api_spec, params)
777
777
  end
778
778
 
779
779
  # indices.rollover
780
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html", "description"=>"Updates an alias to point to a new index when the existing index\nis considered to be too large or too old."}
780
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html", "description" => "Updates an alias to point to a new index when the existing index\nis considered to be too large or too old."}
781
781
  def indices_rollover(params = {})
782
782
  api_name = 'indices.rollover'
783
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html", "description"=>"Updates an alias to point to a new index when the existing index\nis considered to be too large or too old."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{alias}/_rollover", "methods"=>["POST"], "parts"=>{"alias"=>{"type"=>"string", "description"=>"The name of the alias to rollover"}}}, {"path"=>"/{alias}/_rollover/{new_index}", "methods"=>["POST"], "parts"=>{"alias"=>{"type"=>"string", "description"=>"The name of the alias to rollover"}, "new_index"=>{"type"=>"string", "description"=>"The name of the rollover index"}}}]}, "params"=>{"include_type_name"=>{"type"=>"boolean", "description"=>"Whether a type should be included in the body of the mappings."}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "dry_run"=>{"type"=>"boolean", "description"=>"If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Set the number of active shards to wait for on the newly created rollover index before the operation returns."}}, "body"=>{"description"=>"The conditions that needs to be met for executing rollover"}}
783
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html", "description" => "Updates an alias to point to a new index when the existing index\nis considered to be too large or too old."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{alias}/_rollover", "methods" => ["POST"], "parts" => {"alias" => {"type" => "string", "description" => "The name of the alias to rollover"}}}, {"path" => "/{alias}/_rollover/{new_index}", "methods" => ["POST"], "parts" => {"alias" => {"type" => "string", "description" => "The name of the alias to rollover"}, "new_index" => {"type" => "string", "description" => "The name of the rollover index"}}}]}, "params" => {"include_type_name" => {"type" => "boolean", "description" => "Whether a type should be included in the body of the mappings."}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "dry_run" => {"type" => "boolean", "description" => "If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}, "wait_for_active_shards" => {"type" => "string", "description" => "Set the number of active shards to wait for on the newly created rollover index before the operation returns."}}, "body" => {"description" => "The conditions that needs to be met for executing rollover"}}
784
784
  request(api_name, api_spec, params)
785
785
  end
786
786
 
787
787
  # indices.segments
788
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html", "description"=>"Provides low-level information about segments in a Lucene index."}
788
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html", "description" => "Provides low-level information about segments in a Lucene index."}
789
789
  def indices_segments(params = {})
790
790
  api_name = 'indices.segments'
791
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html", "description"=>"Provides low-level information about segments in a Lucene index."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_segments", "methods"=>["GET"]}, {"path"=>"/{index}/_segments", "methods"=>["GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}}]}, "params"=>{"ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "verbose"=>{"type"=>"boolean", "description"=>"Includes detailed memory usage by Lucene.", "default"=>false}}}
791
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html", "description" => "Provides low-level information about segments in a Lucene index."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_segments", "methods" => ["GET"]}, {"path" => "/{index}/_segments", "methods" => ["GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}}]}, "params" => {"ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "verbose" => {"type" => "boolean", "description" => "Includes detailed memory usage by Lucene.", "default" => false}}}
792
792
  request(api_name, api_spec, params)
793
793
  end
794
794
 
795
795
  # indices.shard_stores
796
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html", "description"=>"Provides store information for shard copies of indices."}
796
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html", "description" => "Provides store information for shard copies of indices."}
797
797
  def indices_shard_stores(params = {})
798
798
  api_name = 'indices.shard_stores'
799
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html", "description"=>"Provides store information for shard copies of indices."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_shard_stores", "methods"=>["GET"]}, {"path"=>"/{index}/_shard_stores", "methods"=>["GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}}]}, "params"=>{"status"=>{"type"=>"list", "options"=>["green", "yellow", "red", "all"], "description"=>"A comma-separated list of statuses used to filter on shards to get store information for"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}
799
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html", "description" => "Provides store information for shard copies of indices."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_shard_stores", "methods" => ["GET"]}, {"path" => "/{index}/_shard_stores", "methods" => ["GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}}]}, "params" => {"status" => {"type" => "list", "options" => ["green", "yellow", "red", "all"], "description" => "A comma-separated list of statuses used to filter on shards to get store information for"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}
800
800
  request(api_name, api_spec, params)
801
801
  end
802
802
 
803
803
  # indices.shrink
804
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html", "description"=>"Allow to shrink an existing index into a new index with fewer primary shards."}
804
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html", "description" => "Allow to shrink an existing index into a new index with fewer primary shards."}
805
805
  def indices_shrink(params = {})
806
806
  api_name = 'indices.shrink'
807
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html", "description"=>"Allow to shrink an existing index into a new index with fewer primary shards."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}/_shrink/{target}", "methods"=>["PUT", "POST"], "parts"=>{"index"=>{"type"=>"string", "description"=>"The name of the source index to shrink"}, "target"=>{"type"=>"string", "description"=>"The name of the target index to shrink into"}}}]}, "params"=>{"copy_settings"=>{"type"=>"boolean", "description"=>"whether or not to copy settings from the source index (defaults to false)"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Set the number of active shards to wait for on the shrunken index before the operation returns."}}, "body"=>{"description"=>"The configuration for the target index (`settings` and `aliases`)"}}
807
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html", "description" => "Allow to shrink an existing index into a new index with fewer primary shards."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}/_shrink/{target}", "methods" => ["PUT", "POST"], "parts" => {"index" => {"type" => "string", "description" => "The name of the source index to shrink"}, "target" => {"type" => "string", "description" => "The name of the target index to shrink into"}}}]}, "params" => {"copy_settings" => {"type" => "boolean", "description" => "whether or not to copy settings from the source index (defaults to false)"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}, "wait_for_active_shards" => {"type" => "string", "description" => "Set the number of active shards to wait for on the shrunken index before the operation returns."}}, "body" => {"description" => "The configuration for the target index (`settings` and `aliases`)"}}
808
808
  request(api_name, api_spec, params)
809
809
  end
810
810
 
811
811
  # indices.simulate_index_template
812
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description"=>"Simulate matching the given index name against the index templates in the system"}
812
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description" => "Simulate matching the given index name against the index templates in the system"}
813
813
  def indices_simulate_index_template(params = {})
814
814
  api_name = 'indices.simulate_index_template'
815
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description"=>"Simulate matching the given index name against the index templates in the system"}, "stability"=>"experimental", "url"=>{"paths"=>[{"path"=>"/_index_template/_simulate_index/{name}", "methods"=>["POST"], "parts"=>{"name"=>{"type"=>"string", "description"=>"The name of the index (it must be a concrete index name)"}}}]}, "params"=>{"create"=>{"type"=>"boolean", "description"=>"Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one", "default"=>false}, "cause"=>{"type"=>"string", "description"=>"User defined reason for dry-run creating the new template for simulation purposes", "default"=>false}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}}, "body"=>{"description"=>"New index template definition, which will be included in the simulation, as if it already exists in the system", "required"=>false}}
815
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description" => "Simulate matching the given index name against the index templates in the system"}, "stability" => "experimental", "url" => {"paths" => [{"path" => "/_index_template/_simulate_index/{name}", "methods" => ["POST"], "parts" => {"name" => {"type" => "string", "description" => "The name of the index (it must be a concrete index name)"}}}]}, "params" => {"create" => {"type" => "boolean", "description" => "Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one", "default" => false}, "cause" => {"type" => "string", "description" => "User defined reason for dry-run creating the new template for simulation purposes", "default" => false}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}}, "body" => {"description" => "New index template definition, which will be included in the simulation, as if it already exists in the system", "required" => false}}
816
816
  request(api_name, api_spec, params)
817
817
  end
818
818
 
819
819
  # indices.simulate_template
820
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description"=>"Simulate resolving the given template name or body"}
820
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description" => "Simulate resolving the given template name or body"}
821
821
  def indices_simulate_template(params = {})
822
822
  api_name = 'indices.simulate_template'
823
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description"=>"Simulate resolving the given template name or body"}, "stability"=>"experimental", "url"=>{"paths"=>[{"path"=>"/_index_template/_simulate", "methods"=>["POST"]}, {"path"=>"/_index_template/_simulate/{name}", "methods"=>["POST"], "parts"=>{"name"=>{"type"=>"string", "description"=>"The name of the index template"}}}]}, "params"=>{"create"=>{"type"=>"boolean", "description"=>"Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one", "default"=>false}, "cause"=>{"type"=>"string", "description"=>"User defined reason for dry-run creating the new template for simulation purposes", "default"=>false}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}}, "body"=>{"description"=>"New index template definition to be simulated, if no index template name is specified", "required"=>false}}
823
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description" => "Simulate resolving the given template name or body"}, "stability" => "experimental", "url" => {"paths" => [{"path" => "/_index_template/_simulate", "methods" => ["POST"]}, {"path" => "/_index_template/_simulate/{name}", "methods" => ["POST"], "parts" => {"name" => {"type" => "string", "description" => "The name of the index template"}}}]}, "params" => {"create" => {"type" => "boolean", "description" => "Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one", "default" => false}, "cause" => {"type" => "string", "description" => "User defined reason for dry-run creating the new template for simulation purposes", "default" => false}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}}, "body" => {"description" => "New index template definition to be simulated, if no index template name is specified", "required" => false}}
824
824
  request(api_name, api_spec, params)
825
825
  end
826
826
 
827
827
  # indices.split
828
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html", "description"=>"Allows you to split an existing index into a new index with more primary shards."}
828
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html", "description" => "Allows you to split an existing index into a new index with more primary shards."}
829
829
  def indices_split(params = {})
830
830
  api_name = 'indices.split'
831
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html", "description"=>"Allows you to split an existing index into a new index with more primary shards."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}/_split/{target}", "methods"=>["PUT", "POST"], "parts"=>{"index"=>{"type"=>"string", "description"=>"The name of the source index to split"}, "target"=>{"type"=>"string", "description"=>"The name of the target index to split into"}}}]}, "params"=>{"copy_settings"=>{"type"=>"boolean", "description"=>"whether or not to copy settings from the source index (defaults to false)"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Set the number of active shards to wait for on the shrunken index before the operation returns."}}, "body"=>{"description"=>"The configuration for the target index (`settings` and `aliases`)"}}
831
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html", "description" => "Allows you to split an existing index into a new index with more primary shards."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}/_split/{target}", "methods" => ["PUT", "POST"], "parts" => {"index" => {"type" => "string", "description" => "The name of the source index to split"}, "target" => {"type" => "string", "description" => "The name of the target index to split into"}}}]}, "params" => {"copy_settings" => {"type" => "boolean", "description" => "whether or not to copy settings from the source index (defaults to false)"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}, "wait_for_active_shards" => {"type" => "string", "description" => "Set the number of active shards to wait for on the shrunken index before the operation returns."}}, "body" => {"description" => "The configuration for the target index (`settings` and `aliases`)"}}
832
832
  request(api_name, api_spec, params)
833
833
  end
834
834
 
835
835
  # indices.stats
836
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html", "description"=>"Provides statistics on operations happening in an index."}
836
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html", "description" => "Provides statistics on operations happening in an index."}
837
837
  def indices_stats(params = {})
838
838
  api_name = 'indices.stats'
839
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html", "description"=>"Provides statistics on operations happening in an index."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_stats", "methods"=>["GET"]}, {"path"=>"/_stats/{metric}", "methods"=>["GET"], "parts"=>{"metric"=>{"type"=>"list", "options"=>["_all", "completion", "docs", "fielddata", "query_cache", "flush", "get", "indexing", "merge", "request_cache", "refresh", "search", "segments", "store", "warmer", "suggest"], "description"=>"Limit the information returned the specific metrics."}}}, {"path"=>"/{index}/_stats", "methods"=>["GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}}, {"path"=>"/{index}/_stats/{metric}", "methods"=>["GET"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, "metric"=>{"type"=>"list", "options"=>["_all", "completion", "docs", "fielddata", "query_cache", "flush", "get", "indexing", "merge", "request_cache", "refresh", "search", "segments", "store", "warmer", "suggest"], "description"=>"Limit the information returned the specific metrics."}}}]}, "params"=>{"completion_fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)"}, "fielddata_fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` index metric (supports wildcards)"}, "fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)"}, "groups"=>{"type"=>"list", "description"=>"A comma-separated list of search groups for `search` index metric"}, "level"=>{"type"=>"enum", "description"=>"Return stats aggregated at cluster, index or shard level", "options"=>["cluster", "indices", "shards"], "default"=>"indices"}, "types"=>{"type"=>"list", "description"=>"A comma-separated list of document types for the `indexing` index metric"}, "include_segment_file_sizes"=>{"type"=>"boolean", "description"=>"Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)", "default"=>false}, "include_unloaded_segments"=>{"type"=>"boolean", "description"=>"If set to true segment stats will include stats for segments that are not currently loaded into memory", "default"=>false}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "forbid_closed_indices"=>{"type"=>"boolean", "description"=>"If set to false stats will also collected from closed indices if explicitly specified or if expand_wildcards expands to closed indices", "default"=>true}}}
839
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html", "description" => "Provides statistics on operations happening in an index."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_stats", "methods" => ["GET"]}, {"path" => "/_stats/{metric}", "methods" => ["GET"], "parts" => {"metric" => {"type" => "list", "options" => ["_all", "completion", "docs", "fielddata", "query_cache", "flush", "get", "indexing", "merge", "request_cache", "refresh", "search", "segments", "store", "warmer", "suggest"], "description" => "Limit the information returned the specific metrics."}}}, {"path" => "/{index}/_stats", "methods" => ["GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}}, {"path" => "/{index}/_stats/{metric}", "methods" => ["GET"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, "metric" => {"type" => "list", "options" => ["_all", "completion", "docs", "fielddata", "query_cache", "flush", "get", "indexing", "merge", "request_cache", "refresh", "search", "segments", "store", "warmer", "suggest"], "description" => "Limit the information returned the specific metrics."}}}]}, "params" => {"completion_fields" => {"type" => "list", "description" => "A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)"}, "fielddata_fields" => {"type" => "list", "description" => "A comma-separated list of fields for `fielddata` index metric (supports wildcards)"}, "fields" => {"type" => "list", "description" => "A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)"}, "groups" => {"type" => "list", "description" => "A comma-separated list of search groups for `search` index metric"}, "level" => {"type" => "enum", "description" => "Return stats aggregated at cluster, index or shard level", "options" => ["cluster", "indices", "shards"], "default" => "indices"}, "types" => {"type" => "list", "description" => "A comma-separated list of document types for the `indexing` index metric"}, "include_segment_file_sizes" => {"type" => "boolean", "description" => "Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)", "default" => false}, "include_unloaded_segments" => {"type" => "boolean", "description" => "If set to true segment stats will include stats for segments that are not currently loaded into memory", "default" => false}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "forbid_closed_indices" => {"type" => "boolean", "description" => "If set to false stats will also collected from closed indices if explicitly specified or if expand_wildcards expands to closed indices", "default" => true}}}
840
840
  request(api_name, api_spec, params)
841
841
  end
842
842
 
843
843
  # indices.update_aliases
844
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "description"=>"Updates index aliases."}
844
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "description" => "Updates index aliases."}
845
845
  def indices_update_aliases(params = {})
846
846
  api_name = 'indices.update_aliases'
847
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "description"=>"Updates index aliases."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_aliases", "methods"=>["POST"]}]}, "params"=>{"timeout"=>{"type"=>"time", "description"=>"Request timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}}, "body"=>{"description"=>"The definition of `actions` to perform", "required"=>true}}
847
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "description" => "Updates index aliases."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_aliases", "methods" => ["POST"]}]}, "params" => {"timeout" => {"type" => "time", "description" => "Request timeout"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}}, "body" => {"description" => "The definition of `actions` to perform", "required" => true}}
848
848
  request(api_name, api_spec, params)
849
849
  end
850
850
 
851
851
  # indices.upgrade
852
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html", "description"=>"The _upgrade API is no longer useful and will be removed."}
852
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html", "description" => "The _upgrade API is no longer useful and will be removed."}
853
853
  def indices_upgrade(params = {})
854
854
  api_name = 'indices.upgrade'
855
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html", "description"=>"The _upgrade API is no longer useful and will be removed."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_upgrade", "methods"=>["POST"]}, {"path"=>"/{index}/_upgrade", "methods"=>["POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}}]}, "params"=>{"allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "wait_for_completion"=>{"type"=>"boolean", "description"=>"Specify whether the request should block until the all segments are upgraded (default: false)"}, "only_ancient_segments"=>{"type"=>"boolean", "description"=>"If true, only ancient (an older Lucene major release) segments will be upgraded"}}}
855
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html", "description" => "The _upgrade API is no longer useful and will be removed."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_upgrade", "methods" => ["POST"]}, {"path" => "/{index}/_upgrade", "methods" => ["POST"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}}]}, "params" => {"allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "wait_for_completion" => {"type" => "boolean", "description" => "Specify whether the request should block until the all segments are upgraded (default: false)"}, "only_ancient_segments" => {"type" => "boolean", "description" => "If true, only ancient (an older Lucene major release) segments will be upgraded"}}}
856
856
  request(api_name, api_spec, params)
857
857
  end
858
858
 
859
859
  # indices.validate_query
860
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html", "description"=>"Allows a user to validate a potentially expensive query without executing it."}
860
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html", "description" => "Allows a user to validate a potentially expensive query without executing it."}
861
861
  def indices_validate_query(params = {})
862
862
  api_name = 'indices.validate_query'
863
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html", "description"=>"Allows a user to validate a potentially expensive query without executing it."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_validate/query", "methods"=>["GET", "POST"]}, {"path"=>"/{index}/_validate/query", "methods"=>["GET", "POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices"}}}, {"path"=>"/{index}/{type}/_validate/query", "methods"=>["GET", "POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices"}, "type"=>{"type"=>"list", "description"=>"A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types", "deprecated"=>true}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"explain"=>{"type"=>"boolean", "description"=>"Return detailed information about the error"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "q"=>{"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, "analyzer"=>{"type"=>"string", "description"=>"The analyzer to use for the query string"}, "analyze_wildcard"=>{"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, "default_operator"=>{"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, "df"=>{"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, "lenient"=>{"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "rewrite"=>{"type"=>"boolean", "description"=>"Provide a more detailed explanation showing the actual Lucene query that will be executed."}, "all_shards"=>{"type"=>"boolean", "description"=>"Execute validation on all shards instead of one random shard per index"}}, "body"=>{"description"=>"The query definition specified with the Query DSL"}}
863
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html", "description" => "Allows a user to validate a potentially expensive query without executing it."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_validate/query", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_validate/query", "methods" => ["GET", "POST"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices"}}}, {"path" => "/{index}/{type}/_validate/query", "methods" => ["GET", "POST"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices"}, "type" => {"type" => "list", "description" => "A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types", "deprecated" => true}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"explain" => {"type" => "boolean", "description" => "Return detailed information about the error"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "q" => {"type" => "string", "description" => "Query in the Lucene query string syntax"}, "analyzer" => {"type" => "string", "description" => "The analyzer to use for the query string"}, "analyze_wildcard" => {"type" => "boolean", "description" => "Specify whether wildcard and prefix queries should be analyzed (default: false)"}, "default_operator" => {"type" => "enum", "options" => ["AND", "OR"], "default" => "OR", "description" => "The default operator for query string query (AND or OR)"}, "df" => {"type" => "string", "description" => "The field to use as default where no field prefix is given in the query string"}, "lenient" => {"type" => "boolean", "description" => "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "rewrite" => {"type" => "boolean", "description" => "Provide a more detailed explanation showing the actual Lucene query that will be executed."}, "all_shards" => {"type" => "boolean", "description" => "Execute validation on all shards instead of one random shard per index"}}, "body" => {"description" => "The query definition specified with the Query DSL"}}
864
864
  request(api_name, api_spec, params)
865
865
  end
866
866
 
867
867
  # info
868
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html", "description"=>"Returns basic information about the cluster."}
868
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html", "description" => "Returns basic information about the cluster."}
869
869
  def info(params = {})
870
870
  api_name = 'info'
871
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html", "description"=>"Returns basic information about the cluster."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/", "methods"=>["GET"]}]}, "params"=>{}}
871
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html", "description" => "Returns basic information about the cluster."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/", "methods" => ["GET"]}]}, "params" => {}}
872
872
  request(api_name, api_spec, params)
873
873
  end
874
874
 
875
875
  # ingest.delete_pipeline
876
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-pipeline-api.html", "description"=>"Deletes a pipeline."}
876
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-pipeline-api.html", "description" => "Deletes a pipeline."}
877
877
  def ingest_delete_pipeline(params = {})
878
878
  api_name = 'ingest.delete_pipeline'
879
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-pipeline-api.html", "description"=>"Deletes a pipeline."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_ingest/pipeline/{id}", "methods"=>["DELETE"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Pipeline ID"}}}]}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}}
879
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-pipeline-api.html", "description" => "Deletes a pipeline."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_ingest/pipeline/{id}", "methods" => ["DELETE"], "parts" => {"id" => {"type" => "string", "description" => "Pipeline ID"}}}]}, "params" => {"master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}}}
880
880
  request(api_name, api_spec, params)
881
881
  end
882
882
 
883
883
  # ingest.get_pipeline
884
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html", "description"=>"Returns a pipeline."}
884
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html", "description" => "Returns a pipeline."}
885
885
  def ingest_get_pipeline(params = {})
886
886
  api_name = 'ingest.get_pipeline'
887
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html", "description"=>"Returns a pipeline."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_ingest/pipeline", "methods"=>["GET"]}, {"path"=>"/_ingest/pipeline/{id}", "methods"=>["GET"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Comma separated list of pipeline ids. Wildcards supported"}}}]}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}}}
887
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html", "description" => "Returns a pipeline."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_ingest/pipeline", "methods" => ["GET"]}, {"path" => "/_ingest/pipeline/{id}", "methods" => ["GET"], "parts" => {"id" => {"type" => "string", "description" => "Comma separated list of pipeline ids. Wildcards supported"}}}]}, "params" => {"master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}}}
888
888
  request(api_name, api_spec, params)
889
889
  end
890
890
 
891
891
  # ingest.processor_grok
892
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get", "description"=>"Returns a list of the built-in patterns."}
892
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get", "description" => "Returns a list of the built-in patterns."}
893
893
  def ingest_processor_grok(params = {})
894
894
  api_name = 'ingest.processor_grok'
895
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get", "description"=>"Returns a list of the built-in patterns."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_ingest/processor/grok", "methods"=>["GET"]}]}, "params"=>{}}
895
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get", "description" => "Returns a list of the built-in patterns."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_ingest/processor/grok", "methods" => ["GET"]}]}, "params" => {}}
896
896
  request(api_name, api_spec, params)
897
897
  end
898
898
 
899
899
  # ingest.put_pipeline
900
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html", "description"=>"Creates or updates a pipeline."}
900
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html", "description" => "Creates or updates a pipeline."}
901
901
  def ingest_put_pipeline(params = {})
902
902
  api_name = 'ingest.put_pipeline'
903
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html", "description"=>"Creates or updates a pipeline."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_ingest/pipeline/{id}", "methods"=>["PUT"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Pipeline ID"}}}]}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}, "body"=>{"description"=>"The ingest definition", "required"=>true}}
903
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html", "description" => "Creates or updates a pipeline."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_ingest/pipeline/{id}", "methods" => ["PUT"], "parts" => {"id" => {"type" => "string", "description" => "Pipeline ID"}}}]}, "params" => {"master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}}, "body" => {"description" => "The ingest definition", "required" => true}}
904
904
  request(api_name, api_spec, params)
905
905
  end
906
906
 
907
907
  # ingest.simulate
908
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html", "description"=>"Allows to simulate a pipeline with example documents."}
908
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html", "description" => "Allows to simulate a pipeline with example documents."}
909
909
  def ingest_simulate(params = {})
910
910
  api_name = 'ingest.simulate'
911
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html", "description"=>"Allows to simulate a pipeline with example documents."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_ingest/pipeline/_simulate", "methods"=>["GET", "POST"]}, {"path"=>"/_ingest/pipeline/{id}/_simulate", "methods"=>["GET", "POST"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Pipeline ID"}}}]}, "params"=>{"verbose"=>{"type"=>"boolean", "description"=>"Verbose mode. Display data output for each processor in executed pipeline", "default"=>false}}, "body"=>{"description"=>"The simulate definition", "required"=>true}}
911
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html", "description" => "Allows to simulate a pipeline with example documents."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_ingest/pipeline/_simulate", "methods" => ["GET", "POST"]}, {"path" => "/_ingest/pipeline/{id}/_simulate", "methods" => ["GET", "POST"], "parts" => {"id" => {"type" => "string", "description" => "Pipeline ID"}}}]}, "params" => {"verbose" => {"type" => "boolean", "description" => "Verbose mode. Display data output for each processor in executed pipeline", "default" => false}}, "body" => {"description" => "The simulate definition", "required" => true}}
912
912
  request(api_name, api_spec, params)
913
913
  end
914
914
 
915
915
  # mget
916
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html", "description"=>"Allows to get multiple documents in one request."}
916
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html", "description" => "Allows to get multiple documents in one request."}
917
917
  def mget(params = {})
918
918
  api_name = 'mget'
919
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html", "description"=>"Allows to get multiple documents in one request."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_mget", "methods"=>["GET", "POST"]}, {"path"=>"/{index}/_mget", "methods"=>["GET", "POST"], "parts"=>{"index"=>{"type"=>"string", "description"=>"The name of the index"}}}, {"path"=>"/{index}/{type}/_mget", "methods"=>["GET", "POST"], "parts"=>{"index"=>{"type"=>"string", "description"=>"The name of the index"}, "type"=>{"type"=>"string", "description"=>"The type of the document", "deprecated"=>true}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"stored_fields"=>{"type"=>"list", "description"=>"A comma-separated list of stored fields to return in the response"}, "preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "realtime"=>{"type"=>"boolean", "description"=>"Specify whether to perform the operation in realtime or search mode"}, "refresh"=>{"type"=>"boolean", "description"=>"Refresh the shard containing the document before performing the operation"}, "routing"=>{"type"=>"string", "description"=>"Specific routing value"}, "_source"=>{"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_excludes"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_includes"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}}, "body"=>{"description"=>"Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL.", "required"=>true}}
919
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html", "description" => "Allows to get multiple documents in one request."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_mget", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_mget", "methods" => ["GET", "POST"], "parts" => {"index" => {"type" => "string", "description" => "The name of the index"}}}, {"path" => "/{index}/{type}/_mget", "methods" => ["GET", "POST"], "parts" => {"index" => {"type" => "string", "description" => "The name of the index"}, "type" => {"type" => "string", "description" => "The type of the document", "deprecated" => true}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"stored_fields" => {"type" => "list", "description" => "A comma-separated list of stored fields to return in the response"}, "preference" => {"type" => "string", "description" => "Specify the node or shard the operation should be performed on (default: random)"}, "realtime" => {"type" => "boolean", "description" => "Specify whether to perform the operation in realtime or search mode"}, "refresh" => {"type" => "boolean", "description" => "Refresh the shard containing the document before performing the operation"}, "routing" => {"type" => "string", "description" => "Specific routing value"}, "_source" => {"type" => "list", "description" => "True or false to return the _source field or not, or a list of fields to return"}, "_source_excludes" => {"type" => "list", "description" => "A list of fields to exclude from the returned _source field"}, "_source_includes" => {"type" => "list", "description" => "A list of fields to extract and return from the _source field"}}, "body" => {"description" => "Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL.", "required" => true}}
920
920
  request(api_name, api_spec, params)
921
921
  end
922
922
 
923
923
  # msearch
924
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html", "description"=>"Allows to execute several search operations in one request."}
924
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html", "description" => "Allows to execute several search operations in one request."}
925
925
  def msearch(params = {})
926
926
  api_name = 'msearch'
927
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html", "description"=>"Allows to execute several search operations in one request."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_msearch", "methods"=>["GET", "POST"]}, {"path"=>"/{index}/_msearch", "methods"=>["GET", "POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to use as default"}}}, {"path"=>"/{index}/{type}/_msearch", "methods"=>["GET", "POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to use as default"}, "type"=>{"type"=>"list", "description"=>"A comma-separated list of document types to use as default"}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"search_type"=>{"type"=>"enum", "options"=>["query_then_fetch", "query_and_fetch", "dfs_query_then_fetch", "dfs_query_and_fetch"], "description"=>"Search operation type"}, "max_concurrent_searches"=>{"type"=>"number", "description"=>"Controls the maximum number of concurrent searches the multi search api will execute"}, "typed_keys"=>{"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, "pre_filter_shard_size"=>{"type"=>"number", "description"=>"A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint."}, "max_concurrent_shard_requests"=>{"type"=>"number", "description"=>"The number of concurrent shard requests each sub search executes concurrently per node. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests", "default"=>5}, "rest_total_hits_as_int"=>{"type"=>"boolean", "description"=>"Indicates whether hits.total should be rendered as an integer or an object in the rest search response", "default"=>false}, "ccs_minimize_roundtrips"=>{"type"=>"boolean", "description"=>"Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", "default"=>"true"}}, "body"=>{"description"=>"The request definitions (metadata-search request definition pairs), separated by newlines", "required"=>true, "serialize"=>"bulk"}}
927
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html", "description" => "Allows to execute several search operations in one request."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_msearch", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_msearch", "methods" => ["GET", "POST"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names to use as default"}}}, {"path" => "/{index}/{type}/_msearch", "methods" => ["GET", "POST"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names to use as default"}, "type" => {"type" => "list", "description" => "A comma-separated list of document types to use as default"}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"search_type" => {"type" => "enum", "options" => ["query_then_fetch", "query_and_fetch", "dfs_query_then_fetch", "dfs_query_and_fetch"], "description" => "Search operation type"}, "max_concurrent_searches" => {"type" => "number", "description" => "Controls the maximum number of concurrent searches the multi search api will execute"}, "typed_keys" => {"type" => "boolean", "description" => "Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, "pre_filter_shard_size" => {"type" => "number", "description" => "A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint."}, "max_concurrent_shard_requests" => {"type" => "number", "description" => "The number of concurrent shard requests each sub search executes concurrently per node. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests", "default" => 5}, "rest_total_hits_as_int" => {"type" => "boolean", "description" => "Indicates whether hits.total should be rendered as an integer or an object in the rest search response", "default" => false}, "ccs_minimize_roundtrips" => {"type" => "boolean", "description" => "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", "default" => "true"}}, "body" => {"description" => "The request definitions (metadata-search request definition pairs), separated by newlines", "required" => true, "serialize" => "bulk"}}
928
928
  request(api_name, api_spec, params)
929
929
  end
930
930
 
931
931
  # msearch_template
932
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html", "description"=>"Allows to execute several search template operations in one request."}
932
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html", "description" => "Allows to execute several search template operations in one request."}
933
933
  def msearch_template(params = {})
934
934
  api_name = 'msearch_template'
935
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html", "description"=>"Allows to execute several search template operations in one request."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_msearch/template", "methods"=>["GET", "POST"]}, {"path"=>"/{index}/_msearch/template", "methods"=>["GET", "POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to use as default"}}}, {"path"=>"/{index}/{type}/_msearch/template", "methods"=>["GET", "POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to use as default"}, "type"=>{"type"=>"list", "description"=>"A comma-separated list of document types to use as default"}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"search_type"=>{"type"=>"enum", "options"=>["query_then_fetch", "query_and_fetch", "dfs_query_then_fetch", "dfs_query_and_fetch"], "description"=>"Search operation type"}, "typed_keys"=>{"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, "max_concurrent_searches"=>{"type"=>"number", "description"=>"Controls the maximum number of concurrent searches the multi search api will execute"}, "rest_total_hits_as_int"=>{"type"=>"boolean", "description"=>"Indicates whether hits.total should be rendered as an integer or an object in the rest search response", "default"=>false}, "ccs_minimize_roundtrips"=>{"type"=>"boolean", "description"=>"Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", "default"=>"true"}}, "body"=>{"description"=>"The request definitions (metadata-search request definition pairs), separated by newlines", "required"=>true, "serialize"=>"bulk"}}
935
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html", "description" => "Allows to execute several search template operations in one request."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_msearch/template", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_msearch/template", "methods" => ["GET", "POST"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names to use as default"}}}, {"path" => "/{index}/{type}/_msearch/template", "methods" => ["GET", "POST"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names to use as default"}, "type" => {"type" => "list", "description" => "A comma-separated list of document types to use as default"}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"search_type" => {"type" => "enum", "options" => ["query_then_fetch", "query_and_fetch", "dfs_query_then_fetch", "dfs_query_and_fetch"], "description" => "Search operation type"}, "typed_keys" => {"type" => "boolean", "description" => "Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, "max_concurrent_searches" => {"type" => "number", "description" => "Controls the maximum number of concurrent searches the multi search api will execute"}, "rest_total_hits_as_int" => {"type" => "boolean", "description" => "Indicates whether hits.total should be rendered as an integer or an object in the rest search response", "default" => false}, "ccs_minimize_roundtrips" => {"type" => "boolean", "description" => "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", "default" => "true"}}, "body" => {"description" => "The request definitions (metadata-search request definition pairs), separated by newlines", "required" => true, "serialize" => "bulk"}}
936
936
  request(api_name, api_spec, params)
937
937
  end
938
938
 
939
939
  # mtermvectors
940
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html", "description"=>"Returns multiple termvectors in one request."}
940
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html", "description" => "Returns multiple termvectors in one request."}
941
941
  def mtermvectors(params = {})
942
942
  api_name = 'mtermvectors'
943
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html", "description"=>"Returns multiple termvectors in one request."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_mtermvectors", "methods"=>["GET", "POST"]}, {"path"=>"/{index}/_mtermvectors", "methods"=>["GET", "POST"], "parts"=>{"index"=>{"type"=>"string", "description"=>"The index in which the document resides."}}}, {"path"=>"/{index}/{type}/_mtermvectors", "methods"=>["GET", "POST"], "parts"=>{"index"=>{"type"=>"string", "description"=>"The index in which the document resides."}, "type"=>{"type"=>"string", "description"=>"The type of the document."}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"ids"=>{"type"=>"list", "description"=>"A comma-separated list of documents ids. You must define ids as parameter or set \"ids\" or \"docs\" in the request body"}, "term_statistics"=>{"type"=>"boolean", "description"=>"Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default"=>false}, "field_statistics"=>{"type"=>"boolean", "description"=>"Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default"=>true}, "fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."}, "offsets"=>{"type"=>"boolean", "description"=>"Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default"=>true}, "positions"=>{"type"=>"boolean", "description"=>"Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default"=>true}, "payloads"=>{"type"=>"boolean", "description"=>"Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default"=>true}, "preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."}, "routing"=>{"type"=>"string", "description"=>"Specific routing value. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."}, "realtime"=>{"type"=>"boolean", "description"=>"Specifies if requests are real-time as opposed to near-real-time (default: true)."}, "version"=>{"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type"=>{"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}}, "body"=>{"description"=>"Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation.", "required"=>false}}
943
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html", "description" => "Returns multiple termvectors in one request."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_mtermvectors", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_mtermvectors", "methods" => ["GET", "POST"], "parts" => {"index" => {"type" => "string", "description" => "The index in which the document resides."}}}, {"path" => "/{index}/{type}/_mtermvectors", "methods" => ["GET", "POST"], "parts" => {"index" => {"type" => "string", "description" => "The index in which the document resides."}, "type" => {"type" => "string", "description" => "The type of the document."}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"ids" => {"type" => "list", "description" => "A comma-separated list of documents ids. You must define ids as parameter or set \"ids\" or \"docs\" in the request body"}, "term_statistics" => {"type" => "boolean", "description" => "Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default" => false}, "field_statistics" => {"type" => "boolean", "description" => "Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default" => true}, "fields" => {"type" => "list", "description" => "A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."}, "offsets" => {"type" => "boolean", "description" => "Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default" => true}, "positions" => {"type" => "boolean", "description" => "Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default" => true}, "payloads" => {"type" => "boolean", "description" => "Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default" => true}, "preference" => {"type" => "string", "description" => "Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."}, "routing" => {"type" => "string", "description" => "Specific routing value. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."}, "realtime" => {"type" => "boolean", "description" => "Specifies if requests are real-time as opposed to near-real-time (default: true)."}, "version" => {"type" => "number", "description" => "Explicit version number for concurrency control"}, "version_type" => {"type" => "enum", "options" => ["internal", "external", "external_gte", "force"], "description" => "Specific version type"}}, "body" => {"description" => "Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation.", "required" => false}}
944
944
  request(api_name, api_spec, params)
945
945
  end
946
946
 
947
947
  # nodes.hot_threads
948
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html", "description"=>"Returns information about hot threads on each node in the cluster."}
948
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html", "description" => "Returns information about hot threads on each node in the cluster."}
949
949
  def nodes_hot_threads(params = {})
950
950
  api_name = 'nodes.hot_threads'
951
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html", "description"=>"Returns information about hot threads on each node in the cluster."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_nodes/hot_threads", "methods"=>["GET"]}, {"path"=>"/_nodes/{node_id}/hot_threads", "methods"=>["GET"], "parts"=>{"node_id"=>{"type"=>"list", "description"=>"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"}}}, {"path"=>"/_cluster/nodes/hotthreads", "methods"=>["GET"], "parts"=>{}, "deprecated"=>{"version"=>"7.0.0", "description"=>"The hot threads API accepts `hotthreads` but only `hot_threads` is documented"}}, {"path"=>"/_cluster/nodes/{node_id}/hotthreads", "methods"=>["GET"], "parts"=>{"node_id"=>{"type"=>"list", "description"=>"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"}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"The hot threads API accepts `hotthreads` but only `hot_threads` is documented"}}, {"path"=>"/_nodes/hotthreads", "methods"=>["GET"], "parts"=>{}, "deprecated"=>{"version"=>"7.0.0", "description"=>"The hot threads API accepts `hotthreads` but only `hot_threads` is documented"}}, {"path"=>"/_nodes/{node_id}/hotthreads", "methods"=>["GET"], "parts"=>{"node_id"=>{"type"=>"list", "description"=>"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"}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"The hot threads API accepts `hotthreads` but only `hot_threads` is documented"}}, {"path"=>"/_cluster/nodes/hot_threads", "methods"=>["GET"], "parts"=>{}, "deprecated"=>{"version"=>"7.0.0", "description"=>"The hot accepts /_cluster/nodes as prefix for backwards compatibility reasons"}}, {"path"=>"/_cluster/nodes/{node_id}/hot_threads", "methods"=>["GET"], "parts"=>{"node_id"=>{"type"=>"list", "description"=>"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"}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"The hot accepts /_cluster/nodes as prefix for backwards compatibility reasons"}}]}, "params"=>{"interval"=>{"type"=>"time", "description"=>"The interval for the second sampling of threads"}, "snapshots"=>{"type"=>"number", "description"=>"Number of samples of thread stacktrace (default: 10)"}, "threads"=>{"type"=>"number", "description"=>"Specify the number of threads to provide information for (default: 3)"}, "ignore_idle_threads"=>{"type"=>"boolean", "description"=>"Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)"}, "type"=>{"type"=>"enum", "options"=>["cpu", "wait", "block"], "description"=>"The type to sample (default: cpu)"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}}
951
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html", "description" => "Returns information about hot threads on each node in the cluster."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_nodes/hot_threads", "methods" => ["GET"]}, {"path" => "/_nodes/{node_id}/hot_threads", "methods" => ["GET"], "parts" => {"node_id" => {"type" => "list", "description" => "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"}}}, {"path" => "/_cluster/nodes/hotthreads", "methods" => ["GET"], "parts" => {}, "deprecated" => {"version" => "7.0.0", "description" => "The hot threads API accepts `hotthreads` but only `hot_threads` is documented"}}, {"path" => "/_cluster/nodes/{node_id}/hotthreads", "methods" => ["GET"], "parts" => {"node_id" => {"type" => "list", "description" => "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"}}, "deprecated" => {"version" => "7.0.0", "description" => "The hot threads API accepts `hotthreads` but only `hot_threads` is documented"}}, {"path" => "/_nodes/hotthreads", "methods" => ["GET"], "parts" => {}, "deprecated" => {"version" => "7.0.0", "description" => "The hot threads API accepts `hotthreads` but only `hot_threads` is documented"}}, {"path" => "/_nodes/{node_id}/hotthreads", "methods" => ["GET"], "parts" => {"node_id" => {"type" => "list", "description" => "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"}}, "deprecated" => {"version" => "7.0.0", "description" => "The hot threads API accepts `hotthreads` but only `hot_threads` is documented"}}, {"path" => "/_cluster/nodes/hot_threads", "methods" => ["GET"], "parts" => {}, "deprecated" => {"version" => "7.0.0", "description" => "The hot accepts /_cluster/nodes as prefix for backwards compatibility reasons"}}, {"path" => "/_cluster/nodes/{node_id}/hot_threads", "methods" => ["GET"], "parts" => {"node_id" => {"type" => "list", "description" => "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"}}, "deprecated" => {"version" => "7.0.0", "description" => "The hot accepts /_cluster/nodes as prefix for backwards compatibility reasons"}}]}, "params" => {"interval" => {"type" => "time", "description" => "The interval for the second sampling of threads"}, "snapshots" => {"type" => "number", "description" => "Number of samples of thread stacktrace (default: 10)"}, "threads" => {"type" => "number", "description" => "Specify the number of threads to provide information for (default: 3)"}, "ignore_idle_threads" => {"type" => "boolean", "description" => "Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)"}, "type" => {"type" => "enum", "options" => ["cpu", "wait", "block"], "description" => "The type to sample (default: cpu)"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}}}
952
952
  request(api_name, api_spec, params)
953
953
  end
954
954
 
955
955
  # nodes.info
956
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html", "description"=>"Returns information about nodes in the cluster."}
956
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html", "description" => "Returns information about nodes in the cluster."}
957
957
  def nodes_info(params = {})
958
958
  api_name = 'nodes.info'
959
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html", "description"=>"Returns information about nodes in the cluster."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_nodes", "methods"=>["GET"]}, {"path"=>"/_nodes/{node_id}", "methods"=>["GET"], "parts"=>{"node_id"=>{"type"=>"list", "description"=>"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"}}}, {"path"=>"/_nodes/{metric}", "methods"=>["GET"], "parts"=>{"metric"=>{"type"=>"list", "options"=>["settings", "os", "process", "jvm", "thread_pool", "transport", "http", "plugins", "ingest"], "description"=>"A comma-separated list of metrics you wish returned. Leave empty to return all."}}}, {"path"=>"/_nodes/{node_id}/{metric}", "methods"=>["GET"], "parts"=>{"node_id"=>{"type"=>"list", "description"=>"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"}, "metric"=>{"type"=>"list", "options"=>["settings", "os", "process", "jvm", "thread_pool", "transport", "http", "plugins", "ingest"], "description"=>"A comma-separated list of metrics you wish returned. Leave empty to return all."}}}]}, "params"=>{"flat_settings"=>{"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}}
959
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html", "description" => "Returns information about nodes in the cluster."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_nodes", "methods" => ["GET"]}, {"path" => "/_nodes/{node_id}", "methods" => ["GET"], "parts" => {"node_id" => {"type" => "list", "description" => "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"}}}, {"path" => "/_nodes/{metric}", "methods" => ["GET"], "parts" => {"metric" => {"type" => "list", "options" => ["settings", "os", "process", "jvm", "thread_pool", "transport", "http", "plugins", "ingest"], "description" => "A comma-separated list of metrics you wish returned. Leave empty to return all."}}}, {"path" => "/_nodes/{node_id}/{metric}", "methods" => ["GET"], "parts" => {"node_id" => {"type" => "list", "description" => "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"}, "metric" => {"type" => "list", "options" => ["settings", "os", "process", "jvm", "thread_pool", "transport", "http", "plugins", "ingest"], "description" => "A comma-separated list of metrics you wish returned. Leave empty to return all."}}}]}, "params" => {"flat_settings" => {"type" => "boolean", "description" => "Return settings in flat format (default: false)"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}}}
960
960
  request(api_name, api_spec, params)
961
961
  end
962
962
 
963
963
  # nodes.reload_secure_settings
964
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings", "description"=>"Reloads secure settings."}
964
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings", "description" => "Reloads secure settings."}
965
965
  def nodes_reload_secure_settings(params = {})
966
966
  api_name = 'nodes.reload_secure_settings'
967
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings", "description"=>"Reloads secure settings."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_nodes/reload_secure_settings", "methods"=>["POST"]}, {"path"=>"/_nodes/{node_id}/reload_secure_settings", "methods"=>["POST"], "parts"=>{"node_id"=>{"type"=>"list", "description"=>"A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes."}}}]}, "params"=>{"timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}, "body"=>{"description"=>"An object containing the password for the opensearch keystore", "required"=>false}}
967
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings", "description" => "Reloads secure settings."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_nodes/reload_secure_settings", "methods" => ["POST"]}, {"path" => "/_nodes/{node_id}/reload_secure_settings", "methods" => ["POST"], "parts" => {"node_id" => {"type" => "list", "description" => "A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes."}}}]}, "params" => {"timeout" => {"type" => "time", "description" => "Explicit operation timeout"}}, "body" => {"description" => "An object containing the password for the opensearch keystore", "required" => false}}
968
968
  request(api_name, api_spec, params)
969
969
  end
970
970
 
971
971
  # nodes.stats
972
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html", "description"=>"Returns statistical information about nodes in the cluster."}
972
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html", "description" => "Returns statistical information about nodes in the cluster."}
973
973
  def nodes_stats(params = {})
974
974
  api_name = 'nodes.stats'
975
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html", "description"=>"Returns statistical information about nodes in the cluster."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_nodes/stats", "methods"=>["GET"]}, {"path"=>"/_nodes/{node_id}/stats", "methods"=>["GET"], "parts"=>{"node_id"=>{"type"=>"list", "description"=>"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"}}}, {"path"=>"/_nodes/stats/{metric}", "methods"=>["GET"], "parts"=>{"metric"=>{"type"=>"list", "options"=>["_all", "breaker", "fs", "http", "indices", "jvm", "os", "process", "thread_pool", "transport", "discovery", "indexing_pressure"], "description"=>"Limit the information returned to the specified metrics"}}}, {"path"=>"/_nodes/{node_id}/stats/{metric}", "methods"=>["GET"], "parts"=>{"metric"=>{"type"=>"list", "options"=>["_all", "breaker", "fs", "http", "indices", "jvm", "os", "process", "thread_pool", "transport", "discovery", "indexing_pressure"], "description"=>"Limit the information returned to the specified metrics"}, "node_id"=>{"type"=>"list", "description"=>"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"}}}, {"path"=>"/_nodes/stats/{metric}/{index_metric}", "methods"=>["GET"], "parts"=>{"metric"=>{"type"=>"list", "options"=>["_all", "breaker", "fs", "http", "indices", "jvm", "os", "process", "thread_pool", "transport", "discovery", "indexing_pressure"], "description"=>"Limit the information returned to the specified metrics"}, "index_metric"=>{"type"=>"list", "options"=>["_all", "completion", "docs", "fielddata", "query_cache", "flush", "get", "indexing", "merge", "request_cache", "refresh", "search", "segments", "store", "warmer", "suggest"], "description"=>"Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified."}}}, {"path"=>"/_nodes/{node_id}/stats/{metric}/{index_metric}", "methods"=>["GET"], "parts"=>{"metric"=>{"type"=>"list", "options"=>["_all", "breaker", "fs", "http", "indices", "jvm", "os", "process", "thread_pool", "transport", "discovery", "indexing_pressure"], "description"=>"Limit the information returned to the specified metrics"}, "index_metric"=>{"type"=>"list", "options"=>["_all", "completion", "docs", "fielddata", "query_cache", "flush", "get", "indexing", "merge", "request_cache", "refresh", "search", "segments", "store", "warmer", "suggest"], "description"=>"Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified."}, "node_id"=>{"type"=>"list", "description"=>"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"}}}]}, "params"=>{"completion_fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)"}, "fielddata_fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` index metric (supports wildcards)"}, "fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)"}, "groups"=>{"type"=>"boolean", "description"=>"A comma-separated list of search groups for `search` index metric"}, "level"=>{"type"=>"enum", "description"=>"Return indices stats aggregated at index, node or shard level", "options"=>["indices", "node", "shards"], "default"=>"node"}, "types"=>{"type"=>"list", "description"=>"A comma-separated list of document types for the `indexing` index metric"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "include_segment_file_sizes"=>{"type"=>"boolean", "description"=>"Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)", "default"=>false}}}
975
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html", "description" => "Returns statistical information about nodes in the cluster."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_nodes/stats", "methods" => ["GET"]}, {"path" => "/_nodes/{node_id}/stats", "methods" => ["GET"], "parts" => {"node_id" => {"type" => "list", "description" => "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"}}}, {"path" => "/_nodes/stats/{metric}", "methods" => ["GET"], "parts" => {"metric" => {"type" => "list", "options" => ["_all", "breaker", "fs", "http", "indices", "jvm", "os", "process", "thread_pool", "transport", "discovery", "indexing_pressure"], "description" => "Limit the information returned to the specified metrics"}}}, {"path" => "/_nodes/{node_id}/stats/{metric}", "methods" => ["GET"], "parts" => {"metric" => {"type" => "list", "options" => ["_all", "breaker", "fs", "http", "indices", "jvm", "os", "process", "thread_pool", "transport", "discovery", "indexing_pressure"], "description" => "Limit the information returned to the specified metrics"}, "node_id" => {"type" => "list", "description" => "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"}}}, {"path" => "/_nodes/stats/{metric}/{index_metric}", "methods" => ["GET"], "parts" => {"metric" => {"type" => "list", "options" => ["_all", "breaker", "fs", "http", "indices", "jvm", "os", "process", "thread_pool", "transport", "discovery", "indexing_pressure"], "description" => "Limit the information returned to the specified metrics"}, "index_metric" => {"type" => "list", "options" => ["_all", "completion", "docs", "fielddata", "query_cache", "flush", "get", "indexing", "merge", "request_cache", "refresh", "search", "segments", "store", "warmer", "suggest"], "description" => "Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified."}}}, {"path" => "/_nodes/{node_id}/stats/{metric}/{index_metric}", "methods" => ["GET"], "parts" => {"metric" => {"type" => "list", "options" => ["_all", "breaker", "fs", "http", "indices", "jvm", "os", "process", "thread_pool", "transport", "discovery", "indexing_pressure"], "description" => "Limit the information returned to the specified metrics"}, "index_metric" => {"type" => "list", "options" => ["_all", "completion", "docs", "fielddata", "query_cache", "flush", "get", "indexing", "merge", "request_cache", "refresh", "search", "segments", "store", "warmer", "suggest"], "description" => "Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified."}, "node_id" => {"type" => "list", "description" => "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"}}}]}, "params" => {"completion_fields" => {"type" => "list", "description" => "A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)"}, "fielddata_fields" => {"type" => "list", "description" => "A comma-separated list of fields for `fielddata` index metric (supports wildcards)"}, "fields" => {"type" => "list", "description" => "A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)"}, "groups" => {"type" => "boolean", "description" => "A comma-separated list of search groups for `search` index metric"}, "level" => {"type" => "enum", "description" => "Return indices stats aggregated at index, node or shard level", "options" => ["indices", "node", "shards"], "default" => "node"}, "types" => {"type" => "list", "description" => "A comma-separated list of document types for the `indexing` index metric"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "include_segment_file_sizes" => {"type" => "boolean", "description" => "Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)", "default" => false}}}
976
976
  request(api_name, api_spec, params)
977
977
  end
978
978
 
979
979
  # nodes.usage
980
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html", "description"=>"Returns low-level information about REST actions usage on nodes."}
980
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html", "description" => "Returns low-level information about REST actions usage on nodes."}
981
981
  def nodes_usage(params = {})
982
982
  api_name = 'nodes.usage'
983
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html", "description"=>"Returns low-level information about REST actions usage on nodes."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_nodes/usage", "methods"=>["GET"]}, {"path"=>"/_nodes/{node_id}/usage", "methods"=>["GET"], "parts"=>{"node_id"=>{"type"=>"list", "description"=>"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"}}}, {"path"=>"/_nodes/usage/{metric}", "methods"=>["GET"], "parts"=>{"metric"=>{"type"=>"list", "options"=>["_all", "rest_actions"], "description"=>"Limit the information returned to the specified metrics"}}}, {"path"=>"/_nodes/{node_id}/usage/{metric}", "methods"=>["GET"], "parts"=>{"metric"=>{"type"=>"list", "options"=>["_all", "rest_actions"], "description"=>"Limit the information returned to the specified metrics"}, "node_id"=>{"type"=>"list", "description"=>"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"}}}]}, "params"=>{"timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}}
983
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html", "description" => "Returns low-level information about REST actions usage on nodes."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_nodes/usage", "methods" => ["GET"]}, {"path" => "/_nodes/{node_id}/usage", "methods" => ["GET"], "parts" => {"node_id" => {"type" => "list", "description" => "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"}}}, {"path" => "/_nodes/usage/{metric}", "methods" => ["GET"], "parts" => {"metric" => {"type" => "list", "options" => ["_all", "rest_actions"], "description" => "Limit the information returned to the specified metrics"}}}, {"path" => "/_nodes/{node_id}/usage/{metric}", "methods" => ["GET"], "parts" => {"metric" => {"type" => "list", "options" => ["_all", "rest_actions"], "description" => "Limit the information returned to the specified metrics"}, "node_id" => {"type" => "list", "description" => "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"}}}]}, "params" => {"timeout" => {"type" => "time", "description" => "Explicit operation timeout"}}}
984
984
  request(api_name, api_spec, params)
985
985
  end
986
986
 
987
987
  # ping
988
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html", "description"=>"Returns whether the cluster is running."}
988
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html", "description" => "Returns whether the cluster is running."}
989
989
  def ping(params = {})
990
990
  api_name = 'ping'
991
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html", "description"=>"Returns whether the cluster is running."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/", "methods"=>["HEAD"]}]}, "params"=>{}}
991
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html", "description" => "Returns whether the cluster is running."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/", "methods" => ["HEAD"]}]}, "params" => {}}
992
992
  request(api_name, api_spec, params)
993
993
  end
994
994
  alias :ping? :ping
995
995
 
996
996
  # put_script
997
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html", "description"=>"Creates or updates a script."}
997
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html", "description" => "Creates or updates a script."}
998
998
  def put_script(params = {})
999
999
  api_name = 'put_script'
1000
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html", "description"=>"Creates or updates a script."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_scripts/{id}", "methods"=>["PUT", "POST"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Script ID"}}}, {"path"=>"/_scripts/{id}/{context}", "methods"=>["PUT", "POST"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Script ID"}, "context"=>{"type"=>"string", "description"=>"Script context"}}}]}, "params"=>{"timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "context"=>{"type"=>"string", "description"=>"Context name to compile script against"}}, "body"=>{"description"=>"The document", "required"=>true}}
1000
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html", "description" => "Creates or updates a script."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_scripts/{id}", "methods" => ["PUT", "POST"], "parts" => {"id" => {"type" => "string", "description" => "Script ID"}}}, {"path" => "/_scripts/{id}/{context}", "methods" => ["PUT", "POST"], "parts" => {"id" => {"type" => "string", "description" => "Script ID"}, "context" => {"type" => "string", "description" => "Script context"}}}]}, "params" => {"timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "master_timeout" => {"type" => "time", "description" => "Specify timeout for connection to master"}, "context" => {"type" => "string", "description" => "Context name to compile script against"}}, "body" => {"description" => "The document", "required" => true}}
1001
1001
  request(api_name, api_spec, params)
1002
1002
  end
1003
1003
 
1004
1004
  # rank_eval
1005
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html", "description"=>"Allows to evaluate the quality of ranked search results over a set of typical search queries"}
1005
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html", "description" => "Allows to evaluate the quality of ranked search results over a set of typical search queries"}
1006
1006
  def rank_eval(params = {})
1007
1007
  api_name = 'rank_eval'
1008
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html", "description"=>"Allows to evaluate the quality of ranked search results over a set of typical search queries"}, "stability"=>"experimental", "url"=>{"paths"=>[{"path"=>"/_rank_eval", "methods"=>["GET", "POST"]}, {"path"=>"/{index}/_rank_eval", "methods"=>["GET", "POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}}}]}, "params"=>{"ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "search_type"=>{"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}}, "body"=>{"description"=>"The ranking evaluation search definition, including search requests, document ratings and ranking metric definition.", "required"=>true}}
1008
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html", "description" => "Allows to evaluate the quality of ranked search results over a set of typical search queries"}, "stability" => "experimental", "url" => {"paths" => [{"path" => "/_rank_eval", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_rank_eval", "methods" => ["GET", "POST"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}}}]}, "params" => {"ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "search_type" => {"type" => "enum", "options" => ["query_then_fetch", "dfs_query_then_fetch"], "description" => "Search operation type"}}, "body" => {"description" => "The ranking evaluation search definition, including search requests, document ratings and ranking metric definition.", "required" => true}}
1009
1009
  request(api_name, api_spec, params)
1010
1010
  end
1011
1011
 
1012
1012
  # reindex
1013
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html", "description"=>"Allows to copy documents from one index to another, optionally filtering the source\ndocuments by a query, changing the destination index settings, or fetching the\ndocuments from a remote cluster."}
1013
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html", "description" => "Allows to copy documents from one index to another, optionally filtering the source\ndocuments by a query, changing the destination index settings, or fetching the\ndocuments from a remote cluster."}
1014
1014
  def reindex(params = {})
1015
1015
  api_name = 'reindex'
1016
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html", "description"=>"Allows to copy documents from one index to another, optionally filtering the source\ndocuments by a query, changing the destination index settings, or fetching the\ndocuments from a remote cluster."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_reindex", "methods"=>["POST"]}]}, "params"=>{"refresh"=>{"type"=>"boolean", "description"=>"Should the affected indexes be refreshed?"}, "timeout"=>{"type"=>"time", "default"=>"1m", "description"=>"Time each individual bulk request should wait for shards that are unavailable."}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "wait_for_completion"=>{"type"=>"boolean", "default"=>true, "description"=>"Should the request should block until the reindex is complete."}, "requests_per_second"=>{"type"=>"number", "default"=>0, "description"=>"The throttle to set on this request in sub-requests per second. -1 means no throttle."}, "scroll"=>{"type"=>"time", "description"=>"Control how long to keep the search context alive", "default"=>"5m"}, "slices"=>{"type"=>"number|string", "default"=>1, "description"=>"The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`."}, "max_docs"=>{"type"=>"number", "description"=>"Maximum number of documents to process (default: all documents)"}}, "body"=>{"description"=>"The search definition using the Query DSL and the prototype for the index request.", "required"=>true}}
1016
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html", "description" => "Allows to copy documents from one index to another, optionally filtering the source\ndocuments by a query, changing the destination index settings, or fetching the\ndocuments from a remote cluster."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_reindex", "methods" => ["POST"]}]}, "params" => {"refresh" => {"type" => "boolean", "description" => "Should the affected indexes be refreshed?"}, "timeout" => {"type" => "time", "default" => "1m", "description" => "Time each individual bulk request should wait for shards that are unavailable."}, "wait_for_active_shards" => {"type" => "string", "description" => "Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "wait_for_completion" => {"type" => "boolean", "default" => true, "description" => "Should the request should block until the reindex is complete."}, "requests_per_second" => {"type" => "number", "default" => 0, "description" => "The throttle to set on this request in sub-requests per second. -1 means no throttle."}, "scroll" => {"type" => "time", "description" => "Control how long to keep the search context alive", "default" => "5m"}, "slices" => {"type" => "number|string", "default" => 1, "description" => "The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`."}, "max_docs" => {"type" => "number", "description" => "Maximum number of documents to process (default: all documents)"}}, "body" => {"description" => "The search definition using the Query DSL and the prototype for the index request.", "required" => true}}
1017
1017
  request(api_name, api_spec, params)
1018
1018
  end
1019
1019
 
1020
1020
  # reindex_rethrottle
1021
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html", "description"=>"Changes the number of requests per second for a particular Reindex operation."}
1021
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html", "description" => "Changes the number of requests per second for a particular Reindex operation."}
1022
1022
  def reindex_rethrottle(params = {})
1023
1023
  api_name = 'reindex_rethrottle'
1024
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html", "description"=>"Changes the number of requests per second for a particular Reindex operation."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_reindex/{task_id}/_rethrottle", "methods"=>["POST"], "parts"=>{"task_id"=>{"type"=>"string", "description"=>"The task id to rethrottle"}}}]}, "params"=>{"requests_per_second"=>{"type"=>"number", "required"=>true, "description"=>"The throttle to set on this request in floating sub-requests per second. -1 means set no throttle."}}}
1024
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html", "description" => "Changes the number of requests per second for a particular Reindex operation."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_reindex/{task_id}/_rethrottle", "methods" => ["POST"], "parts" => {"task_id" => {"type" => "string", "description" => "The task id to rethrottle"}}}]}, "params" => {"requests_per_second" => {"type" => "number", "required" => true, "description" => "The throttle to set on this request in floating sub-requests per second. -1 means set no throttle."}}}
1025
1025
  request(api_name, api_spec, params)
1026
1026
  end
1027
1027
 
1028
1028
  # render_search_template
1029
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates", "description"=>"Allows to use the Mustache language to pre-render a search definition."}
1029
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates", "description" => "Allows to use the Mustache language to pre-render a search definition."}
1030
1030
  def render_search_template(params = {})
1031
1031
  api_name = 'render_search_template'
1032
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates", "description"=>"Allows to use the Mustache language to pre-render a search definition."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_render/template", "methods"=>["GET", "POST"]}, {"path"=>"/_render/template/{id}", "methods"=>["GET", "POST"], "parts"=>{"id"=>{"type"=>"string", "description"=>"The id of the stored search template"}}}]}, "body"=>{"description"=>"The search definition template and its params"}}
1032
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates", "description" => "Allows to use the Mustache language to pre-render a search definition."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_render/template", "methods" => ["GET", "POST"]}, {"path" => "/_render/template/{id}", "methods" => ["GET", "POST"], "parts" => {"id" => {"type" => "string", "description" => "The id of the stored search template"}}}]}, "body" => {"description" => "The search definition template and its params"}}
1033
1033
  request(api_name, api_spec, params)
1034
1034
  end
1035
1035
 
1036
1036
  # scripts_painless_execute
1037
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html", "description"=>"Allows an arbitrary script to be executed and a result to be returned"}
1037
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html", "description" => "Allows an arbitrary script to be executed and a result to be returned"}
1038
1038
  def scripts_painless_execute(params = {})
1039
1039
  api_name = 'scripts_painless_execute'
1040
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html", "description"=>"Allows an arbitrary script to be executed and a result to be returned"}, "stability"=>"experimental", "url"=>{"paths"=>[{"path"=>"/_scripts/painless/_execute", "methods"=>["GET", "POST"]}]}, "params"=>{}, "body"=>{"description"=>"The script to execute"}}
1040
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html", "description" => "Allows an arbitrary script to be executed and a result to be returned"}, "stability" => "experimental", "url" => {"paths" => [{"path" => "/_scripts/painless/_execute", "methods" => ["GET", "POST"]}]}, "params" => {}, "body" => {"description" => "The script to execute"}}
1041
1041
  request(api_name, api_spec, params)
1042
1042
  end
1043
1043
 
1044
1044
  # scroll
1045
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll", "description"=>"Allows to retrieve a large numbers of results from a single search request."}
1045
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll", "description" => "Allows to retrieve a large numbers of results from a single search request."}
1046
1046
  def scroll(params = {})
1047
1047
  api_name = 'scroll'
1048
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll", "description"=>"Allows to retrieve a large numbers of results from a single search request."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_search/scroll", "methods"=>["GET", "POST"]}, {"path"=>"/_search/scroll/{scroll_id}", "methods"=>["GET", "POST"], "parts"=>{"scroll_id"=>{"type"=>"string", "description"=>"The scroll ID", "deprecated"=>true}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"A scroll id can be quite large and should be specified as part of the body"}}]}, "params"=>{"scroll"=>{"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, "scroll_id"=>{"type"=>"string", "description"=>"The scroll ID for scrolled search"}, "rest_total_hits_as_int"=>{"type"=>"boolean", "description"=>"Indicates whether hits.total should be rendered as an integer or an object in the rest search response", "default"=>false}}, "body"=>{"description"=>"The scroll ID if not passed by URL or query parameter."}}
1048
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll", "description" => "Allows to retrieve a large numbers of results from a single search request."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_search/scroll", "methods" => ["GET", "POST"]}, {"path" => "/_search/scroll/{scroll_id}", "methods" => ["GET", "POST"], "parts" => {"scroll_id" => {"type" => "string", "description" => "The scroll ID", "deprecated" => true}}, "deprecated" => {"version" => "7.0.0", "description" => "A scroll id can be quite large and should be specified as part of the body"}}]}, "params" => {"scroll" => {"type" => "time", "description" => "Specify how long a consistent view of the index should be maintained for scrolled search"}, "scroll_id" => {"type" => "string", "description" => "The scroll ID for scrolled search"}, "rest_total_hits_as_int" => {"type" => "boolean", "description" => "Indicates whether hits.total should be rendered as an integer or an object in the rest search response", "default" => false}}, "body" => {"description" => "The scroll ID if not passed by URL or query parameter."}}
1049
1049
  request(api_name, api_spec, params)
1050
1050
  end
1051
1051
 
1052
1052
  # search
1053
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html", "description"=>"Returns results matching a query."}
1053
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html", "description" => "Returns results matching a query."}
1054
1054
  def search(params = {})
1055
1055
  api_name = 'search'
1056
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html", "description"=>"Returns results matching a query."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_search", "methods"=>["GET", "POST"]}, {"path"=>"/{index}/_search", "methods"=>["GET", "POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}}}, {"path"=>"/{index}/{type}/_search", "methods"=>["GET", "POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, "type"=>{"type"=>"list", "description"=>"A comma-separated list of document types to search; leave empty to perform the operation on all types"}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"analyzer"=>{"type"=>"string", "description"=>"The analyzer to use for the query string"}, "analyze_wildcard"=>{"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, "ccs_minimize_roundtrips"=>{"type"=>"boolean", "description"=>"Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", "default"=>"true"}, "default_operator"=>{"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, "df"=>{"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, "explain"=>{"type"=>"boolean", "description"=>"Specify whether to return detailed information about score computation as part of a hit"}, "stored_fields"=>{"type"=>"list", "description"=>"A comma-separated list of stored fields to return as part of a hit"}, "docvalue_fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields to return as the docvalue representation of a field for each hit"}, "from"=>{"type"=>"number", "description"=>"Starting offset (default: 0)"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "ignore_throttled"=>{"type"=>"boolean", "description"=>"Whether specified concrete, expanded or aliased indices should be ignored when throttled"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "lenient"=>{"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "q"=>{"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, "routing"=>{"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, "scroll"=>{"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, "search_type"=>{"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}, "size"=>{"type"=>"number", "description"=>"Number of hits to return (default: 10)"}, "sort"=>{"type"=>"list", "description"=>"A comma-separated list of <field>:<direction> pairs"}, "_source"=>{"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_excludes"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_includes"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "terminate_after"=>{"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, "stats"=>{"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, "suggest_field"=>{"type"=>"string", "description"=>"Specify which field to use for suggestions"}, "suggest_mode"=>{"type"=>"enum", "options"=>["missing", "popular", "always"], "default"=>"missing", "description"=>"Specify suggest mode"}, "suggest_size"=>{"type"=>"number", "description"=>"How many suggestions to return in response"}, "suggest_text"=>{"type"=>"string", "description"=>"The source text for which the suggestions should be returned"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "track_scores"=>{"type"=>"boolean", "description"=>"Whether to calculate and return scores even if they are not used for sorting"}, "track_total_hits"=>{"type"=>"boolean", "description"=>"Indicate if the number of documents that match the query should be tracked"}, "allow_partial_search_results"=>{"type"=>"boolean", "default"=>true, "description"=>"Indicate if an error should be returned if there is a partial search failure or timeout"}, "typed_keys"=>{"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, "version"=>{"type"=>"boolean", "description"=>"Specify whether to return document version as part of a hit"}, "seq_no_primary_term"=>{"type"=>"boolean", "description"=>"Specify whether to return sequence number and primary term of the last modification of each hit"}, "request_cache"=>{"type"=>"boolean", "description"=>"Specify if request cache should be used for this request or not, defaults to index level setting"}, "batched_reduce_size"=>{"type"=>"number", "description"=>"The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.", "default"=>512}, "max_concurrent_shard_requests"=>{"type"=>"number", "description"=>"The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests", "default"=>5}, "pre_filter_shard_size"=>{"type"=>"number", "description"=>"A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint."}, "rest_total_hits_as_int"=>{"type"=>"boolean", "description"=>"Indicates whether hits.total should be rendered as an integer or an object in the rest search response", "default"=>false}}, "body"=>{"description"=>"The search definition using the Query DSL"}}
1056
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html", "description" => "Returns results matching a query."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_search", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_search", "methods" => ["GET", "POST"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}}}, {"path" => "/{index}/{type}/_search", "methods" => ["GET", "POST"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, "type" => {"type" => "list", "description" => "A comma-separated list of document types to search; leave empty to perform the operation on all types"}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"analyzer" => {"type" => "string", "description" => "The analyzer to use for the query string"}, "analyze_wildcard" => {"type" => "boolean", "description" => "Specify whether wildcard and prefix queries should be analyzed (default: false)"}, "ccs_minimize_roundtrips" => {"type" => "boolean", "description" => "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", "default" => "true"}, "default_operator" => {"type" => "enum", "options" => ["AND", "OR"], "default" => "OR", "description" => "The default operator for query string query (AND or OR)"}, "df" => {"type" => "string", "description" => "The field to use as default where no field prefix is given in the query string"}, "explain" => {"type" => "boolean", "description" => "Specify whether to return detailed information about score computation as part of a hit"}, "stored_fields" => {"type" => "list", "description" => "A comma-separated list of stored fields to return as part of a hit"}, "docvalue_fields" => {"type" => "list", "description" => "A comma-separated list of fields to return as the docvalue representation of a field for each hit"}, "from" => {"type" => "number", "description" => "Starting offset (default: 0)"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "ignore_throttled" => {"type" => "boolean", "description" => "Whether specified concrete, expanded or aliased indices should be ignored when throttled"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "lenient" => {"type" => "boolean", "description" => "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "preference" => {"type" => "string", "description" => "Specify the node or shard the operation should be performed on (default: random)"}, "q" => {"type" => "string", "description" => "Query in the Lucene query string syntax"}, "routing" => {"type" => "list", "description" => "A comma-separated list of specific routing values"}, "scroll" => {"type" => "time", "description" => "Specify how long a consistent view of the index should be maintained for scrolled search"}, "search_type" => {"type" => "enum", "options" => ["query_then_fetch", "dfs_query_then_fetch"], "description" => "Search operation type"}, "size" => {"type" => "number", "description" => "Number of hits to return (default: 10)"}, "sort" => {"type" => "list", "description" => "A comma-separated list of <field>:<direction> pairs"}, "_source" => {"type" => "list", "description" => "True or false to return the _source field or not, or a list of fields to return"}, "_source_excludes" => {"type" => "list", "description" => "A list of fields to exclude from the returned _source field"}, "_source_includes" => {"type" => "list", "description" => "A list of fields to extract and return from the _source field"}, "terminate_after" => {"type" => "number", "description" => "The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, "stats" => {"type" => "list", "description" => "Specific 'tag' of the request for logging and statistical purposes"}, "suggest_field" => {"type" => "string", "description" => "Specify which field to use for suggestions"}, "suggest_mode" => {"type" => "enum", "options" => ["missing", "popular", "always"], "default" => "missing", "description" => "Specify suggest mode"}, "suggest_size" => {"type" => "number", "description" => "How many suggestions to return in response"}, "suggest_text" => {"type" => "string", "description" => "The source text for which the suggestions should be returned"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "track_scores" => {"type" => "boolean", "description" => "Whether to calculate and return scores even if they are not used for sorting"}, "track_total_hits" => {"type" => "boolean", "description" => "Indicate if the number of documents that match the query should be tracked"}, "allow_partial_search_results" => {"type" => "boolean", "default" => true, "description" => "Indicate if an error should be returned if there is a partial search failure or timeout"}, "typed_keys" => {"type" => "boolean", "description" => "Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, "version" => {"type" => "boolean", "description" => "Specify whether to return document version as part of a hit"}, "seq_no_primary_term" => {"type" => "boolean", "description" => "Specify whether to return sequence number and primary term of the last modification of each hit"}, "request_cache" => {"type" => "boolean", "description" => "Specify if request cache should be used for this request or not, defaults to index level setting"}, "batched_reduce_size" => {"type" => "number", "description" => "The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.", "default" => 512}, "max_concurrent_shard_requests" => {"type" => "number", "description" => "The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests", "default" => 5}, "pre_filter_shard_size" => {"type" => "number", "description" => "A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint."}, "rest_total_hits_as_int" => {"type" => "boolean", "description" => "Indicates whether hits.total should be rendered as an integer or an object in the rest search response", "default" => false}}, "body" => {"description" => "The search definition using the Query DSL"}}
1057
1057
  request(api_name, api_spec, params)
1058
1058
  end
1059
1059
 
1060
1060
  # search_shards
1061
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html", "description"=>"Returns information about the indices and shards that a search request would be executed against."}
1061
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html", "description" => "Returns information about the indices and shards that a search request would be executed against."}
1062
1062
  def search_shards(params = {})
1063
1063
  api_name = 'search_shards'
1064
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html", "description"=>"Returns information about the indices and shards that a search request would be executed against."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_search_shards", "methods"=>["GET", "POST"]}, {"path"=>"/{index}/_search_shards", "methods"=>["GET", "POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}}}]}, "params"=>{"preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "routing"=>{"type"=>"string", "description"=>"Specific routing value"}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}
1064
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html", "description" => "Returns information about the indices and shards that a search request would be executed against."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_search_shards", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_search_shards", "methods" => ["GET", "POST"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}}}]}, "params" => {"preference" => {"type" => "string", "description" => "Specify the node or shard the operation should be performed on (default: random)"}, "routing" => {"type" => "string", "description" => "Specific routing value"}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}
1065
1065
  request(api_name, api_spec, params)
1066
1066
  end
1067
1067
 
1068
1068
  # search_template
1069
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html", "description"=>"Allows to use the Mustache language to pre-render a search definition."}
1069
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html", "description" => "Allows to use the Mustache language to pre-render a search definition."}
1070
1070
  def search_template(params = {})
1071
1071
  api_name = 'search_template'
1072
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html", "description"=>"Allows to use the Mustache language to pre-render a search definition."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_search/template", "methods"=>["GET", "POST"]}, {"path"=>"/{index}/_search/template", "methods"=>["GET", "POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}}}, {"path"=>"/{index}/{type}/_search/template", "methods"=>["GET", "POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, "type"=>{"type"=>"list", "description"=>"A comma-separated list of document types to search; leave empty to perform the operation on all types"}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "ignore_throttled"=>{"type"=>"boolean", "description"=>"Whether specified concrete, expanded or aliased indices should be ignored when throttled"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "routing"=>{"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, "scroll"=>{"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, "search_type"=>{"type"=>"enum", "options"=>["query_then_fetch", "query_and_fetch", "dfs_query_then_fetch", "dfs_query_and_fetch"], "description"=>"Search operation type"}, "explain"=>{"type"=>"boolean", "description"=>"Specify whether to return detailed information about score computation as part of a hit"}, "profile"=>{"type"=>"boolean", "description"=>"Specify whether to profile the query execution"}, "typed_keys"=>{"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, "rest_total_hits_as_int"=>{"type"=>"boolean", "description"=>"Indicates whether hits.total should be rendered as an integer or an object in the rest search response", "default"=>false}, "ccs_minimize_roundtrips"=>{"type"=>"boolean", "description"=>"Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", "default"=>"true"}}, "body"=>{"description"=>"The search definition template and its params", "required"=>true}}
1072
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html", "description" => "Allows to use the Mustache language to pre-render a search definition."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_search/template", "methods" => ["GET", "POST"]}, {"path" => "/{index}/_search/template", "methods" => ["GET", "POST"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}}}, {"path" => "/{index}/{type}/_search/template", "methods" => ["GET", "POST"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, "type" => {"type" => "list", "description" => "A comma-separated list of document types to search; leave empty to perform the operation on all types"}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "ignore_throttled" => {"type" => "boolean", "description" => "Whether specified concrete, expanded or aliased indices should be ignored when throttled"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "preference" => {"type" => "string", "description" => "Specify the node or shard the operation should be performed on (default: random)"}, "routing" => {"type" => "list", "description" => "A comma-separated list of specific routing values"}, "scroll" => {"type" => "time", "description" => "Specify how long a consistent view of the index should be maintained for scrolled search"}, "search_type" => {"type" => "enum", "options" => ["query_then_fetch", "query_and_fetch", "dfs_query_then_fetch", "dfs_query_and_fetch"], "description" => "Search operation type"}, "explain" => {"type" => "boolean", "description" => "Specify whether to return detailed information about score computation as part of a hit"}, "profile" => {"type" => "boolean", "description" => "Specify whether to profile the query execution"}, "typed_keys" => {"type" => "boolean", "description" => "Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, "rest_total_hits_as_int" => {"type" => "boolean", "description" => "Indicates whether hits.total should be rendered as an integer or an object in the rest search response", "default" => false}, "ccs_minimize_roundtrips" => {"type" => "boolean", "description" => "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", "default" => "true"}}, "body" => {"description" => "The search definition template and its params", "required" => true}}
1073
1073
  request(api_name, api_spec, params)
1074
1074
  end
1075
1075
 
1076
1076
  # snapshot.cleanup_repository
1077
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/clean-up-snapshot-repo-api.html", "description"=>"Removes stale data from repository."}
1077
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/clean-up-snapshot-repo-api.html", "description" => "Removes stale data from repository."}
1078
1078
  def snapshot_cleanup_repository(params = {})
1079
1079
  api_name = 'snapshot.cleanup_repository'
1080
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/clean-up-snapshot-repo-api.html", "description"=>"Removes stale data from repository."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_snapshot/{repository}/_cleanup", "methods"=>["POST"], "parts"=>{"repository"=>{"type"=>"string", "description"=>"A repository name"}}}]}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}}
1080
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/clean-up-snapshot-repo-api.html", "description" => "Removes stale data from repository."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_snapshot/{repository}/_cleanup", "methods" => ["POST"], "parts" => {"repository" => {"type" => "string", "description" => "A repository name"}}}]}, "params" => {"master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}}}
1081
1081
  request(api_name, api_spec, params)
1082
1082
  end
1083
1083
 
1084
1084
  # snapshot.clone
1085
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description"=>"Clones indices from one snapshot into another snapshot in the same repository."}
1085
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description" => "Clones indices from one snapshot into another snapshot in the same repository."}
1086
1086
  def snapshot_clone(params = {})
1087
1087
  api_name = 'snapshot.clone'
1088
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description"=>"Clones indices from one snapshot into another snapshot in the same repository."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_snapshot/{repository}/{snapshot}/_clone/{target_snapshot}", "methods"=>["PUT"], "parts"=>{"repository"=>{"type"=>"string", "description"=>"A repository name"}, "snapshot"=>{"type"=>"string", "description"=>"The name of the snapshot to clone from"}, "target_snapshot"=>{"type"=>"string", "description"=>"The name of the cloned snapshot to create"}}}]}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}}, "body"=>{"description"=>"The snapshot clone definition", "required"=>true}}
1088
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description" => "Clones indices from one snapshot into another snapshot in the same repository."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_snapshot/{repository}/{snapshot}/_clone/{target_snapshot}", "methods" => ["PUT"], "parts" => {"repository" => {"type" => "string", "description" => "A repository name"}, "snapshot" => {"type" => "string", "description" => "The name of the snapshot to clone from"}, "target_snapshot" => {"type" => "string", "description" => "The name of the cloned snapshot to create"}}}]}, "params" => {"master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}}, "body" => {"description" => "The snapshot clone definition", "required" => true}}
1089
1089
  request(api_name, api_spec, params)
1090
1090
  end
1091
1091
 
1092
1092
  # snapshot.create
1093
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description"=>"Creates a snapshot in a repository."}
1093
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description" => "Creates a snapshot in a repository."}
1094
1094
  def snapshot_create(params = {})
1095
1095
  api_name = 'snapshot.create'
1096
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description"=>"Creates a snapshot in a repository."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_snapshot/{repository}/{snapshot}", "methods"=>["PUT", "POST"], "parts"=>{"repository"=>{"type"=>"string", "description"=>"A repository name"}, "snapshot"=>{"type"=>"string", "description"=>"A snapshot name"}}}]}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "wait_for_completion"=>{"type"=>"boolean", "description"=>"Should this request wait until the operation has completed before returning", "default"=>false}}, "body"=>{"description"=>"The snapshot definition", "required"=>false}}
1096
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description" => "Creates a snapshot in a repository."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_snapshot/{repository}/{snapshot}", "methods" => ["PUT", "POST"], "parts" => {"repository" => {"type" => "string", "description" => "A repository name"}, "snapshot" => {"type" => "string", "description" => "A snapshot name"}}}]}, "params" => {"master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "wait_for_completion" => {"type" => "boolean", "description" => "Should this request wait until the operation has completed before returning", "default" => false}}, "body" => {"description" => "The snapshot definition", "required" => false}}
1097
1097
  request(api_name, api_spec, params)
1098
1098
  end
1099
1099
 
1100
1100
  # snapshot.create_repository
1101
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description"=>"Creates a repository."}
1101
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description" => "Creates a repository."}
1102
1102
  def snapshot_create_repository(params = {})
1103
1103
  api_name = 'snapshot.create_repository'
1104
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description"=>"Creates a repository."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_snapshot/{repository}", "methods"=>["PUT", "POST"], "parts"=>{"repository"=>{"type"=>"string", "description"=>"A repository name"}}}]}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "verify"=>{"type"=>"boolean", "description"=>"Whether to verify the repository after creation"}}, "body"=>{"description"=>"The repository definition", "required"=>true}}
1104
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description" => "Creates a repository."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_snapshot/{repository}", "methods" => ["PUT", "POST"], "parts" => {"repository" => {"type" => "string", "description" => "A repository name"}}}]}, "params" => {"master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "verify" => {"type" => "boolean", "description" => "Whether to verify the repository after creation"}}, "body" => {"description" => "The repository definition", "required" => true}}
1105
1105
  request(api_name, api_spec, params)
1106
1106
  end
1107
1107
 
1108
1108
  # snapshot.delete
1109
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description"=>"Deletes a snapshot."}
1109
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description" => "Deletes a snapshot."}
1110
1110
  def snapshot_delete(params = {})
1111
1111
  api_name = 'snapshot.delete'
1112
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description"=>"Deletes a snapshot."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_snapshot/{repository}/{snapshot}", "methods"=>["DELETE"], "parts"=>{"repository"=>{"type"=>"string", "description"=>"A repository name"}, "snapshot"=>{"type"=>"string", "description"=>"A snapshot name"}}}]}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}}}
1112
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description" => "Deletes a snapshot."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_snapshot/{repository}/{snapshot}", "methods" => ["DELETE"], "parts" => {"repository" => {"type" => "string", "description" => "A repository name"}, "snapshot" => {"type" => "string", "description" => "A snapshot name"}}}]}, "params" => {"master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}}}
1113
1113
  request(api_name, api_spec, params)
1114
1114
  end
1115
1115
 
1116
1116
  # snapshot.delete_repository
1117
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description"=>"Deletes a repository."}
1117
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description" => "Deletes a repository."}
1118
1118
  def snapshot_delete_repository(params = {})
1119
1119
  api_name = 'snapshot.delete_repository'
1120
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description"=>"Deletes a repository."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_snapshot/{repository}", "methods"=>["DELETE"], "parts"=>{"repository"=>{"type"=>"list", "description"=>"Name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported."}}}]}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}}
1120
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description" => "Deletes a repository."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_snapshot/{repository}", "methods" => ["DELETE"], "parts" => {"repository" => {"type" => "list", "description" => "Name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported."}}}]}, "params" => {"master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}}}
1121
1121
  request(api_name, api_spec, params)
1122
1122
  end
1123
1123
 
1124
1124
  # snapshot.get
1125
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description"=>"Returns information about a snapshot."}
1125
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description" => "Returns information about a snapshot."}
1126
1126
  def snapshot_get(params = {})
1127
1127
  api_name = 'snapshot.get'
1128
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description"=>"Returns information about a snapshot."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_snapshot/{repository}/{snapshot}", "methods"=>["GET"], "parts"=>{"repository"=>{"type"=>"string", "description"=>"A repository name"}, "snapshot"=>{"type"=>"list", "description"=>"A comma-separated list of snapshot names"}}}]}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown"}, "verbose"=>{"type"=>"boolean", "description"=>"Whether to show verbose snapshot info or only show the basic info found in the repository index blob"}}}
1128
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description" => "Returns information about a snapshot."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_snapshot/{repository}/{snapshot}", "methods" => ["GET"], "parts" => {"repository" => {"type" => "string", "description" => "A repository name"}, "snapshot" => {"type" => "list", "description" => "A comma-separated list of snapshot names"}}}]}, "params" => {"master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown"}, "verbose" => {"type" => "boolean", "description" => "Whether to show verbose snapshot info or only show the basic info found in the repository index blob"}}}
1129
1129
  request(api_name, api_spec, params)
1130
1130
  end
1131
1131
 
1132
1132
  # snapshot.get_repository
1133
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description"=>"Returns information about a repository."}
1133
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description" => "Returns information about a repository."}
1134
1134
  def snapshot_get_repository(params = {})
1135
1135
  api_name = 'snapshot.get_repository'
1136
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description"=>"Returns information about a repository."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_snapshot", "methods"=>["GET"]}, {"path"=>"/_snapshot/{repository}", "methods"=>["GET"], "parts"=>{"repository"=>{"type"=>"list", "description"=>"A comma-separated list of repository names"}}}]}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}}}
1136
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description" => "Returns information about a repository."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_snapshot", "methods" => ["GET"]}, {"path" => "/_snapshot/{repository}", "methods" => ["GET"], "parts" => {"repository" => {"type" => "list", "description" => "A comma-separated list of repository names"}}}]}, "params" => {"master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "local" => {"type" => "boolean", "description" => "Return local information, do not retrieve the state from master node (default: false)"}}}
1137
1137
  request(api_name, api_spec, params)
1138
1138
  end
1139
1139
 
1140
1140
  # snapshot.restore
1141
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description"=>"Restores a snapshot."}
1141
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description" => "Restores a snapshot."}
1142
1142
  def snapshot_restore(params = {})
1143
1143
  api_name = 'snapshot.restore'
1144
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description"=>"Restores a snapshot."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_snapshot/{repository}/{snapshot}/_restore", "methods"=>["POST"], "parts"=>{"repository"=>{"type"=>"string", "description"=>"A repository name"}, "snapshot"=>{"type"=>"string", "description"=>"A snapshot name"}}}]}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "wait_for_completion"=>{"type"=>"boolean", "description"=>"Should this request wait until the operation has completed before returning", "default"=>false}}, "body"=>{"description"=>"Details of what to restore", "required"=>false}}
1144
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description" => "Restores a snapshot."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_snapshot/{repository}/{snapshot}/_restore", "methods" => ["POST"], "parts" => {"repository" => {"type" => "string", "description" => "A repository name"}, "snapshot" => {"type" => "string", "description" => "A snapshot name"}}}]}, "params" => {"master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "wait_for_completion" => {"type" => "boolean", "description" => "Should this request wait until the operation has completed before returning", "default" => false}}, "body" => {"description" => "Details of what to restore", "required" => false}}
1145
1145
  request(api_name, api_spec, params)
1146
1146
  end
1147
1147
 
1148
1148
  # snapshot.status
1149
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description"=>"Returns information about the status of a snapshot."}
1149
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description" => "Returns information about the status of a snapshot."}
1150
1150
  def snapshot_status(params = {})
1151
1151
  api_name = 'snapshot.status'
1152
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description"=>"Returns information about the status of a snapshot."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_snapshot/_status", "methods"=>["GET"]}, {"path"=>"/_snapshot/{repository}/_status", "methods"=>["GET"], "parts"=>{"repository"=>{"type"=>"string", "description"=>"A repository name"}}}, {"path"=>"/_snapshot/{repository}/{snapshot}/_status", "methods"=>["GET"], "parts"=>{"repository"=>{"type"=>"string", "description"=>"A repository name"}, "snapshot"=>{"type"=>"list", "description"=>"A comma-separated list of snapshot names"}}}]}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown"}}}
1152
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description" => "Returns information about the status of a snapshot."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_snapshot/_status", "methods" => ["GET"]}, {"path" => "/_snapshot/{repository}/_status", "methods" => ["GET"], "parts" => {"repository" => {"type" => "string", "description" => "A repository name"}}}, {"path" => "/_snapshot/{repository}/{snapshot}/_status", "methods" => ["GET"], "parts" => {"repository" => {"type" => "string", "description" => "A repository name"}, "snapshot" => {"type" => "list", "description" => "A comma-separated list of snapshot names"}}}]}, "params" => {"master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown"}}}
1153
1153
  request(api_name, api_spec, params)
1154
1154
  end
1155
1155
 
1156
1156
  # snapshot.verify_repository
1157
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description"=>"Verifies a repository."}
1157
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description" => "Verifies a repository."}
1158
1158
  def snapshot_verify_repository(params = {})
1159
1159
  api_name = 'snapshot.verify_repository'
1160
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description"=>"Verifies a repository."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_snapshot/{repository}/_verify", "methods"=>["POST"], "parts"=>{"repository"=>{"type"=>"string", "description"=>"A repository name"}}}]}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}}
1160
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html", "description" => "Verifies a repository."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_snapshot/{repository}/_verify", "methods" => ["POST"], "parts" => {"repository" => {"type" => "string", "description" => "A repository name"}}}]}, "params" => {"master_timeout" => {"type" => "time", "description" => "Explicit operation timeout for connection to master node"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}}}
1161
1161
  request(api_name, api_spec, params)
1162
1162
  end
1163
1163
 
1164
1164
  # tasks.cancel
1165
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html", "description"=>"Cancels a task, if it can be cancelled through an API."}
1165
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html", "description" => "Cancels a task, if it can be cancelled through an API."}
1166
1166
  def tasks_cancel(params = {})
1167
1167
  api_name = 'tasks.cancel'
1168
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html", "description"=>"Cancels a task, if it can be cancelled through an API."}, "stability"=>"experimental", "url"=>{"paths"=>[{"path"=>"/_tasks/_cancel", "methods"=>["POST"]}, {"path"=>"/_tasks/{task_id}/_cancel", "methods"=>["POST"], "parts"=>{"task_id"=>{"type"=>"string", "description"=>"Cancel the task with specified task id (node_id:task_number)"}}}]}, "params"=>{"nodes"=>{"type"=>"list", "description"=>"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"}, "actions"=>{"type"=>"list", "description"=>"A comma-separated list of actions that should be cancelled. Leave empty to cancel all."}, "parent_task_id"=>{"type"=>"string", "description"=>"Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all."}, "wait_for_completion"=>{"type"=>"boolean", "description"=>"Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false"}}}
1168
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html", "description" => "Cancels a task, if it can be cancelled through an API."}, "stability" => "experimental", "url" => {"paths" => [{"path" => "/_tasks/_cancel", "methods" => ["POST"]}, {"path" => "/_tasks/{task_id}/_cancel", "methods" => ["POST"], "parts" => {"task_id" => {"type" => "string", "description" => "Cancel the task with specified task id (node_id:task_number)"}}}]}, "params" => {"nodes" => {"type" => "list", "description" => "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"}, "actions" => {"type" => "list", "description" => "A comma-separated list of actions that should be cancelled. Leave empty to cancel all."}, "parent_task_id" => {"type" => "string", "description" => "Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all."}, "wait_for_completion" => {"type" => "boolean", "description" => "Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false"}}}
1169
1169
  request(api_name, api_spec, params)
1170
1170
  end
1171
1171
 
1172
1172
  # tasks.get
1173
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html", "description"=>"Returns information about a task."}
1173
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html", "description" => "Returns information about a task."}
1174
1174
  def tasks_get(params = {})
1175
1175
  api_name = 'tasks.get'
1176
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html", "description"=>"Returns information about a task."}, "stability"=>"experimental", "url"=>{"paths"=>[{"path"=>"/_tasks/{task_id}", "methods"=>["GET"], "parts"=>{"task_id"=>{"type"=>"string", "description"=>"Return the task with specified id (node_id:task_number)"}}}]}, "params"=>{"wait_for_completion"=>{"type"=>"boolean", "description"=>"Wait for the matching tasks to complete (default: false)"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}}
1176
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html", "description" => "Returns information about a task."}, "stability" => "experimental", "url" => {"paths" => [{"path" => "/_tasks/{task_id}", "methods" => ["GET"], "parts" => {"task_id" => {"type" => "string", "description" => "Return the task with specified id (node_id:task_number)"}}}]}, "params" => {"wait_for_completion" => {"type" => "boolean", "description" => "Wait for the matching tasks to complete (default: false)"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}}}
1177
1177
  request(api_name, api_spec, params)
1178
1178
  end
1179
1179
 
1180
1180
  # tasks.list
1181
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html", "description"=>"Returns a list of tasks."}
1181
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html", "description" => "Returns a list of tasks."}
1182
1182
  def tasks_list(params = {})
1183
1183
  api_name = 'tasks.list'
1184
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html", "description"=>"Returns a list of tasks."}, "stability"=>"experimental", "url"=>{"paths"=>[{"path"=>"/_tasks", "methods"=>["GET"]}]}, "params"=>{"nodes"=>{"type"=>"list", "description"=>"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"}, "actions"=>{"type"=>"list", "description"=>"A comma-separated list of actions that should be returned. Leave empty to return all."}, "detailed"=>{"type"=>"boolean", "description"=>"Return detailed task information (default: false)"}, "parent_task_id"=>{"type"=>"string", "description"=>"Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all."}, "wait_for_completion"=>{"type"=>"boolean", "description"=>"Wait for the matching tasks to complete (default: false)"}, "group_by"=>{"type"=>"enum", "description"=>"Group tasks by nodes or parent/child relationships", "options"=>["nodes", "parents", "none"], "default"=>"nodes"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}}
1184
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html", "description" => "Returns a list of tasks."}, "stability" => "experimental", "url" => {"paths" => [{"path" => "/_tasks", "methods" => ["GET"]}]}, "params" => {"nodes" => {"type" => "list", "description" => "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"}, "actions" => {"type" => "list", "description" => "A comma-separated list of actions that should be returned. Leave empty to return all."}, "detailed" => {"type" => "boolean", "description" => "Return detailed task information (default: false)"}, "parent_task_id" => {"type" => "string", "description" => "Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all."}, "wait_for_completion" => {"type" => "boolean", "description" => "Wait for the matching tasks to complete (default: false)"}, "group_by" => {"type" => "enum", "description" => "Group tasks by nodes or parent/child relationships", "options" => ["nodes", "parents", "none"], "default" => "nodes"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}}}
1185
1185
  request(api_name, api_spec, params)
1186
1186
  end
1187
1187
 
1188
1188
  # termvectors
1189
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html", "description"=>"Returns information and statistics about terms in the fields of a particular document."}
1189
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html", "description" => "Returns information and statistics about terms in the fields of a particular document."}
1190
1190
  def termvectors(params = {})
1191
1191
  api_name = 'termvectors'
1192
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html", "description"=>"Returns information and statistics about terms in the fields of a particular document."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}/_termvectors/{id}", "methods"=>["GET", "POST"], "parts"=>{"index"=>{"type"=>"string", "description"=>"The index in which the document resides."}, "id"=>{"type"=>"string", "description"=>"The id of the document, when not specified a doc param should be supplied."}}}, {"path"=>"/{index}/_termvectors", "methods"=>["GET", "POST"], "parts"=>{"index"=>{"type"=>"string", "description"=>"The index in which the document resides."}}}, {"path"=>"/{index}/{type}/{id}/_termvectors", "methods"=>["GET", "POST"], "parts"=>{"index"=>{"type"=>"string", "description"=>"The index in which the document resides.", "required"=>true}, "type"=>{"type"=>"string", "description"=>"The type of the document.", "required"=>false}, "id"=>{"type"=>"string", "description"=>"The id of the document, when not specified a doc param should be supplied."}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}, {"path"=>"/{index}/{type}/_termvectors", "methods"=>["GET", "POST"], "parts"=>{"index"=>{"type"=>"string", "description"=>"The index in which the document resides.", "required"=>true}, "type"=>{"type"=>"string", "description"=>"The type of the document.", "required"=>false}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"term_statistics"=>{"type"=>"boolean", "description"=>"Specifies if total term frequency and document frequency should be returned.", "default"=>false}, "field_statistics"=>{"type"=>"boolean", "description"=>"Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.", "default"=>true}, "fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields to return."}, "offsets"=>{"type"=>"boolean", "description"=>"Specifies if term offsets should be returned.", "default"=>true}, "positions"=>{"type"=>"boolean", "description"=>"Specifies if term positions should be returned.", "default"=>true}, "payloads"=>{"type"=>"boolean", "description"=>"Specifies if term payloads should be returned.", "default"=>true}, "preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)."}, "routing"=>{"type"=>"string", "description"=>"Specific routing value."}, "realtime"=>{"type"=>"boolean", "description"=>"Specifies if request is real-time as opposed to near-real-time (default: true)."}, "version"=>{"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type"=>{"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}}, "body"=>{"description"=>"Define parameters and or supply a document to get termvectors for. See documentation.", "required"=>false}}
1192
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html", "description" => "Returns information and statistics about terms in the fields of a particular document."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}/_termvectors/{id}", "methods" => ["GET", "POST"], "parts" => {"index" => {"type" => "string", "description" => "The index in which the document resides."}, "id" => {"type" => "string", "description" => "The id of the document, when not specified a doc param should be supplied."}}}, {"path" => "/{index}/_termvectors", "methods" => ["GET", "POST"], "parts" => {"index" => {"type" => "string", "description" => "The index in which the document resides."}}}, {"path" => "/{index}/{type}/{id}/_termvectors", "methods" => ["GET", "POST"], "parts" => {"index" => {"type" => "string", "description" => "The index in which the document resides.", "required" => true}, "type" => {"type" => "string", "description" => "The type of the document.", "required" => false}, "id" => {"type" => "string", "description" => "The id of the document, when not specified a doc param should be supplied."}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}, {"path" => "/{index}/{type}/_termvectors", "methods" => ["GET", "POST"], "parts" => {"index" => {"type" => "string", "description" => "The index in which the document resides.", "required" => true}, "type" => {"type" => "string", "description" => "The type of the document.", "required" => false}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"term_statistics" => {"type" => "boolean", "description" => "Specifies if total term frequency and document frequency should be returned.", "default" => false}, "field_statistics" => {"type" => "boolean", "description" => "Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.", "default" => true}, "fields" => {"type" => "list", "description" => "A comma-separated list of fields to return."}, "offsets" => {"type" => "boolean", "description" => "Specifies if term offsets should be returned.", "default" => true}, "positions" => {"type" => "boolean", "description" => "Specifies if term positions should be returned.", "default" => true}, "payloads" => {"type" => "boolean", "description" => "Specifies if term payloads should be returned.", "default" => true}, "preference" => {"type" => "string", "description" => "Specify the node or shard the operation should be performed on (default: random)."}, "routing" => {"type" => "string", "description" => "Specific routing value."}, "realtime" => {"type" => "boolean", "description" => "Specifies if request is real-time as opposed to near-real-time (default: true)."}, "version" => {"type" => "number", "description" => "Explicit version number for concurrency control"}, "version_type" => {"type" => "enum", "options" => ["internal", "external", "external_gte", "force"], "description" => "Specific version type"}}, "body" => {"description" => "Define parameters and or supply a document to get termvectors for. See documentation.", "required" => false}}
1193
1193
  request(api_name, api_spec, params)
1194
1194
  end
1195
1195
 
1196
1196
  # update
1197
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html", "description"=>"Updates a document with a script or partial document."}
1197
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html", "description" => "Updates a document with a script or partial document."}
1198
1198
  def update(params = {})
1199
1199
  api_name = 'update'
1200
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html", "description"=>"Updates a document with a script or partial document."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}/_update/{id}", "methods"=>["POST"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Document ID"}, "index"=>{"type"=>"string", "description"=>"The name of the index"}}}, {"path"=>"/{index}/{type}/{id}/_update", "methods"=>["POST"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Document ID"}, "index"=>{"type"=>"string", "description"=>"The name of the index"}, "type"=>{"type"=>"string", "description"=>"The type of the document", "deprecated"=>true}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"wait_for_active_shards"=>{"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the update operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "_source"=>{"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_excludes"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_includes"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "lang"=>{"type"=>"string", "description"=>"The script language (default: painless)"}, "refresh"=>{"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh 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` (the default) then do nothing with refreshes."}, "retry_on_conflict"=>{"type"=>"number", "description"=>"Specify how many times should the operation be retried when a conflict occurs (default: 0)"}, "routing"=>{"type"=>"string", "description"=>"Specific routing value"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "if_seq_no"=>{"type"=>"number", "description"=>"only perform the update operation if the last operation that has changed the document has the specified sequence number"}, "if_primary_term"=>{"type"=>"number", "description"=>"only perform the update operation if the last operation that has changed the document has the specified primary term"}, "require_alias"=>{"type"=>"boolean", "description"=>"When true, requires destination is an alias. Default is false"}}, "body"=>{"description"=>"The request definition requires either `script` or partial `doc`", "required"=>true}}
1200
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html", "description" => "Updates a document with a script or partial document."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}/_update/{id}", "methods" => ["POST"], "parts" => {"id" => {"type" => "string", "description" => "Document ID"}, "index" => {"type" => "string", "description" => "The name of the index"}}}, {"path" => "/{index}/{type}/{id}/_update", "methods" => ["POST"], "parts" => {"id" => {"type" => "string", "description" => "Document ID"}, "index" => {"type" => "string", "description" => "The name of the index"}, "type" => {"type" => "string", "description" => "The type of the document", "deprecated" => true}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"wait_for_active_shards" => {"type" => "string", "description" => "Sets the number of shard copies that must be active before proceeding with the update operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "_source" => {"type" => "list", "description" => "True or false to return the _source field or not, or a list of fields to return"}, "_source_excludes" => {"type" => "list", "description" => "A list of fields to exclude from the returned _source field"}, "_source_includes" => {"type" => "list", "description" => "A list of fields to extract and return from the _source field"}, "lang" => {"type" => "string", "description" => "The script language (default: painless)"}, "refresh" => {"type" => "enum", "options" => ["true", "false", "wait_for"], "description" => "If `true` then refresh 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` (the default) then do nothing with refreshes."}, "retry_on_conflict" => {"type" => "number", "description" => "Specify how many times should the operation be retried when a conflict occurs (default: 0)"}, "routing" => {"type" => "string", "description" => "Specific routing value"}, "timeout" => {"type" => "time", "description" => "Explicit operation timeout"}, "if_seq_no" => {"type" => "number", "description" => "only perform the update operation if the last operation that has changed the document has the specified sequence number"}, "if_primary_term" => {"type" => "number", "description" => "only perform the update operation if the last operation that has changed the document has the specified primary term"}, "require_alias" => {"type" => "boolean", "description" => "When true, requires destination is an alias. Default is false"}}, "body" => {"description" => "The request definition requires either `script` or partial `doc`", "required" => true}}
1201
1201
  request(api_name, api_spec, params)
1202
1202
  end
1203
1203
 
1204
1204
  # update_by_query
1205
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html", "description"=>"Performs an update on every document in the index without changing the source,\nfor example to pick up a mapping change."}
1205
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html", "description" => "Performs an update on every document in the index without changing the source,\nfor example to pick up a mapping change."}
1206
1206
  def update_by_query(params = {})
1207
1207
  api_name = 'update_by_query'
1208
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html", "description"=>"Performs an update on every document in the index without changing the source,\nfor example to pick up a mapping change."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/{index}/_update_by_query", "methods"=>["POST"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}}}, {"path"=>"/{index}/{type}/_update_by_query", "methods"=>["POST"], "parts"=>{"index"=>{"required"=>true, "type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, "type"=>{"type"=>"list", "description"=>"A comma-separated list of document types to search; leave empty to perform the operation on all types"}}, "deprecated"=>{"version"=>"7.0.0", "description"=>"Specifying types in urls has been deprecated"}}]}, "params"=>{"analyzer"=>{"type"=>"string", "description"=>"The analyzer to use for the query string"}, "analyze_wildcard"=>{"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, "default_operator"=>{"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, "df"=>{"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, "from"=>{"type"=>"number", "description"=>"Starting offset (default: 0)"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "conflicts"=>{"type"=>"enum", "options"=>["abort", "proceed"], "default"=>"abort", "description"=>"What to do when the update by query hits version conflicts?"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "hidden", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "lenient"=>{"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "pipeline"=>{"type"=>"string", "description"=>"Ingest pipeline to set on index requests made by this action. (default: none)"}, "preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "q"=>{"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, "routing"=>{"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, "scroll"=>{"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, "search_type"=>{"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}, "search_timeout"=>{"type"=>"time", "description"=>"Explicit timeout for each search request. Defaults to no timeout."}, "size"=>{"type"=>"number", "description"=>"Deprecated, please use `max_docs` instead"}, "max_docs"=>{"type"=>"number", "description"=>"Maximum number of documents to process (default: all documents)"}, "sort"=>{"type"=>"list", "description"=>"A comma-separated list of <field>:<direction> pairs"}, "_source"=>{"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_excludes"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_includes"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "terminate_after"=>{"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, "stats"=>{"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, "version"=>{"type"=>"boolean", "description"=>"Specify whether to return document version as part of a hit"}, "version_type"=>{"type"=>"boolean", "description"=>"Should the document increment the version number (internal) on hit or not (reindex)"}, "request_cache"=>{"type"=>"boolean", "description"=>"Specify if request cache should be used for this request or not, defaults to index level setting"}, "refresh"=>{"type"=>"boolean", "description"=>"Should the affected indexes be refreshed?"}, "timeout"=>{"type"=>"time", "default"=>"1m", "description"=>"Time each individual bulk request should wait for shards that are unavailable."}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "scroll_size"=>{"type"=>"number", "default"=>100, "description"=>"Size on the scroll request powering the update by query"}, "wait_for_completion"=>{"type"=>"boolean", "default"=>true, "description"=>"Should the request should block until the update by query operation is complete."}, "requests_per_second"=>{"type"=>"number", "default"=>0, "description"=>"The throttle to set on this request in sub-requests per second. -1 means no throttle."}, "slices"=>{"type"=>"number|string", "default"=>1, "description"=>"The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`."}}, "body"=>{"description"=>"The search definition using the Query DSL"}}
1208
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html", "description" => "Performs an update on every document in the index without changing the source,\nfor example to pick up a mapping change."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/{index}/_update_by_query", "methods" => ["POST"], "parts" => {"index" => {"type" => "list", "description" => "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}}}, {"path" => "/{index}/{type}/_update_by_query", "methods" => ["POST"], "parts" => {"index" => {"required" => true, "type" => "list", "description" => "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, "type" => {"type" => "list", "description" => "A comma-separated list of document types to search; leave empty to perform the operation on all types"}}, "deprecated" => {"version" => "7.0.0", "description" => "Specifying types in urls has been deprecated"}}]}, "params" => {"analyzer" => {"type" => "string", "description" => "The analyzer to use for the query string"}, "analyze_wildcard" => {"type" => "boolean", "description" => "Specify whether wildcard and prefix queries should be analyzed (default: false)"}, "default_operator" => {"type" => "enum", "options" => ["AND", "OR"], "default" => "OR", "description" => "The default operator for query string query (AND or OR)"}, "df" => {"type" => "string", "description" => "The field to use as default where no field prefix is given in the query string"}, "from" => {"type" => "number", "description" => "Starting offset (default: 0)"}, "ignore_unavailable" => {"type" => "boolean", "description" => "Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type" => "boolean", "description" => "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "conflicts" => {"type" => "enum", "options" => ["abort", "proceed"], "default" => "abort", "description" => "What to do when the update by query hits version conflicts?"}, "expand_wildcards" => {"type" => "enum", "options" => ["open", "closed", "hidden", "none", "all"], "default" => "open", "description" => "Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "lenient" => {"type" => "boolean", "description" => "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "pipeline" => {"type" => "string", "description" => "Ingest pipeline to set on index requests made by this action. (default: none)"}, "preference" => {"type" => "string", "description" => "Specify the node or shard the operation should be performed on (default: random)"}, "q" => {"type" => "string", "description" => "Query in the Lucene query string syntax"}, "routing" => {"type" => "list", "description" => "A comma-separated list of specific routing values"}, "scroll" => {"type" => "time", "description" => "Specify how long a consistent view of the index should be maintained for scrolled search"}, "search_type" => {"type" => "enum", "options" => ["query_then_fetch", "dfs_query_then_fetch"], "description" => "Search operation type"}, "search_timeout" => {"type" => "time", "description" => "Explicit timeout for each search request. Defaults to no timeout."}, "size" => {"type" => "number", "description" => "Deprecated, please use `max_docs` instead"}, "max_docs" => {"type" => "number", "description" => "Maximum number of documents to process (default: all documents)"}, "sort" => {"type" => "list", "description" => "A comma-separated list of <field>:<direction> pairs"}, "_source" => {"type" => "list", "description" => "True or false to return the _source field or not, or a list of fields to return"}, "_source_excludes" => {"type" => "list", "description" => "A list of fields to exclude from the returned _source field"}, "_source_includes" => {"type" => "list", "description" => "A list of fields to extract and return from the _source field"}, "terminate_after" => {"type" => "number", "description" => "The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, "stats" => {"type" => "list", "description" => "Specific 'tag' of the request for logging and statistical purposes"}, "version" => {"type" => "boolean", "description" => "Specify whether to return document version as part of a hit"}, "version_type" => {"type" => "boolean", "description" => "Should the document increment the version number (internal) on hit or not (reindex)"}, "request_cache" => {"type" => "boolean", "description" => "Specify if request cache should be used for this request or not, defaults to index level setting"}, "refresh" => {"type" => "boolean", "description" => "Should the affected indexes be refreshed?"}, "timeout" => {"type" => "time", "default" => "1m", "description" => "Time each individual bulk request should wait for shards that are unavailable."}, "wait_for_active_shards" => {"type" => "string", "description" => "Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "scroll_size" => {"type" => "number", "default" => 100, "description" => "Size on the scroll request powering the update by query"}, "wait_for_completion" => {"type" => "boolean", "default" => true, "description" => "Should the request should block until the update by query operation is complete."}, "requests_per_second" => {"type" => "number", "default" => 0, "description" => "The throttle to set on this request in sub-requests per second. -1 means no throttle."}, "slices" => {"type" => "number|string", "default" => 1, "description" => "The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`."}}, "body" => {"description" => "The search definition using the Query DSL"}}
1209
1209
  request(api_name, api_spec, params)
1210
1210
  end
1211
1211
 
1212
1212
  # update_by_query_rethrottle
1213
- # {"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html", "description"=>"Changes the number of requests per second for a particular Update By Query operation."}
1213
+ # {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html", "description" => "Changes the number of requests per second for a particular Update By Query operation."}
1214
1214
  def update_by_query_rethrottle(params = {})
1215
1215
  api_name = 'update_by_query_rethrottle'
1216
- api_spec = @api_specs[api_name] ||= {"documentation"=>{"url"=>"https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html", "description"=>"Changes the number of requests per second for a particular Update By Query operation."}, "stability"=>"stable", "url"=>{"paths"=>[{"path"=>"/_update_by_query/{task_id}/_rethrottle", "methods"=>["POST"], "parts"=>{"task_id"=>{"type"=>"string", "description"=>"The task id to rethrottle"}}}]}, "params"=>{"requests_per_second"=>{"type"=>"number", "required"=>true, "description"=>"The throttle to set on this request in floating sub-requests per second. -1 means set no throttle."}}}
1216
+ api_spec = @api_specs[api_name] ||= {"documentation" => {"url" => "https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html", "description" => "Changes the number of requests per second for a particular Update By Query operation."}, "stability" => "stable", "url" => {"paths" => [{"path" => "/_update_by_query/{task_id}/_rethrottle", "methods" => ["POST"], "parts" => {"task_id" => {"type" => "string", "description" => "The task id to rethrottle"}}}]}, "params" => {"requests_per_second" => {"type" => "number", "required" => true, "description" => "The throttle to set on this request in floating sub-requests per second. -1 means set no throttle."}}}
1217
1217
  request(api_name, api_spec, params)
1218
1218
  end
1219
1219
  end