antbird 0.0.8 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Antbird
2
- VERSION = "0.0.8"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,113 +1,117 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: antbird
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - fukayatsu
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-28 00:00:00.000000000 Z
11
+ date: 2020-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.8'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '2.0'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">"
25
28
  - !ruby/object:Gem::Version
26
29
  version: '0.8'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '2.0'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: faraday_middleware
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - "~>"
37
+ - - ">"
38
+ - !ruby/object:Gem::Version
39
+ version: '0.12'
40
+ - - "<"
32
41
  - !ruby/object:Gem::Version
33
- version: '0.10'
42
+ version: '2.0'
34
43
  type: :runtime
35
44
  prerelease: false
36
45
  version_requirements: !ruby/object:Gem::Requirement
37
46
  requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '0.10'
41
- - !ruby/object:Gem::Dependency
42
- name: bundler
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
47
+ - - ">"
46
48
  - !ruby/object:Gem::Version
47
- version: '1.16'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
49
+ version: '0.12'
50
+ - - "<"
53
51
  - !ruby/object:Gem::Version
54
- version: '1.16'
52
+ version: '2.0'
55
53
  - !ruby/object:Gem::Dependency
56
- name: rake
54
+ name: net-http-persistent
57
55
  requirement: !ruby/object:Gem::Requirement
58
56
  requirements:
59
- - - "~>"
57
+ - - ">="
60
58
  - !ruby/object:Gem::Version
61
- version: '10.0'
59
+ version: '0'
62
60
  type: :development
63
61
  prerelease: false
64
62
  version_requirements: !ruby/object:Gem::Requirement
65
63
  requirements:
66
- - - "~>"
64
+ - - ">="
67
65
  - !ruby/object:Gem::Version
68
- version: '10.0'
66
+ version: '0'
69
67
  - !ruby/object:Gem::Dependency
70
- name: rspec
68
+ name: bundler
71
69
  requirement: !ruby/object:Gem::Requirement
72
70
  requirements:
73
- - - "~>"
71
+ - - ">"
72
+ - !ruby/object:Gem::Version
73
+ version: '1.16'
74
+ - - "<"
74
75
  - !ruby/object:Gem::Version
75
76
  version: '3.0'
76
77
  type: :development
77
78
  prerelease: false
78
79
  version_requirements: !ruby/object:Gem::Requirement
79
80
  requirements:
80
- - - "~>"
81
+ - - ">"
82
+ - !ruby/object:Gem::Version
83
+ version: '1.16'
84
+ - - "<"
81
85
  - !ruby/object:Gem::Version
82
86
  version: '3.0'
83
87
  - !ruby/object:Gem::Dependency
84
- name: guard-rspec
88
+ name: rake
85
89
  requirement: !ruby/object:Gem::Requirement
86
90
  requirements:
87
91
  - - "~>"
88
92
  - !ruby/object:Gem::Version
89
- version: '4.0'
93
+ version: '13.0'
90
94
  type: :development
91
95
  prerelease: false
92
96
  version_requirements: !ruby/object:Gem::Requirement
93
97
  requirements:
94
98
  - - "~>"
95
99
  - !ruby/object:Gem::Version
96
- version: '4.0'
100
+ version: '13.0'
97
101
  - !ruby/object:Gem::Dependency
98
- name: rspec-nc
102
+ name: rspec
99
103
  requirement: !ruby/object:Gem::Requirement
100
104
  requirements:
101
- - - ">="
105
+ - - "~>"
102
106
  - !ruby/object:Gem::Version
103
- version: '0'
107
+ version: '3.0'
104
108
  type: :development
105
109
  prerelease: false
106
110
  version_requirements: !ruby/object:Gem::Requirement
107
111
  requirements:
108
- - - ">="
112
+ - - "~>"
109
113
  - !ruby/object:Gem::Version
110
- version: '0'
114
+ version: '3.0'
111
115
  - !ruby/object:Gem::Dependency
112
116
  name: octokit
113
117
  requirement: !ruby/object:Gem::Requirement
@@ -136,16 +140,17 @@ dependencies:
136
140
  - - "~>"
137
141
  - !ruby/object:Gem::Version
138
142
  version: '3.0'
139
- description: Nearly auto-generated Elasticsearch client
143
+ description: Antbird is a yet another low level API client for the Elasticsearch HTTP
144
+ interface.
140
145
  email:
141
146
  - fukayatsu@gmail.com
142
147
  executables: []
143
148
  extensions: []
144
149
  extra_rdoc_files: []
145
150
  files:
151
+ - ".github/workflows/build.yml"
146
152
  - ".gitignore"
147
153
  - ".rspec"
148
- - ".travis.yml"
149
154
  - CODE_OF_CONDUCT.md
150
155
  - Gemfile
151
156
  - Guardfile
@@ -158,18 +163,22 @@ files:
158
163
  - lib/antbird.rb
159
164
  - lib/antbird/client.rb
160
165
  - lib/antbird/client/errors.rb
161
- - lib/antbird/rest_api/rest_api_v5_1.rb
162
- - lib/antbird/rest_api/rest_api_v5_5.rb
163
- - lib/antbird/rest_api/rest_api_v5_6.rb
164
- - lib/antbird/rest_api/rest_api_v6_1.rb
165
- - lib/antbird/rest_api/rest_api_v6_2.rb
166
- - lib/antbird/rest_api/rest_api_v6_3.rb
167
166
  - lib/antbird/rest_api/rest_api_v6_4.rb
168
167
  - lib/antbird/rest_api/rest_api_v6_5.rb
168
+ - lib/antbird/rest_api/rest_api_v6_6.rb
169
+ - lib/antbird/rest_api/rest_api_v6_7.rb
170
+ - lib/antbird/rest_api/rest_api_v6_8.rb
171
+ - lib/antbird/rest_api/rest_api_v7_0.rb
172
+ - lib/antbird/rest_api/rest_api_v7_1.rb
173
+ - lib/antbird/rest_api/rest_api_v7_2.rb
174
+ - lib/antbird/rest_api/rest_api_v7_3.rb
175
+ - lib/antbird/rest_api/rest_api_v7_4.rb
176
+ - lib/antbird/rest_api/rest_api_v7_5.rb
177
+ - lib/antbird/rest_api/rest_api_v7_6.rb
178
+ - lib/antbird/rest_api/rest_api_v7_7.rb
179
+ - lib/antbird/rest_api/rest_api_v7_8.rb
180
+ - lib/antbird/rest_api/rest_api_v7_9.rb
169
181
  - lib/antbird/version.rb
170
- - script/generate_api_methods
171
- - script/rest_api_template.erb
172
- - tmp/.keep
173
182
  homepage: https://github.com/fukayatsu/antbird
174
183
  licenses:
175
184
  - MIT
@@ -189,8 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
198
  - !ruby/object:Gem::Version
190
199
  version: '0'
191
200
  requirements: []
192
- rubyforge_project:
193
- rubygems_version: 2.7.6
201
+ rubygems_version: 3.0.3
194
202
  signing_key:
195
203
  specification_version: 4
196
204
  summary: Nearly auto-generated Elasticsearch client
@@ -1,23 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.5.3
5
- env:
6
- - ES_VERSION=6.5.4
7
- - ES_VERSION=6.4.3
8
- - ES_VERSION=6.3.2
9
- - ES_VERSION=6.2.4
10
- - ES_VERSION=6.1.4
11
- - ES_VERSION=5.6.9
12
- - ES_VERSION=5.5.3
13
- - ES_VERSION=5.1.2
14
-
15
- before_install: gem install bundler -v 1.16.1
16
- install:
17
- - wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz
18
- - tar -xzf elasticsearch-${ES_VERSION}.tar.gz
19
- - ./elasticsearch-${ES_VERSION}/bin/elasticsearch &
20
- - bundle install
21
- - wget --quiet --waitretry=1 --retry-connrefused --timeout=10 --output-document=- http://127.0.0.1:9200
22
-
23
- script: bundle exec rspec
@@ -1,987 +0,0 @@
1
- # Generated REST API methods file - DO NOT EDIT!
2
- # Date: 2018-10-03
3
- # ES version: 5.1.2
4
-
5
- module Antbird
6
- module RestApi
7
- module RestApiV5_1
8
- def common_params
9
- @common_params ||= {}
10
- end
11
-
12
- # bulk ["POST", "PUT"]
13
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-bulk.html
14
- def bulk(params = {})
15
- api_name = 'bulk'
16
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-bulk.html", "methods"=>["POST", "PUT"], "url"=>{"path"=>"/_bulk", "paths"=>["/_bulk", "/{index}/_bulk", "/{index}/{type}/_bulk"], "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 effected 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"}, "fields"=>{"type"=>"list", "description"=>"Default comma-separated list of fields to return in the response for updates, can be overridden on each sub-request"}, "_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_exclude"=>{"type"=>"list", "description"=>"Default list of fields to exclude from the returned _source field, can be overridden on each sub-request"}, "_source_include"=>{"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"}}}, "body"=>{"description"=>"The operation definition and data (action-data pairs), separated by newlines", "required"=>true, "serialize"=>"bulk"}}
17
- request(api_name, api_spec, params)
18
- end
19
-
20
- # cat.aliases ["GET"]
21
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-alias.html
22
- def cat_aliases(params = {})
23
- api_name = 'cat.aliases'
24
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-alias.html", "methods"=>["GET"], "url"=>{"path"=>"/_cat/aliases", "paths"=>["/_cat/aliases", "/_cat/aliases/{name}"], "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)"}, "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}}}, "body"=>nil}
25
- request(api_name, api_spec, params)
26
- end
27
-
28
- # cat.allocation ["GET"]
29
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-allocation.html
30
- def cat_allocation(params = {})
31
- api_name = 'cat.allocation'
32
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-allocation.html", "methods"=>["GET"], "url"=>{"path"=>"/_cat/allocation", "paths"=>["/_cat/allocation", "/_cat/allocation/{node_id}"], "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}}}, "body"=>nil}
33
- request(api_name, api_spec, params)
34
- end
35
-
36
- # cat.count ["GET"]
37
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-count.html
38
- def cat_count(params = {})
39
- api_name = 'cat.count'
40
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-count.html", "methods"=>["GET"], "url"=>{"path"=>"/_cat/count", "paths"=>["/_cat/count", "/_cat/count/{index}"], "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"}, "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}}}, "body"=>nil}
41
- request(api_name, api_spec, params)
42
- end
43
-
44
- # cat.fielddata ["GET"]
45
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-fielddata.html
46
- def cat_fielddata(params = {})
47
- api_name = 'cat.fielddata'
48
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-fielddata.html", "methods"=>["GET"], "url"=>{"path"=>"/_cat/fielddata", "paths"=>["/_cat/fielddata", "/_cat/fielddata/{fields}"], "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"]}, "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}, "fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields to return in the output"}}}, "body"=>nil}
49
- request(api_name, api_spec, params)
50
- end
51
-
52
- # cat.health ["GET"]
53
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-health.html
54
- def cat_health(params = {})
55
- api_name = 'cat.health'
56
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-health.html", "methods"=>["GET"], "url"=>{"path"=>"/_cat/health", "paths"=>["/_cat/health"], "parts"=>{}, "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"}, "ts"=>{"type"=>"boolean", "description"=>"Set to false to disable timestamping", "default"=>true}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}}}, "body"=>nil}
57
- request(api_name, api_spec, params)
58
- end
59
-
60
- # cat.help ["GET"]
61
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat.html
62
- def cat_help(params = {})
63
- api_name = 'cat.help'
64
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat.html", "methods"=>["GET"], "url"=>{"path"=>"/_cat", "paths"=>["/_cat"], "parts"=>{}, "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"}}}, "body"=>nil}
65
- request(api_name, api_spec, params)
66
- end
67
-
68
- # cat.indices ["GET"]
69
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-indices.html
70
- def cat_indices(params = {})
71
- api_name = 'cat.indices'
72
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-indices.html", "methods"=>["GET"], "url"=>{"path"=>"/_cat/indices", "paths"=>["/_cat/indices", "/_cat/indices/{index}"], "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", "m", "g"]}, "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"], "default"=>nil, "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"}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}}}, "body"=>nil}
73
- request(api_name, api_spec, params)
74
- end
75
-
76
- # cat.master ["GET"]
77
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-master.html
78
- def cat_master(params = {})
79
- api_name = 'cat.master'
80
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-master.html", "methods"=>["GET"], "url"=>{"path"=>"/_cat/master", "paths"=>["/_cat/master"], "parts"=>{}, "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}}}, "body"=>nil}
81
- request(api_name, api_spec, params)
82
- end
83
-
84
- # cat.nodeattrs ["GET"]
85
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-nodeattrs.html
86
- def cat_nodeattrs(params = {})
87
- api_name = 'cat.nodeattrs'
88
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-nodeattrs.html", "methods"=>["GET"], "url"=>{"path"=>"/_cat/nodeattrs", "paths"=>["/_cat/nodeattrs"], "parts"=>{}, "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}}}, "body"=>nil}
89
- request(api_name, api_spec, params)
90
- end
91
-
92
- # cat.nodes ["GET"]
93
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-nodes.html
94
- def cat_nodes(params = {})
95
- api_name = 'cat.nodes'
96
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-nodes.html", "methods"=>["GET"], "url"=>{"path"=>"/_cat/nodes", "paths"=>["/_cat/nodes"], "parts"=>{}, "params"=>{"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"=>"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}}}, "body"=>nil}
97
- request(api_name, api_spec, params)
98
- end
99
-
100
- # cat.pending_tasks ["GET"]
101
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-pending-tasks.html
102
- def cat_pending_tasks(params = {})
103
- api_name = 'cat.pending_tasks'
104
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-pending-tasks.html", "methods"=>["GET"], "url"=>{"path"=>"/_cat/pending_tasks", "paths"=>["/_cat/pending_tasks"], "parts"=>{}, "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}}}, "body"=>nil}
105
- request(api_name, api_spec, params)
106
- end
107
-
108
- # cat.plugins ["GET"]
109
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-plugins.html
110
- def cat_plugins(params = {})
111
- api_name = 'cat.plugins'
112
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-plugins.html", "methods"=>["GET"], "url"=>{"path"=>"/_cat/plugins", "paths"=>["/_cat/plugins"], "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}}}, "body"=>nil}
113
- request(api_name, api_spec, params)
114
- end
115
-
116
- # cat.recovery ["GET"]
117
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-recovery.html
118
- def cat_recovery(params = {})
119
- api_name = 'cat.recovery'
120
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-recovery.html", "methods"=>["GET"], "url"=>{"path"=>"/_cat/recovery", "paths"=>["/_cat/recovery", "/_cat/recovery/{index}"], "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"]}, "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}}}, "body"=>nil}
121
- request(api_name, api_spec, params)
122
- end
123
-
124
- # cat.repositories ["GET"]
125
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-repositories.html
126
- def cat_repositories(params = {})
127
- api_name = 'cat.repositories'
128
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-repositories.html", "methods"=>["GET"], "url"=>{"path"=>"/_cat/repositories", "paths"=>["/_cat/repositories"], "parts"=>{}, "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}}}, "body"=>nil}
129
- request(api_name, api_spec, params)
130
- end
131
-
132
- # cat.segments ["GET"]
133
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-segments.html
134
- def cat_segments(params = {})
135
- api_name = 'cat.segments'
136
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-segments.html", "methods"=>["GET"], "url"=>{"path"=>"/_cat/segments", "paths"=>["/_cat/segments", "/_cat/segments/{index}"], "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}}}, "body"=>nil}
137
- request(api_name, api_spec, params)
138
- end
139
-
140
- # cat.shards ["GET"]
141
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-shards.html
142
- def cat_shards(params = {})
143
- api_name = 'cat.shards'
144
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-shards.html", "methods"=>["GET"], "url"=>{"path"=>"/_cat/shards", "paths"=>["/_cat/shards", "/_cat/shards/{index}"], "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"}, "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}}}, "body"=>nil}
145
- request(api_name, api_spec, params)
146
- end
147
-
148
- # cat.snapshots ["GET"]
149
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-snapshots.html
150
- def cat_snapshots(params = {})
151
- api_name = 'cat.snapshots'
152
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-snapshots.html", "methods"=>["GET"], "url"=>{"path"=>"/_cat/snapshots", "paths"=>["/_cat/snapshots", "/_cat/snapshots/{repository}"], "parts"=>{"repository"=>{"type"=>"list", "required"=>true, "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"}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}}}, "body"=>nil}
153
- request(api_name, api_spec, params)
154
- end
155
-
156
- # cat.tasks ["GET"]
157
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/tasks.html
158
- def cat_tasks(params = {})
159
- api_name = 'cat.tasks'
160
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/tasks.html", "methods"=>["GET"], "url"=>{"path"=>"/_cat/tasks", "paths"=>["/_cat/tasks"], "parts"=>{}, "params"=>{"format"=>{"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "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"}, "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_node"=>{"type"=>"string", "description"=>"Return tasks with specified parent node."}, "parent_task"=>{"type"=>"number", "description"=>"Return tasks with specified parent task id. 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"}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}}}, "body"=>nil}
161
- request(api_name, api_spec, params)
162
- end
163
-
164
- # cat.templates ["GET"]
165
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-templates.html
166
- def cat_templates(params = {})
167
- api_name = 'cat.templates'
168
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-templates.html", "methods"=>["GET"], "url"=>{"path"=>"/_cat/templates", "paths"=>["/_cat/templates", "/_cat/templates/{name}"], "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}}}, "body"=>nil}
169
- request(api_name, api_spec, params)
170
- end
171
-
172
- # cat.thread_pool ["GET"]
173
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-thread-pool.html
174
- def cat_thread_pool(params = {})
175
- api_name = 'cat.thread_pool'
176
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-thread-pool.html", "methods"=>["GET"], "url"=>{"path"=>"/_cat/thread_pool", "paths"=>["/_cat/thread_pool", "/_cat/thread_pool/{thread_pool_patterns}"], "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"]}, "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}}}, "body"=>nil}
177
- request(api_name, api_spec, params)
178
- end
179
-
180
- # clear_scroll ["DELETE"]
181
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-request-scroll.html
182
- def clear_scroll(params = {})
183
- api_name = 'clear_scroll'
184
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-request-scroll.html", "methods"=>["DELETE"], "url"=>{"path"=>"/_search/scroll/{scroll_id}", "paths"=>["/_search/scroll/{scroll_id}", "/_search/scroll"], "parts"=>{"scroll_id"=>{"type"=>"list", "description"=>"A comma-separated list of scroll IDs to clear"}}, "params"=>{}}, "body"=>{"description"=>"A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter"}}
185
- request(api_name, api_spec, params)
186
- end
187
-
188
- # cluster.allocation_explain ["GET", "POST"]
189
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-allocation-explain.html
190
- def cluster_allocation_explain(params = {})
191
- api_name = 'cluster.allocation_explain'
192
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-allocation-explain.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/_cluster/allocation/explain", "paths"=>["/_cluster/allocation/explain"], "parts"=>{}, "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'"}}
193
- request(api_name, api_spec, params)
194
- end
195
-
196
- # cluster.get_settings ["GET"]
197
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-update-settings.html
198
- def cluster_get_settings(params = {})
199
- api_name = 'cluster.get_settings'
200
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-update-settings.html", "methods"=>["GET"], "url"=>{"path"=>"/_cluster/settings", "paths"=>["/_cluster/settings"], "parts"=>{}, "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}}}, "body"=>nil}
201
- request(api_name, api_spec, params)
202
- end
203
-
204
- # cluster.health ["GET"]
205
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-health.html
206
- def cluster_health(params = {})
207
- api_name = 'cluster.health'
208
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-health.html", "methods"=>["GET"], "url"=>{"path"=>"/_cluster/health", "paths"=>["/_cluster/health", "/_cluster/health/{index}"], "parts"=>{"index"=>{"type"=>"list", "description"=>"Limit the information returned to a specific index"}}, "params"=>{"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_status"=>{"type"=>"enum", "options"=>["green", "yellow", "red"], "default"=>nil, "description"=>"Wait until cluster is in a specific state"}}}, "body"=>nil}
209
- request(api_name, api_spec, params)
210
- end
211
-
212
- # cluster.pending_tasks ["GET"]
213
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-pending.html
214
- def cluster_pending_tasks(params = {})
215
- api_name = 'cluster.pending_tasks'
216
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-pending.html", "methods"=>["GET"], "url"=>{"path"=>"/_cluster/pending_tasks", "paths"=>["/_cluster/pending_tasks"], "parts"=>{}, "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"}}}, "body"=>nil}
217
- request(api_name, api_spec, params)
218
- end
219
-
220
- # cluster.put_settings ["PUT"]
221
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-update-settings.html
222
- def cluster_put_settings(params = {})
223
- api_name = 'cluster.put_settings'
224
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-update-settings.html", "methods"=>["PUT"], "url"=>{"path"=>"/_cluster/settings", "paths"=>["/_cluster/settings"], "parts"=>{}, "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)."}}
225
- request(api_name, api_spec, params)
226
- end
227
-
228
- # cluster.reroute ["POST"]
229
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-reroute.html
230
- def cluster_reroute(params = {})
231
- api_name = 'cluster.reroute'
232
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-reroute.html", "methods"=>["POST"], "url"=>{"path"=>"/_cluster/reroute", "paths"=>["/_cluster/reroute"], "parts"=>{}, "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`)"}}
233
- request(api_name, api_spec, params)
234
- end
235
-
236
- # cluster.state ["GET"]
237
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-state.html
238
- def cluster_state(params = {})
239
- api_name = 'cluster.state'
240
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-state.html", "methods"=>["GET"], "url"=>{"path"=>"/_cluster/state", "paths"=>["/_cluster/state", "/_cluster/state/{metric}", "/_cluster/state/{metric}/{index}"], "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)"}, "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."}}}, "body"=>nil}
241
- request(api_name, api_spec, params)
242
- end
243
-
244
- # cluster.stats ["GET"]
245
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-stats.html
246
- def cluster_stats(params = {})
247
- api_name = 'cluster.stats'
248
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-stats.html", "methods"=>["GET"], "url"=>{"path"=>"/_cluster/stats", "paths"=>["/_cluster/stats", "/_cluster/stats/nodes/{node_id}"], "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)"}, "human"=>{"type"=>"boolean", "description"=>"Whether to return time and byte values in human-readable format.", "default"=>false}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}}, "body"=>nil}
249
- request(api_name, api_spec, params)
250
- end
251
-
252
- # count ["POST", "GET"]
253
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-count.html
254
- def count(params = {})
255
- api_name = 'count'
256
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-count.html", "methods"=>["POST", "GET"], "url"=>{"path"=>"/_count", "paths"=>["/_count", "/{index}/_count", "/{index}/{type}/_count"], "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"}}, "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."}, "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"=>"string", "description"=>"Specific routing value"}, "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"}}}, "body"=>{"description"=>"A query to restrict the results specified with the Query DSL (optional)"}}
257
- request(api_name, api_spec, params)
258
- end
259
-
260
- # count_percolate ["GET", "POST"]
261
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-percolate.html
262
- def count_percolate(params = {})
263
- api_name = 'count_percolate'
264
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-percolate.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/{index}/{type}/_percolate/count", "paths"=>["/{index}/{type}/_percolate/count", "/{index}/{type}/{id}/_percolate/count"], "parts"=>{"index"=>{"type"=>"string", "required"=>true, "description"=>"The index of the document being count percolated."}, "type"=>{"type"=>"string", "required"=>true, "description"=>"The type of the document being count percolated."}, "id"=>{"type"=>"string", "required"=>false, "description"=>"Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster."}}, "params"=>{"routing"=>{"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, "preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "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."}, "percolate_index"=>{"type"=>"string", "description"=>"The index to count percolate the document into. Defaults to index."}, "percolate_type"=>{"type"=>"string", "description"=>"The type to count percolate document into. Defaults to type."}, "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"=>"The count percolator request definition using the percolate DSL", "required"=>false}}
265
- request(api_name, api_spec, params)
266
- end
267
-
268
- # create ["PUT", "POST"]
269
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-index_.html
270
- def create(params = {})
271
- api_name = 'create'
272
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-index_.html", "methods"=>["PUT", "POST"], "url"=>{"path"=>"/{index}/{type}/{id}/_create", "paths"=>["/{index}/{type}/{id}/_create"], "parts"=>{"id"=>{"type"=>"string", "required"=>true, "description"=>"Document ID"}, "index"=>{"type"=>"string", "required"=>true, "description"=>"The name of the index"}, "type"=>{"type"=>"string", "required"=>true, "description"=>"The type of the document"}}, "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)"}, "parent"=>{"type"=>"string", "description"=>"ID of the parent document"}, "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"}, "timestamp"=>{"type"=>"time", "description"=>"Explicit timestamp for the document"}, "ttl"=>{"type"=>"time", "description"=>"Expiration time for the document"}, "version"=>{"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type"=>{"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, "pipeline"=>{"type"=>"string", "description"=>"The pipeline id to preprocess incoming documents with"}}}, "body"=>{"description"=>"The document", "required"=>true}}
273
- request(api_name, api_spec, params)
274
- end
275
-
276
- # delete ["DELETE"]
277
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-delete.html
278
- def delete(params = {})
279
- api_name = 'delete'
280
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-delete.html", "methods"=>["DELETE"], "url"=>{"path"=>"/{index}/{type}/{id}", "paths"=>["/{index}/{type}/{id}"], "parts"=>{"id"=>{"type"=>"string", "required"=>true, "description"=>"The document ID"}, "index"=>{"type"=>"string", "required"=>true, "description"=>"The name of the index"}, "type"=>{"type"=>"string", "required"=>true, "description"=>"The type of the document"}}, "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)"}, "parent"=>{"type"=>"string", "description"=>"ID of parent document"}, "refresh"=>{"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh the effected 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", "force"], "description"=>"Specific version type"}}}, "body"=>nil}
281
- request(api_name, api_spec, params)
282
- end
283
-
284
- # delete_by_query ["POST"]
285
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-delete-by-query.html
286
- def delete_by_query(params = {})
287
- api_name = 'delete_by_query'
288
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-delete-by-query.html", "methods"=>["POST"], "url"=>{"path"=>"/{index}/_delete_by_query", "paths"=>["/{index}/_delete_by_query", "/{index}/{type}/_delete_by_query"], "comment"=>"most things below this are just copied from search.json", "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"}}, "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"=>{"note"=>"This is not copied from search", "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", "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"=>"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_exclude"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include"=>{"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", "defaut_value"=>100, "description"=>"Size on the scroll request powering the update_by_query"}, "wait_for_completion"=>{"type"=>"boolean", "default"=>false, "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"=>"integer", "default"=>1, "description"=>"The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks."}}}, "body"=>{"description"=>"The search definition using the Query DSL", "required"=>true}}
289
- request(api_name, api_spec, params)
290
- end
291
-
292
- # delete_script ["DELETE"]
293
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-scripting.html
294
- def delete_script(params = {})
295
- api_name = 'delete_script'
296
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-scripting.html", "methods"=>["DELETE"], "url"=>{"path"=>"/_scripts/{lang}/{id}", "paths"=>["/_scripts/{lang}/{id}"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Script ID", "required"=>true}, "lang"=>{"type"=>"string", "description"=>"Script language", "required"=>true}}, "params"=>{}}, "body"=>nil}
297
- request(api_name, api_spec, params)
298
- end
299
-
300
- # delete_template ["DELETE"]
301
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-template.html
302
- def delete_template(params = {})
303
- api_name = 'delete_template'
304
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-template.html", "methods"=>["DELETE"], "url"=>{"path"=>"/_search/template/{id}", "paths"=>["/_search/template/{id}"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Template ID", "required"=>true}}, "params"=>{}}, "body"=>nil}
305
- request(api_name, api_spec, params)
306
- end
307
-
308
- # exists ["HEAD"]
309
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-get.html
310
- def exists(params = {})
311
- api_name = 'exists'
312
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-get.html", "methods"=>["HEAD"], "url"=>{"path"=>"/{index}/{type}/{id}", "paths"=>["/{index}/{type}/{id}"], "parts"=>{"id"=>{"type"=>"string", "required"=>true, "description"=>"The document ID"}, "index"=>{"type"=>"string", "required"=>true, "description"=>"The name of the index"}, "type"=>{"type"=>"string", "required"=>true, "description"=>"The type of the document (use `_all` to fetch the first document matching the ID across all types)"}}, "params"=>{"parent"=>{"type"=>"string", "description"=>"The ID of the parent document"}, "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"}}}, "body"=>nil}
313
- request(api_name, api_spec, params)
314
- end
315
- alias :exists? :exists
316
-
317
- # explain ["GET", "POST"]
318
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-explain.html
319
- def explain(params = {})
320
- api_name = 'explain'
321
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-explain.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/{index}/{type}/{id}/_explain", "paths"=>["/{index}/{type}/{id}/_explain"], "parts"=>{"id"=>{"type"=>"string", "required"=>true, "description"=>"The document ID"}, "index"=>{"type"=>"string", "required"=>true, "description"=>"The name of the index"}, "type"=>{"type"=>"string", "required"=>true, "description"=>"The type of the document"}}, "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"}, "parent"=>{"type"=>"string", "description"=>"The ID of the parent document"}, "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_exclude"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}}}, "body"=>{"description"=>"The query definition using the Query DSL"}}
322
- request(api_name, api_spec, params)
323
- end
324
-
325
- # field_stats ["GET", "POST"]
326
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-field-stats.html
327
- def field_stats(params = {})
328
- api_name = 'field_stats'
329
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-field-stats.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/_field_stats", "paths"=>["/_field_stats", "/{index}/_field_stats"], "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 fields for to get field statistics for (min value, max value, and more)"}, "level"=>{"type"=>"enum", "options"=>["indices", "cluster"], "default"=>"cluster", "description"=>"Defines if field stats should be returned on a per index level or on a cluster wide level"}, "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."}}}, "body"=>{"description"=>"Field json objects containing the name and optionally a range to filter out indices result, that have results outside the defined bounds", "required"=>false}}
330
- request(api_name, api_spec, params)
331
- end
332
-
333
- # get ["GET"]
334
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-get.html
335
- def get(params = {})
336
- api_name = 'get'
337
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-get.html", "methods"=>["GET"], "url"=>{"path"=>"/{index}/{type}/{id}", "paths"=>["/{index}/{type}/{id}"], "parts"=>{"id"=>{"type"=>"string", "required"=>true, "description"=>"The document ID"}, "index"=>{"type"=>"string", "required"=>true, "description"=>"The name of the index"}, "type"=>{"type"=>"string", "required"=>true, "description"=>"The type of the document (use `_all` to fetch the first document matching the ID across all types)"}}, "params"=>{"stored_fields"=>{"type"=>"list", "description"=>"A comma-separated list of stored fields to return in the response"}, "parent"=>{"type"=>"string", "description"=>"The ID of the parent document"}, "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_exclude"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include"=>{"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"}}}, "body"=>nil}
338
- request(api_name, api_spec, params)
339
- end
340
-
341
- # get_script ["GET"]
342
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-scripting.html
343
- def get_script(params = {})
344
- api_name = 'get_script'
345
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-scripting.html", "methods"=>["GET"], "url"=>{"path"=>"/_scripts/{lang}/{id}", "paths"=>["/_scripts/{lang}/{id}"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Script ID", "required"=>true}, "lang"=>{"type"=>"string", "description"=>"Script language", "required"=>true}}, "params"=>{}}, "body"=>nil}
346
- request(api_name, api_spec, params)
347
- end
348
-
349
- # get_source ["GET"]
350
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-get.html
351
- def get_source(params = {})
352
- api_name = 'get_source'
353
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-get.html", "methods"=>["GET"], "url"=>{"path"=>"/{index}/{type}/{id}/_source", "paths"=>["/{index}/{type}/{id}/_source"], "parts"=>{"id"=>{"type"=>"string", "required"=>true, "description"=>"The document ID"}, "index"=>{"type"=>"string", "required"=>true, "description"=>"The name of the index"}, "type"=>{"type"=>"string", "required"=>true, "description"=>"The type of the document; use `_all` to fetch the first document matching the ID across all types"}}, "params"=>{"parent"=>{"type"=>"string", "description"=>"The ID of the parent document"}, "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_exclude"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include"=>{"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"}}}, "body"=>nil}
354
- request(api_name, api_spec, params)
355
- end
356
-
357
- # get_template ["GET"]
358
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-template.html
359
- def get_template(params = {})
360
- api_name = 'get_template'
361
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-template.html", "methods"=>["GET"], "url"=>{"path"=>"/_search/template/{id}", "paths"=>["/_search/template/{id}"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Template ID", "required"=>true}}, "params"=>{}}, "body"=>nil}
362
- request(api_name, api_spec, params)
363
- end
364
-
365
- # index ["POST", "PUT"]
366
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-index_.html
367
- def index(params = {})
368
- api_name = 'index'
369
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-index_.html", "methods"=>["POST", "PUT"], "url"=>{"path"=>"/{index}/{type}", "paths"=>["/{index}/{type}", "/{index}/{type}/{id}"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Document ID"}, "index"=>{"type"=>"string", "required"=>true, "description"=>"The name of the index"}, "type"=>{"type"=>"string", "required"=>true, "description"=>"The type of the document"}}, "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"], "default"=>"index", "description"=>"Explicit operation type"}, "parent"=>{"type"=>"string", "description"=>"ID of the parent document"}, "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"}, "timestamp"=>{"type"=>"time", "description"=>"Explicit timestamp for the document"}, "ttl"=>{"type"=>"time", "description"=>"Expiration time for the document"}, "version"=>{"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type"=>{"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, "pipeline"=>{"type"=>"string", "description"=>"The pipeline id to preprocess incoming documents with"}}}, "body"=>{"description"=>"The document", "required"=>true}}
370
- request(api_name, api_spec, params)
371
- end
372
-
373
- # indices.analyze ["GET", "POST"]
374
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-analyze.html
375
- def indices_analyze(params = {})
376
- api_name = 'indices.analyze'
377
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-analyze.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/_analyze", "paths"=>["/_analyze", "/{index}/_analyze"], "parts"=>{"index"=>{"type"=>"string", "description"=>"The name of the index to scope the operation"}}, "params"=>{"analyzer"=>{"type"=>"string", "description"=>"The name of the analyzer to use"}, "char_filter"=>{"type"=>"list", "description"=>"A comma-separated list of character filters to use for the analysis"}, "field"=>{"type"=>"string", "description"=>"Use the analyzer configured for this field (instead of passing the analyzer name)"}, "filter"=>{"type"=>"list", "description"=>"A comma-separated list of filters to use for the analysis"}, "index"=>{"type"=>"string", "description"=>"The name of the index to scope the operation"}, "prefer_local"=>{"type"=>"boolean", "description"=>"With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)"}, "text"=>{"type"=>"list", "description"=>"The text on which the analysis should be performed (when request body is not used)"}, "tokenizer"=>{"type"=>"string", "description"=>"The name of the tokenizer to use for the analysis"}, "explain"=>{"type"=>"boolean", "description"=>"With `true`, outputs more advanced details. (default: false)"}, "attributes"=>{"type"=>"list", "description"=>"A comma-separated list of token attributes to output, this parameter works only with `explain=true`"}, "format"=>{"type"=>"enum", "options"=>["detailed", "text"], "default"=>"detailed", "description"=>"Format of the output"}}}, "body"=>{"description"=>"The text on which the analysis should be performed"}}
378
- request(api_name, api_spec, params)
379
- end
380
-
381
- # indices.clear_cache ["POST", "GET"]
382
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-clearcache.html
383
- def indices_clear_cache(params = {})
384
- api_name = 'indices.clear_cache'
385
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-clearcache.html", "methods"=>["POST", "GET"], "url"=>{"path"=>"/_cache/clear", "paths"=>["/_cache/clear", "/{index}/_cache/clear"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index name to limit the operation"}}, "params"=>{"field_data"=>{"type"=>"boolean", "description"=>"Clear field data"}, "fielddata"=>{"type"=>"boolean", "description"=>"Clear field data"}, "fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields to clear when using the `field_data` 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", "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"}, "recycler"=>{"type"=>"boolean", "description"=>"Clear the recycler cache"}, "request"=>{"type"=>"boolean", "description"=>"Clear request cache"}}}, "body"=>nil}
386
- request(api_name, api_spec, params)
387
- end
388
-
389
- # indices.close ["POST"]
390
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-open-close.html
391
- def indices_close(params = {})
392
- api_name = 'indices.close'
393
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-open-close.html", "methods"=>["POST"], "url"=>{"path"=>"/{index}/_close", "paths"=>["/{index}/_close"], "parts"=>{"index"=>{"type"=>"list", "required"=>true, "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", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}, "body"=>nil}
394
- request(api_name, api_spec, params)
395
- end
396
-
397
- # indices.create ["PUT"]
398
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-create-index.html
399
- def indices_create(params = {})
400
- api_name = 'indices.create'
401
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-create-index.html", "methods"=>["PUT"], "url"=>{"path"=>"/{index}", "paths"=>["/{index}"], "parts"=>{"index"=>{"type"=>"string", "required"=>true, "description"=>"The name of the index"}}, "params"=>{"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"}, "update_all_types"=>{"type"=>"boolean", "description"=>"Whether to update the mapping for all fields with the same name across all types or not"}}}, "body"=>{"description"=>"The configuration for the index (`settings` and `mappings`)"}}
402
- request(api_name, api_spec, params)
403
- end
404
-
405
- # indices.delete ["DELETE"]
406
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-delete-index.html
407
- def indices_delete(params = {})
408
- api_name = 'indices.delete'
409
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-delete-index.html", "methods"=>["DELETE"], "url"=>{"path"=>"/{index}", "paths"=>["/{index}"], "parts"=>{"index"=>{"type"=>"list", "required"=>true, "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"}}}, "body"=>nil}
410
- request(api_name, api_spec, params)
411
- end
412
-
413
- # indices.delete_alias ["DELETE"]
414
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html
415
- def indices_delete_alias(params = {})
416
- api_name = 'indices.delete_alias'
417
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html", "methods"=>["DELETE"], "url"=>{"path"=>"/{index}/_alias/{name}", "paths"=>["/{index}/_alias/{name}", "/{index}/_aliases/{name}"], "parts"=>{"index"=>{"type"=>"list", "required"=>true, "description"=>"A comma-separated list of index names (supports wildcards); use `_all` for all indices"}, "name"=>{"type"=>"list", "required"=>true, "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"}}}, "body"=>nil}
418
- request(api_name, api_spec, params)
419
- end
420
-
421
- # indices.delete_template ["DELETE"]
422
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-templates.html
423
- def indices_delete_template(params = {})
424
- api_name = 'indices.delete_template'
425
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-templates.html", "methods"=>["DELETE"], "url"=>{"path"=>"/_template/{name}", "paths"=>["/_template/{name}"], "parts"=>{"name"=>{"type"=>"string", "required"=>true, "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"}}}, "body"=>nil}
426
- request(api_name, api_spec, params)
427
- end
428
-
429
- # indices.exists ["HEAD"]
430
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-exists.html
431
- def indices_exists(params = {})
432
- api_name = 'indices.exists'
433
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-exists.html", "methods"=>["HEAD"], "url"=>{"path"=>"/{index}", "paths"=>["/{index}"], "parts"=>{"index"=>{"type"=>"list", "required"=>true, "description"=>"A comma-separated list of indices 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", "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)"}}}, "body"=>nil}
434
- request(api_name, api_spec, params)
435
- end
436
- alias :indices_exists? :indices_exists
437
-
438
- # indices.exists_alias ["HEAD"]
439
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html
440
- def indices_exists_alias(params = {})
441
- api_name = 'indices.exists_alias'
442
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html", "methods"=>["HEAD"], "url"=>{"path"=>"/_alias/{name}", "paths"=>["/_alias/{name}", "/{index}/_alias/{name}", "/{index}/_alias"], "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", "none", "all"], "default"=>["open", "closed"], "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)"}}}, "body"=>nil}
443
- request(api_name, api_spec, params)
444
- end
445
- alias :indices_exists_alias? :indices_exists_alias
446
-
447
- # indices.exists_template ["HEAD"]
448
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-templates.html
449
- def indices_exists_template(params = {})
450
- api_name = 'indices.exists_template'
451
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-templates.html", "methods"=>["HEAD"], "url"=>{"path"=>"/_template/{name}", "paths"=>["/_template/{name}"], "parts"=>{"name"=>{"type"=>"string", "required"=>true, "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)"}}}, "body"=>nil}
452
- request(api_name, api_spec, params)
453
- end
454
- alias :indices_exists_template? :indices_exists_template
455
-
456
- # indices.exists_type ["HEAD"]
457
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-types-exists.html
458
- def indices_exists_type(params = {})
459
- api_name = 'indices.exists_type'
460
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-types-exists.html", "methods"=>["HEAD"], "url"=>{"path"=>"/{index}/_mapping/{type}", "paths"=>["/{index}/_mapping/{type}"], "parts"=>{"index"=>{"type"=>"list", "required"=>true, "description"=>"A comma-separated list of index names; use `_all` to check the types across all indices"}, "type"=>{"type"=>"list", "required"=>true, "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", "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)"}}}, "body"=>nil}
461
- request(api_name, api_spec, params)
462
- end
463
- alias :indices_exists_type? :indices_exists_type
464
-
465
- # indices.flush ["POST", "GET"]
466
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-flush.html
467
- def indices_flush(params = {})
468
- api_name = 'indices.flush'
469
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-flush.html", "methods"=>["POST", "GET"], "url"=>{"path"=>"/_flush", "paths"=>["/_flush", "/{index}/_flush"], "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", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}, "body"=>nil}
470
- request(api_name, api_spec, params)
471
- end
472
-
473
- # indices.flush_synced ["POST", "GET"]
474
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-synced-flush.html
475
- def indices_flush_synced(params = {})
476
- api_name = 'indices.flush_synced'
477
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-synced-flush.html", "methods"=>["POST", "GET"], "url"=>{"path"=>"/_flush/synced", "paths"=>["/_flush/synced", "/{index}/_flush/synced"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string for 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", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}, "body"=>nil}
478
- request(api_name, api_spec, params)
479
- end
480
-
481
- # indices.forcemerge ["POST"]
482
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-forcemerge.html
483
- def indices_forcemerge(params = {})
484
- api_name = 'indices.forcemerge'
485
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-forcemerge.html", "methods"=>["POST"], "url"=>{"path"=>"/_forcemerge", "paths"=>["/_forcemerge", "/{index}/_forcemerge"], "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", "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"}, "operation_threading"=>{"description"=>"TODO: ?"}, "wait_for_merge"=>{"type"=>"boolean", "description"=>"Specify whether the request should block until the merge process is finished (default: true)"}}}, "body"=>nil}
486
- request(api_name, api_spec, params)
487
- end
488
-
489
- # indices.get ["GET"]
490
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-get-index.html
491
- def indices_get(params = {})
492
- api_name = 'indices.get'
493
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-get-index.html", "methods"=>["GET"], "url"=>{"path"=>"/{index}", "paths"=>["/{index}", "/{index}/{feature}"], "parts"=>{"index"=>{"type"=>"list", "required"=>true, "description"=>"A comma-separated list of index names"}, "feature"=>{"type"=>"list", "description"=>"A comma-separated list of features", "options"=>["_settings", "_mappings", "_aliases"]}}, "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", "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)"}, "human"=>{"type"=>"boolean", "description"=>"Whether to return version and creation date values in human-readable format.", "default"=>false}, "include_defaults"=>{"type"=>"boolean", "description"=>"Whether to return all default setting for each of the indices.", "default"=>false}}}, "body"=>nil}
494
- request(api_name, api_spec, params)
495
- end
496
-
497
- # indices.get_alias ["GET"]
498
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html
499
- def indices_get_alias(params = {})
500
- api_name = 'indices.get_alias'
501
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html", "methods"=>["GET"], "url"=>{"path"=>"/_alias/", "paths"=>["/_alias", "/_alias/{name}", "/{index}/_alias/{name}", "/{index}/_alias"], "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", "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)"}}}, "body"=>nil}
502
- request(api_name, api_spec, params)
503
- end
504
-
505
- # indices.get_field_mapping ["GET"]
506
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-get-field-mapping.html
507
- def indices_get_field_mapping(params = {})
508
- api_name = 'indices.get_field_mapping'
509
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-get-field-mapping.html", "methods"=>["GET"], "url"=>{"path"=>"/_mapping/field/{fields}", "paths"=>["/_mapping/field/{fields}", "/{index}/_mapping/field/{fields}", "/_mapping/{type}/field/{fields}", "/{index}/_mapping/{type}/field/{fields}"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names"}, "type"=>{"type"=>"list", "description"=>"A comma-separated list of document types"}, "fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields", "required"=>true}}, "params"=>{"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", "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)"}}}, "body"=>nil}
510
- request(api_name, api_spec, params)
511
- end
512
-
513
- # indices.get_mapping ["GET"]
514
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-get-mapping.html
515
- def indices_get_mapping(params = {})
516
- api_name = 'indices.get_mapping'
517
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-get-mapping.html", "methods"=>["GET"], "url"=>{"path"=>"/_mapping", "paths"=>["/_mapping", "/{index}/_mapping", "/_mapping/{type}", "/{index}/_mapping/{type}"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names"}, "type"=>{"type"=>"list", "description"=>"A comma-separated list of document types"}}, "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."}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}}}, "body"=>nil}
518
- request(api_name, api_spec, params)
519
- end
520
-
521
- # indices.get_settings ["GET"]
522
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-get-settings.html
523
- def indices_get_settings(params = {})
524
- api_name = 'indices.get_settings'
525
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-get-settings.html", "methods"=>["GET"], "url"=>{"path"=>"/_settings", "paths"=>["/_settings", "/{index}/_settings", "/{index}/_settings/{name}", "/_settings/{name}"], "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"}}, "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", "closed"], "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)"}, "human"=>{"type"=>"boolean", "description"=>"Whether to return version and creation date values in human-readable format.", "default"=>false}, "include_defaults"=>{"type"=>"boolean", "description"=>"Whether to return all default setting for each of the indices.", "default"=>false}}}, "body"=>nil}
526
- request(api_name, api_spec, params)
527
- end
528
-
529
- # indices.get_template ["GET"]
530
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-templates.html
531
- def indices_get_template(params = {})
532
- api_name = 'indices.get_template'
533
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-templates.html", "methods"=>["GET"], "url"=>{"path"=>"/_template/{name}", "paths"=>["/_template", "/_template/{name}"], "parts"=>{"name"=>{"type"=>"list", "required"=>false, "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)"}}}, "body"=>nil}
534
- request(api_name, api_spec, params)
535
- end
536
-
537
- # indices.get_upgrade ["GET"]
538
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-upgrade.html
539
- def indices_get_upgrade(params = {})
540
- api_name = 'indices.get_upgrade'
541
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-upgrade.html", "methods"=>["GET"], "url"=>{"path"=>"/_upgrade", "paths"=>["/_upgrade", "/{index}/_upgrade"], "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", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "human"=>{"type"=>"boolean", "description"=>"Whether to return time and byte values in human-readable format.", "default"=>false}}}, "body"=>nil}
542
- request(api_name, api_spec, params)
543
- end
544
-
545
- # indices.open ["POST"]
546
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-open-close.html
547
- def indices_open(params = {})
548
- api_name = 'indices.open'
549
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-open-close.html", "methods"=>["POST"], "url"=>{"path"=>"/{index}/_open", "paths"=>["/{index}/_open"], "parts"=>{"index"=>{"type"=>"list", "required"=>true, "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", "none", "all"], "default"=>"closed", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}, "body"=>nil}
550
- request(api_name, api_spec, params)
551
- end
552
-
553
- # indices.put_alias ["PUT", "POST"]
554
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html
555
- def indices_put_alias(params = {})
556
- api_name = 'indices.put_alias'
557
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html", "methods"=>["PUT", "POST"], "url"=>{"path"=>"/{index}/_alias/{name}", "paths"=>["/{index}/_alias/{name}", "/{index}/_aliases/{name}"], "parts"=>{"index"=>{"type"=>"list", "required"=>true, "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", "required"=>true, "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}}
558
- request(api_name, api_spec, params)
559
- end
560
-
561
- # indices.put_mapping ["PUT", "POST"]
562
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-put-mapping.html
563
- def indices_put_mapping(params = {})
564
- api_name = 'indices.put_mapping'
565
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-put-mapping.html", "methods"=>["PUT", "POST"], "url"=>{"path"=>"/{index}/{type}/_mapping", "paths"=>["/{index}/{type}/_mapping", "/{index}/_mapping/{type}", "/_mapping/{type}", "/{index}/{type}/_mappings", "/{index}/_mappings/{type}", "/_mappings/{type}"], "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", "required"=>true, "description"=>"The name of the document type"}}, "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", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "update_all_types"=>{"type"=>"boolean", "description"=>"Whether to update the mapping for all fields with the same name across all types or not"}}}, "body"=>{"description"=>"The mapping definition", "required"=>true}}
566
- request(api_name, api_spec, params)
567
- end
568
-
569
- # indices.put_settings ["PUT"]
570
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-update-settings.html
571
- def indices_put_settings(params = {})
572
- api_name = 'indices.put_settings'
573
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-update-settings.html", "methods"=>["PUT"], "url"=>{"path"=>"/_settings", "paths"=>["/_settings", "/{index}/_settings"], "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"}, "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", "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}}
574
- request(api_name, api_spec, params)
575
- end
576
-
577
- # indices.put_template ["PUT", "POST"]
578
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-templates.html
579
- def indices_put_template(params = {})
580
- api_name = 'indices.put_template'
581
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-templates.html", "methods"=>["PUT", "POST"], "url"=>{"path"=>"/_template/{name}", "paths"=>["/_template/{name}"], "parts"=>{"name"=>{"type"=>"string", "required"=>true, "description"=>"The name of the template"}}, "params"=>{"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}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "flat_settings"=>{"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}}}, "body"=>{"description"=>"The template definition", "required"=>true}}
582
- request(api_name, api_spec, params)
583
- end
584
-
585
- # indices.recovery ["GET"]
586
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-recovery.html
587
- def indices_recovery(params = {})
588
- api_name = 'indices.recovery'
589
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-recovery.html", "methods"=>["GET"], "url"=>{"path"=>"/_recovery", "paths"=>["/_recovery", "/{index}/_recovery"], "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}, "human"=>{"type"=>"boolean", "description"=>"Whether to return time and byte values in human-readable format.", "default"=>false}}}, "body"=>nil}
590
- request(api_name, api_spec, params)
591
- end
592
-
593
- # indices.refresh ["POST", "GET"]
594
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-refresh.html
595
- def indices_refresh(params = {})
596
- api_name = 'indices.refresh'
597
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-refresh.html", "methods"=>["POST", "GET"], "url"=>{"path"=>"/_refresh", "paths"=>["/_refresh", "/{index}/_refresh"], "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", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "force"=>{"type"=>"boolean", "description"=>"Force a refresh even if not required", "default"=>false}, "operation_threading"=>{"description"=>"TODO: ?"}}}, "body"=>nil}
598
- request(api_name, api_spec, params)
599
- end
600
-
601
- # indices.rollover ["POST"]
602
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-rollover-index.html
603
- def indices_rollover(params = {})
604
- api_name = 'indices.rollover'
605
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-rollover-index.html", "methods"=>["POST"], "url"=>{"path"=>"/{alias}/_rollover", "paths"=>["/{alias}/_rollover", "/{alias}/_rollover/{new_index}"], "parts"=>{"alias"=>{"type"=>"string", "required"=>true, "description"=>"The name of the alias to rollover"}, "new_index"=>{"type"=>"string", "required"=>false, "description"=>"The name of the rollover index"}}, "params"=>{"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"}}
606
- request(api_name, api_spec, params)
607
- end
608
-
609
- # indices.segments ["GET"]
610
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-segments.html
611
- def indices_segments(params = {})
612
- api_name = 'indices.segments'
613
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-segments.html", "methods"=>["GET"], "url"=>{"path"=>"/_segments", "paths"=>["/_segments", "/{index}/_segments"], "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", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "human"=>{"type"=>"boolean", "description"=>"Whether to return time and byte values in human-readable format.", "default"=>false}, "operation_threading"=>{"description"=>"TODO: ?"}, "verbose"=>{"type"=>"boolean", "description"=>"Includes detailed memory usage by Lucene.", "default"=>false}}}, "body"=>nil}
614
- request(api_name, api_spec, params)
615
- end
616
-
617
- # indices.shard_stores ["GET"]
618
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-shards-stores.html
619
- def indices_shard_stores(params = {})
620
- api_name = 'indices.shard_stores'
621
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-shards-stores.html", "methods"=>["GET"], "url"=>{"path"=>"/_shard_stores", "paths"=>["/_shard_stores", "/{index}/_shard_stores"], "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", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "operation_threading"=>{"description"=>"TODO: ?"}}}, "body"=>nil}
622
- request(api_name, api_spec, params)
623
- end
624
-
625
- # indices.shrink ["PUT", "POST"]
626
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-shrink-index.html
627
- def indices_shrink(params = {})
628
- api_name = 'indices.shrink'
629
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-shrink-index.html", "methods"=>["PUT", "POST"], "url"=>{"path"=>"/{index}/_shrink/{target}", "paths"=>["/{index}/_shrink/{target}"], "parts"=>{"index"=>{"type"=>"string", "required"=>true, "description"=>"The name of the source index to shrink"}, "target"=>{"type"=>"string", "required"=>true, "description"=>"The name of the target index to shrink 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 shrunken index before the operation returns."}}}, "body"=>{"description"=>"The configuration for the target index (`settings` and `aliases`)"}}
630
- request(api_name, api_spec, params)
631
- end
632
-
633
- # indices.stats ["GET"]
634
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-stats.html
635
- def indices_stats(params = {})
636
- api_name = 'indices.stats'
637
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-stats.html", "methods"=>["GET"], "url"=>{"path"=>"/_stats", "paths"=>["/_stats", "/_stats/{metric}", "/{index}/_stats", "/{index}/_stats/{metric}"], "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", "percolate", "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"}, "human"=>{"type"=>"boolean", "description"=>"Whether to return time and byte values in human-readable format.", "default"=>false}, "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}}}, "body"=>nil}
638
- request(api_name, api_spec, params)
639
- end
640
-
641
- # indices.update_aliases ["POST"]
642
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html
643
- def indices_update_aliases(params = {})
644
- api_name = 'indices.update_aliases'
645
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html", "methods"=>["POST"], "url"=>{"path"=>"/_aliases", "paths"=>["/_aliases"], "parts"=>{}, "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}}
646
- request(api_name, api_spec, params)
647
- end
648
-
649
- # indices.upgrade ["POST"]
650
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-upgrade.html
651
- def indices_upgrade(params = {})
652
- api_name = 'indices.upgrade'
653
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-upgrade.html", "methods"=>["POST"], "url"=>{"path"=>"/_upgrade", "paths"=>["/_upgrade", "/{index}/_upgrade"], "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", "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"}}}, "body"=>nil}
654
- request(api_name, api_spec, params)
655
- end
656
-
657
- # indices.validate_query ["GET", "POST"]
658
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-validate.html
659
- def indices_validate_query(params = {})
660
- api_name = 'indices.validate_query'
661
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-validate.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/_validate/query", "paths"=>["/_validate/query", "/{index}/_validate/query", "/{index}/{type}/_validate/query"], "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"}}, "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", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "operation_threading"=>{"description"=>"TODO: ?"}, "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."}}}, "body"=>{"description"=>"The query definition specified with the Query DSL"}}
662
- request(api_name, api_spec, params)
663
- end
664
-
665
- # info ["GET"]
666
- # https://www.elastic.co/guide/
667
- def info(params = {})
668
- api_name = 'info'
669
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/", "methods"=>["GET"], "url"=>{"path"=>"/", "paths"=>["/"], "parts"=>{}, "params"=>{}}, "body"=>nil}
670
- request(api_name, api_spec, params)
671
- end
672
-
673
- # ingest.delete_pipeline ["DELETE"]
674
- # https://www.elastic.co/guide/en/elasticsearch/plugins/5.x/ingest.html
675
- def ingest_delete_pipeline(params = {})
676
- api_name = 'ingest.delete_pipeline'
677
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/plugins/5.x/ingest.html", "methods"=>["DELETE"], "url"=>{"path"=>"/_ingest/pipeline/{id}", "paths"=>["/_ingest/pipeline/{id}"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Pipeline ID", "required"=>true}}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}}, "body"=>nil}
678
- request(api_name, api_spec, params)
679
- end
680
-
681
- # ingest.get_pipeline ["GET"]
682
- # https://www.elastic.co/guide/en/elasticsearch/plugins/5.x/ingest.html
683
- def ingest_get_pipeline(params = {})
684
- api_name = 'ingest.get_pipeline'
685
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/plugins/5.x/ingest.html", "methods"=>["GET"], "url"=>{"path"=>"/_ingest/pipeline/{id}", "paths"=>["/_ingest/pipeline", "/_ingest/pipeline/{id}"], "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"}}}, "body"=>nil}
686
- request(api_name, api_spec, params)
687
- end
688
-
689
- # ingest.put_pipeline ["PUT"]
690
- # https://www.elastic.co/guide/en/elasticsearch/plugins/5.x/ingest.html
691
- def ingest_put_pipeline(params = {})
692
- api_name = 'ingest.put_pipeline'
693
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/plugins/5.x/ingest.html", "methods"=>["PUT"], "url"=>{"path"=>"/_ingest/pipeline/{id}", "paths"=>["/_ingest/pipeline/{id}"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Pipeline ID", "required"=>true}}, "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}}
694
- request(api_name, api_spec, params)
695
- end
696
-
697
- # ingest.simulate ["GET", "POST"]
698
- # https://www.elastic.co/guide/en/elasticsearch/plugins/5.x/ingest.html
699
- def ingest_simulate(params = {})
700
- api_name = 'ingest.simulate'
701
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/plugins/5.x/ingest.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/_ingest/pipeline/_simulate", "paths"=>["/_ingest/pipeline/_simulate", "/_ingest/pipeline/{id}/_simulate"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Pipeline ID", "required"=>false}}, "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}}
702
- request(api_name, api_spec, params)
703
- end
704
-
705
- # mget ["GET", "POST"]
706
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-multi-get.html
707
- def mget(params = {})
708
- api_name = 'mget'
709
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-multi-get.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/_mget", "paths"=>["/_mget", "/{index}/_mget", "/{index}/{type}/_mget"], "parts"=>{"index"=>{"type"=>"string", "description"=>"The name of the index"}, "type"=>{"type"=>"string", "description"=>"The type of the document"}}, "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_exclude"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include"=>{"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}}
710
- request(api_name, api_spec, params)
711
- end
712
-
713
- # mpercolate ["GET", "POST"]
714
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-percolate.html
715
- def mpercolate(params = {})
716
- api_name = 'mpercolate'
717
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-percolate.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/_mpercolate", "paths"=>["/_mpercolate", "/{index}/_mpercolate", "/{index}/{type}/_mpercolate"], "parts"=>{"index"=>{"type"=>"string", "description"=>"The index of the document being count percolated to use as default"}, "type"=>{"type"=>"string", "description"=>"The type of the document being percolated to use as default."}}, "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."}}}, "body"=>{"description"=>"The percolate request definitions (header & body pair), separated by newlines", "required"=>true, "serialize"=>"bulk"}}
718
- request(api_name, api_spec, params)
719
- end
720
-
721
- # msearch ["GET", "POST"]
722
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-multi-search.html
723
- def msearch(params = {})
724
- api_name = 'msearch'
725
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-multi-search.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/_msearch", "paths"=>["/_msearch", "/{index}/_msearch", "/{index}/{type}/_msearch"], "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"}}, "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"}}}, "body"=>{"description"=>"The request definitions (metadata-search request definition pairs), separated by newlines", "required"=>true, "serialize"=>"bulk"}}
726
- request(api_name, api_spec, params)
727
- end
728
-
729
- # msearch_template ["GET", "POST"]
730
- # https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html
731
- def msearch_template(params = {})
732
- api_name = 'msearch_template'
733
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/_msearch/template", "paths"=>["/_msearch/template", "/{index}/_msearch/template", "/{index}/{type}/_msearch/template"], "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"}}, "params"=>{"search_type"=>{"type"=>"enum", "options"=>["query_then_fetch", "query_and_fetch", "dfs_query_then_fetch", "dfs_query_and_fetch"], "description"=>"Search operation type"}}}, "body"=>{"description"=>"The request definitions (metadata-search request definition pairs), separated by newlines", "required"=>true, "serialize"=>"bulk"}}
734
- request(api_name, api_spec, params)
735
- end
736
-
737
- # mtermvectors ["GET", "POST"]
738
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-multi-termvectors.html
739
- def mtermvectors(params = {})
740
- api_name = 'mtermvectors'
741
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-multi-termvectors.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/_mtermvectors", "paths"=>["/_mtermvectors", "/{index}/_mtermvectors", "/{index}/{type}/_mtermvectors"], "parts"=>{"index"=>{"type"=>"string", "description"=>"The index in which the document resides."}, "type"=>{"type"=>"string", "description"=>"The type of the document."}}, "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", "required"=>false}, "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, "required"=>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, "required"=>false}, "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\".", "required"=>false}, "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, "required"=>false}, "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, "required"=>false}, "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, "required"=>false}, "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\".", "required"=>false}, "routing"=>{"type"=>"string", "description"=>"Specific routing value. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "required"=>false}, "parent"=>{"type"=>"string", "description"=>"Parent id of documents. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "required"=>false}, "realtime"=>{"type"=>"boolean", "description"=>"Specifies if requests are real-time as opposed to near-real-time (default: true).", "required"=>false}, "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}}
742
- request(api_name, api_spec, params)
743
- end
744
-
745
- # nodes.hot_threads ["GET"]
746
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-nodes-hot-threads.html
747
- def nodes_hot_threads(params = {})
748
- api_name = 'nodes.hot_threads'
749
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-nodes-hot-threads.html", "methods"=>["GET"], "url"=>{"path"=>"/_nodes/hot_threads", "paths"=>["/_cluster/nodes/hotthreads", "/_cluster/nodes/hot_threads", "/_cluster/nodes/{node_id}/hotthreads", "/_cluster/nodes/{node_id}/hot_threads", "/_nodes/hotthreads", "/_nodes/hot_threads", "/_nodes/{node_id}/hotthreads", "/_nodes/{node_id}/hot_threads"], "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"=>{"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"}}}, "body"=>nil}
750
- request(api_name, api_spec, params)
751
- end
752
-
753
- # nodes.info ["GET"]
754
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-nodes-info.html
755
- def nodes_info(params = {})
756
- api_name = 'nodes.info'
757
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-nodes-info.html", "methods"=>["GET"], "url"=>{"path"=>"/_nodes", "paths"=>["/_nodes", "/_nodes/{node_id}", "/_nodes/{metric}", "/_nodes/{node_id}/{metric}"], "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)"}, "human"=>{"type"=>"boolean", "description"=>"Whether to return time and byte values in human-readable format.", "default"=>false}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}}, "body"=>nil}
758
- request(api_name, api_spec, params)
759
- end
760
-
761
- # nodes.stats ["GET"]
762
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-nodes-stats.html
763
- def nodes_stats(params = {})
764
- api_name = 'nodes.stats'
765
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-nodes-stats.html", "methods"=>["GET"], "url"=>{"path"=>"/_nodes/stats", "paths"=>["/_nodes/stats", "/_nodes/{node_id}/stats", "/_nodes/stats/{metric}", "/_nodes/{node_id}/stats/{metric}", "/_nodes/stats/{metric}/{index_metric}", "/_nodes/{node_id}/stats/{metric}/{index_metric}"], "parts"=>{"metric"=>{"type"=>"list", "options"=>["_all", "breaker", "fs", "http", "indices", "jvm", "os", "process", "thread_pool", "transport", "discovery"], "description"=>"Limit the information returned to the specified metrics"}, "index_metric"=>{"type"=>"list", "options"=>["_all", "completion", "docs", "fielddata", "query_cache", "flush", "get", "indexing", "merge", "percolate", "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"}, "human"=>{"type"=>"boolean", "description"=>"Whether to return time and byte values in human-readable format.", "default"=>false}, "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}}}, "body"=>nil}
766
- request(api_name, api_spec, params)
767
- end
768
-
769
- # percolate ["GET", "POST"]
770
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-percolate.html
771
- def percolate(params = {})
772
- api_name = 'percolate'
773
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-percolate.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/{index}/{type}/_percolate", "paths"=>["/{index}/{type}/_percolate", "/{index}/{type}/{id}/_percolate"], "parts"=>{"index"=>{"type"=>"string", "required"=>true, "description"=>"The index of the document being percolated."}, "type"=>{"type"=>"string", "required"=>true, "description"=>"The type of the document being percolated."}, "id"=>{"type"=>"string", "required"=>false, "description"=>"Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster."}}, "params"=>{"routing"=>{"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, "preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "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."}, "percolate_index"=>{"type"=>"string", "description"=>"The index to percolate the document into. Defaults to index."}, "percolate_type"=>{"type"=>"string", "description"=>"The type to percolate document into. Defaults to type."}, "percolate_routing"=>{"type"=>"string", "description"=>"The routing value to use when percolating the existing document."}, "percolate_preference"=>{"type"=>"string", "description"=>"Which shard to prefer when executing the percolate request."}, "percolate_format"=>{"type"=>"enum", "options"=>["ids"], "description"=>"Return an array of matching query IDs instead of objects"}, "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"=>"The percolator request definition using the percolate DSL", "required"=>false}}
774
- request(api_name, api_spec, params)
775
- end
776
-
777
- # ping ["HEAD"]
778
- # https://www.elastic.co/guide/
779
- def ping(params = {})
780
- api_name = 'ping'
781
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/", "methods"=>["HEAD"], "url"=>{"path"=>"/", "paths"=>["/"], "parts"=>{}, "params"=>{}}, "body"=>nil}
782
- request(api_name, api_spec, params)
783
- end
784
- alias :ping? :ping
785
-
786
- # put_script ["PUT", "POST"]
787
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-scripting.html
788
- def put_script(params = {})
789
- api_name = 'put_script'
790
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-scripting.html", "methods"=>["PUT", "POST"], "url"=>{"path"=>"/_scripts/{lang}/{id}", "paths"=>["/_scripts/{lang}/{id}"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Script ID", "required"=>true}, "lang"=>{"type"=>"string", "description"=>"Script language", "required"=>true}}, "params"=>{}}, "body"=>{"description"=>"The document", "required"=>true}}
791
- request(api_name, api_spec, params)
792
- end
793
-
794
- # put_template ["PUT", "POST"]
795
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-template.html
796
- def put_template(params = {})
797
- api_name = 'put_template'
798
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-template.html", "methods"=>["PUT", "POST"], "url"=>{"path"=>"/_search/template/{id}", "paths"=>["/_search/template/{id}"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Template ID", "required"=>true}}, "params"=>{}}, "body"=>{"description"=>"The document", "required"=>true}}
799
- request(api_name, api_spec, params)
800
- end
801
-
802
- # reindex ["POST"]
803
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-reindex.html
804
- def reindex(params = {})
805
- api_name = 'reindex'
806
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-reindex.html", "methods"=>["POST"], "url"=>{"path"=>"/_reindex", "paths"=>["/_reindex"], "parts"=>{}, "params"=>{"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 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"=>false, "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."}, "slices"=>{"type"=>"integer", "default"=>1, "description"=>"The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks."}}}, "body"=>{"description"=>"The search definition using the Query DSL and the prototype for the index request.", "required"=>true}}
807
- request(api_name, api_spec, params)
808
- end
809
-
810
- # reindex_rethrottle ["POST"]
811
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-reindex.html
812
- def reindex_rethrottle(params = {})
813
- api_name = 'reindex_rethrottle'
814
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-reindex.html", "methods"=>["POST"], "url"=>{"path"=>"/_reindex/{task_id}/_rethrottle", "paths"=>["/_reindex/{task_id}/_rethrottle", "/_update_by_query/{task_id}/_rethrottle", "/_delete_by_query/{task_id}/_rethrottle"], "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."}}}, "body"=>nil}
815
- request(api_name, api_spec, params)
816
- end
817
-
818
- # render_search_template ["GET", "POST"]
819
- # http://www.elasticsearch.org/guide/en/elasticsearch/reference/5.x/search-template.html
820
- def render_search_template(params = {})
821
- api_name = 'render_search_template'
822
- api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elasticsearch.org/guide/en/elasticsearch/reference/5.x/search-template.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/_render/template", "paths"=>["/_render/template", "/_render/template/{id}"], "parts"=>{"id"=>{"type"=>"string", "description"=>"The id of the stored search template"}}}, "body"=>{"description"=>"The search definition template and its params"}}
823
- request(api_name, api_spec, params)
824
- end
825
-
826
- # scroll ["GET", "POST"]
827
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-request-scroll.html
828
- def scroll(params = {})
829
- api_name = 'scroll'
830
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-request-scroll.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/_search/scroll", "paths"=>["/_search/scroll", "/_search/scroll/{scroll_id}"], "parts"=>{"scroll_id"=>{"type"=>"string", "description"=>"The scroll ID"}}, "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"}}}, "body"=>{"description"=>"The scroll ID if not passed by URL or query parameter."}}
831
- request(api_name, api_spec, params)
832
- end
833
-
834
- # search ["GET", "POST"]
835
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-search.html
836
- def search(params = {})
837
- api_name = 'search'
838
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-search.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/_search", "paths"=>["/_search", "/{index}/_search", "/{index}/{type}/_search"], "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"}}, "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"}, "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"}, "fielddata_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)"}, "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."}, "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_exclude"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include"=>{"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"}, "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"}}}, "body"=>{"description"=>"The search definition using the Query DSL"}}
839
- request(api_name, api_spec, params)
840
- end
841
-
842
- # search_shards ["GET", "POST"]
843
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-shards.html
844
- def search_shards(params = {})
845
- api_name = 'search_shards'
846
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-shards.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/{index}/{type}/_search_shards", "paths"=>["/_search_shards", "/{index}/_search_shards", "/{index}/{type}/_search_shards"], "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"}}, "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", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}, "body"=>nil}
847
- request(api_name, api_spec, params)
848
- end
849
-
850
- # search_template ["GET", "POST"]
851
- # https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html
852
- def search_template(params = {})
853
- api_name = 'search_template'
854
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/_search/template", "paths"=>["/_search/template", "/{index}/_search/template", "/{index}/{type}/_search/template"], "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"}}, "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."}, "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"}}}, "body"=>{"description"=>"The search definition template and its params"}}
855
- request(api_name, api_spec, params)
856
- end
857
-
858
- # snapshot.create ["PUT", "POST"]
859
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html
860
- def snapshot_create(params = {})
861
- api_name = 'snapshot.create'
862
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html", "methods"=>["PUT", "POST"], "url"=>{"path"=>"/_snapshot/{repository}/{snapshot}", "paths"=>["/_snapshot/{repository}/{snapshot}"], "parts"=>{"repository"=>{"type"=>"string", "required"=>true, "description"=>"A repository name"}, "snapshot"=>{"type"=>"string", "required"=>true, "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}}
863
- request(api_name, api_spec, params)
864
- end
865
-
866
- # snapshot.create_repository ["PUT", "POST"]
867
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html
868
- def snapshot_create_repository(params = {})
869
- api_name = 'snapshot.create_repository'
870
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html", "methods"=>["PUT", "POST"], "url"=>{"path"=>"/_snapshot/{repository}", "paths"=>["/_snapshot/{repository}"], "parts"=>{"repository"=>{"type"=>"string", "required"=>true, "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}}
871
- request(api_name, api_spec, params)
872
- end
873
-
874
- # snapshot.delete ["DELETE"]
875
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html
876
- def snapshot_delete(params = {})
877
- api_name = 'snapshot.delete'
878
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html", "methods"=>["DELETE"], "url"=>{"path"=>"/_snapshot/{repository}/{snapshot}", "paths"=>["/_snapshot/{repository}/{snapshot}"], "parts"=>{"repository"=>{"type"=>"string", "required"=>true, "description"=>"A repository name"}, "snapshot"=>{"type"=>"string", "required"=>true, "description"=>"A snapshot name"}}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}}}, "body"=>nil}
879
- request(api_name, api_spec, params)
880
- end
881
-
882
- # snapshot.delete_repository ["DELETE"]
883
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html
884
- def snapshot_delete_repository(params = {})
885
- api_name = 'snapshot.delete_repository'
886
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html", "methods"=>["DELETE"], "url"=>{"path"=>"/_snapshot/{repository}", "paths"=>["/_snapshot/{repository}"], "parts"=>{"repository"=>{"type"=>"list", "required"=>true, "description"=>"A comma-separated list of repository names"}}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}}, "body"=>nil}
887
- request(api_name, api_spec, params)
888
- end
889
-
890
- # snapshot.get ["GET"]
891
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html
892
- def snapshot_get(params = {})
893
- api_name = 'snapshot.get'
894
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html", "methods"=>["GET"], "url"=>{"path"=>"/_snapshot/{repository}/{snapshot}", "paths"=>["/_snapshot/{repository}/{snapshot}"], "parts"=>{"repository"=>{"type"=>"string", "required"=>true, "description"=>"A repository name"}, "snapshot"=>{"type"=>"list", "required"=>true, "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"}}}, "body"=>nil}
895
- request(api_name, api_spec, params)
896
- end
897
-
898
- # snapshot.get_repository ["GET"]
899
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html
900
- def snapshot_get_repository(params = {})
901
- api_name = 'snapshot.get_repository'
902
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html", "methods"=>["GET"], "url"=>{"path"=>"/_snapshot", "paths"=>["/_snapshot", "/_snapshot/{repository}"], "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)"}}}, "body"=>nil}
903
- request(api_name, api_spec, params)
904
- end
905
-
906
- # snapshot.restore ["POST"]
907
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html
908
- def snapshot_restore(params = {})
909
- api_name = 'snapshot.restore'
910
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html", "methods"=>["POST"], "url"=>{"path"=>"/_snapshot/{repository}/{snapshot}/_restore", "paths"=>["/_snapshot/{repository}/{snapshot}/_restore"], "parts"=>{"repository"=>{"type"=>"string", "required"=>true, "description"=>"A repository name"}, "snapshot"=>{"type"=>"string", "required"=>true, "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}}
911
- request(api_name, api_spec, params)
912
- end
913
-
914
- # snapshot.status ["GET"]
915
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html
916
- def snapshot_status(params = {})
917
- api_name = 'snapshot.status'
918
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html", "methods"=>["GET"], "url"=>{"path"=>"/_snapshot/_status", "paths"=>["/_snapshot/_status", "/_snapshot/{repository}/_status", "/_snapshot/{repository}/{snapshot}/_status"], "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"}}}, "body"=>nil}
919
- request(api_name, api_spec, params)
920
- end
921
-
922
- # snapshot.verify_repository ["POST"]
923
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html
924
- def snapshot_verify_repository(params = {})
925
- api_name = 'snapshot.verify_repository'
926
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html", "methods"=>["POST"], "url"=>{"path"=>"/_snapshot/{repository}/_verify", "paths"=>["/_snapshot/{repository}/_verify"], "parts"=>{"repository"=>{"type"=>"string", "required"=>true, "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"}}}, "body"=>nil}
927
- request(api_name, api_spec, params)
928
- end
929
-
930
- # suggest ["POST", "GET"]
931
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-suggesters.html
932
- def suggest(params = {})
933
- api_name = 'suggest'
934
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-suggesters.html", "methods"=>["POST", "GET"], "url"=>{"path"=>"/_suggest", "paths"=>["/_suggest", "/{index}/_suggest"], "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"}}, "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."}, "preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "routing"=>{"type"=>"string", "description"=>"Specific routing value"}}}, "body"=>{"description"=>"The request definition", "required"=>true}}
935
- request(api_name, api_spec, params)
936
- end
937
-
938
- # tasks.cancel ["POST"]
939
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/tasks.html
940
- def tasks_cancel(params = {})
941
- api_name = 'tasks.cancel'
942
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/tasks.html", "methods"=>["POST"], "url"=>{"path"=>"/_tasks", "paths"=>["/_tasks/_cancel", "/_tasks/{task_id}/_cancel"], "parts"=>{"task_id"=>{"type"=>"string", "description"=>"Cancel the task with specified task id (node_id:task_number)"}}, "params"=>{"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"}, "actions"=>{"type"=>"list", "description"=>"A comma-separated list of actions that should be cancelled. Leave empty to cancel all."}, "parent_node"=>{"type"=>"string", "description"=>"Cancel tasks with specified parent node."}, "parent_task"=>{"type"=>"string", "description"=>"Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all."}}}, "body"=>nil}
943
- request(api_name, api_spec, params)
944
- end
945
-
946
- # tasks.get ["GET"]
947
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/tasks.html
948
- def tasks_get(params = {})
949
- api_name = 'tasks.get'
950
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/tasks.html", "methods"=>["GET"], "url"=>{"path"=>"/_tasks/{task_id}", "paths"=>["/_tasks/{task_id}"], "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)"}}}, "body"=>nil}
951
- request(api_name, api_spec, params)
952
- end
953
-
954
- # tasks.list ["GET"]
955
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/tasks.html
956
- def tasks_list(params = {})
957
- api_name = 'tasks.list'
958
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/tasks.html", "methods"=>["GET"], "url"=>{"path"=>"/_tasks", "paths"=>["/_tasks"], "parts"=>{}, "params"=>{"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"}, "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_node"=>{"type"=>"string", "description"=>"Return tasks with specified parent node."}, "parent_task"=>{"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"], "default"=>"nodes"}}}, "body"=>nil}
959
- request(api_name, api_spec, params)
960
- end
961
-
962
- # termvectors ["GET", "POST"]
963
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-termvectors.html
964
- def termvectors(params = {})
965
- api_name = 'termvectors'
966
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-termvectors.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/{index}/{type}/_termvectors", "paths"=>["/{index}/{type}/_termvectors", "/{index}/{type}/{id}/_termvectors"], "parts"=>{"index"=>{"type"=>"string", "description"=>"The index in which the document resides.", "required"=>true}, "type"=>{"type"=>"string", "description"=>"The type of the document.", "required"=>true}, "id"=>{"type"=>"string", "description"=>"The id of the document, when not specified a doc param should be supplied."}}, "params"=>{"term_statistics"=>{"type"=>"boolean", "description"=>"Specifies if total term frequency and document frequency should be returned.", "default"=>false, "required"=>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, "required"=>false}, "fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields to return.", "required"=>false}, "offsets"=>{"type"=>"boolean", "description"=>"Specifies if term offsets should be returned.", "default"=>true, "required"=>false}, "positions"=>{"type"=>"boolean", "description"=>"Specifies if term positions should be returned.", "default"=>true, "required"=>false}, "payloads"=>{"type"=>"boolean", "description"=>"Specifies if term payloads should be returned.", "default"=>true, "required"=>false}, "preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random).", "required"=>false}, "routing"=>{"type"=>"string", "description"=>"Specific routing value.", "required"=>false}, "parent"=>{"type"=>"string", "description"=>"Parent id of documents.", "required"=>false}, "realtime"=>{"type"=>"boolean", "description"=>"Specifies if request is real-time as opposed to near-real-time (default: true).", "required"=>false}, "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}}
967
- request(api_name, api_spec, params)
968
- end
969
-
970
- # update ["POST"]
971
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-update.html
972
- def update(params = {})
973
- api_name = 'update'
974
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-update.html", "methods"=>["POST"], "url"=>{"path"=>"/{index}/{type}/{id}/_update", "paths"=>["/{index}/{type}/{id}/_update"], "parts"=>{"id"=>{"type"=>"string", "required"=>true, "description"=>"Document ID"}, "index"=>{"type"=>"string", "required"=>true, "description"=>"The name of the index"}, "type"=>{"type"=>"string", "required"=>true, "description"=>"The type of the document"}}, "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)"}, "fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields to return in the response"}, "_source"=>{"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_exclude"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "lang"=>{"type"=>"string", "description"=>"The script language (default: painless)"}, "parent"=>{"type"=>"string", "description"=>"ID of the parent document. Is is only used for routing and when for the upsert request"}, "refresh"=>{"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh the effected 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"}, "timestamp"=>{"type"=>"time", "description"=>"Explicit timestamp for the document"}, "ttl"=>{"type"=>"time", "description"=>"Expiration time for the document"}, "version"=>{"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type"=>{"type"=>"enum", "options"=>["internal", "force"], "description"=>"Specific version type"}}}, "body"=>{"description"=>"The request definition using either `script` or partial `doc`"}}
975
- request(api_name, api_spec, params)
976
- end
977
-
978
- # update_by_query ["POST"]
979
- # https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-update-by-query.html
980
- def update_by_query(params = {})
981
- api_name = 'update_by_query'
982
- api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-update-by-query.html", "methods"=>["POST"], "url"=>{"path"=>"/{index}/_update_by_query", "paths"=>["/{index}/_update_by_query", "/{index}/{type}/_update_by_query"], "comment"=>"most things below this are just copied from search.json", "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"}}, "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"=>{"note"=>"This is not copied from search", "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", "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"=>"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_exclude"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include"=>{"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 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 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", "defaut_value"=>100, "description"=>"Size on the scroll request powering the update_by_query"}, "wait_for_completion"=>{"type"=>"boolean", "default"=>false, "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"=>"integer", "default"=>1, "description"=>"The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks."}}}, "body"=>{"description"=>"The search definition using the Query DSL"}}
983
- request(api_name, api_spec, params)
984
- end
985
- end
986
- end
987
- end