antbird 0.0.8 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +41 -0
- data/README.md +6 -4
- data/antbird.gemspec +7 -8
- data/lib/antbird/client.rb +14 -5
- data/lib/antbird/rest_api/rest_api_v6_4.rb +1 -1
- data/lib/antbird/rest_api/rest_api_v6_5.rb +1 -1
- data/lib/antbird/rest_api/{rest_api_v6_3.rb → rest_api_v6_6.rb} +54 -30
- data/lib/antbird/rest_api/{rest_api_v6_2.rb → rest_api_v6_7.rb} +87 -55
- data/lib/antbird/rest_api/{rest_api_v6_1.rb → rest_api_v6_8.rb} +98 -58
- data/lib/antbird/rest_api/rest_api_v7_0.rb +1012 -0
- data/lib/antbird/rest_api/rest_api_v7_1.rb +1012 -0
- data/lib/antbird/rest_api/rest_api_v7_2.rb +1020 -0
- data/lib/antbird/rest_api/rest_api_v7_3.rb +1012 -0
- data/lib/antbird/rest_api/rest_api_v7_4.rb +1028 -0
- data/lib/antbird/rest_api/rest_api_v7_5.rb +1028 -0
- data/lib/antbird/rest_api/rest_api_v7_6.rb +1044 -0
- data/lib/antbird/rest_api/rest_api_v7_7.rb +1092 -0
- data/lib/antbird/rest_api/rest_api_v7_8.rb +1158 -0
- data/lib/antbird/rest_api/rest_api_v7_9.rb +1182 -0
- data/lib/antbird/version.rb +1 -1
- metadata +58 -50
- data/.travis.yml +0 -23
- data/lib/antbird/rest_api/rest_api_v5_1.rb +0 -987
- data/lib/antbird/rest_api/rest_api_v5_5.rb +0 -1012
- data/lib/antbird/rest_api/rest_api_v5_6.rb +0 -1020
- data/script/generate_api_methods +0 -48
- data/script/rest_api_template.erb +0 -29
@@ -0,0 +1,1012 @@
|
|
1
|
+
# Generated REST API methods file - DO NOT EDIT!
|
2
|
+
# Date: 2019-12-14
|
3
|
+
# ES version: 7.0.1
|
4
|
+
|
5
|
+
module Antbird
|
6
|
+
module RestApi
|
7
|
+
module RestApiV7_0
|
8
|
+
def common_params
|
9
|
+
@common_params ||= {"description"=>"Parameters that are accepted by all API endpoints.", "documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html", "params"=>{"pretty"=>{"type"=>"boolean", "description"=>"Pretty format the returned JSON response.", "default"=>false}, "human"=>{"type"=>"boolean", "description"=>"Return human readable values for statistics.", "default"=>true}, "error_trace"=>{"type"=>"boolean", "description"=>"Include the stack trace of returned errors.", "default"=>false}, "source"=>{"type"=>"string", "description"=>"The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests."}, "filter_path"=>{"type"=>"list", "description"=>"A comma-separated list of filters used to reduce the response."}}}
|
10
|
+
end
|
11
|
+
|
12
|
+
# bulk ["POST", "PUT"]
|
13
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html
|
14
|
+
def bulk(params = {})
|
15
|
+
api_name = 'bulk'
|
16
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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"}, "_source"=>{"type"=>"list", "description"=>"True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request"}, "_source_excludes"=>{"type"=>"list", "description"=>"Default list of fields to exclude from the returned _source field, can be overridden on each sub-request"}, "_source_includes"=>{"type"=>"list", "description"=>"Default list of fields to extract and return from the _source field, can be overridden on each sub-request"}, "pipeline"=>{"type"=>"string", "description"=>"The pipeline id to preprocess incoming documents with"}}}, "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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html
|
22
|
+
def cat_aliases(params = {})
|
23
|
+
api_name = 'cat.aliases'
|
24
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html
|
30
|
+
def cat_allocation(params = {})
|
31
|
+
api_name = 'cat.allocation'
|
32
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html
|
38
|
+
def cat_count(params = {})
|
39
|
+
api_name = 'cat.count'
|
40
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html
|
46
|
+
def cat_fielddata(params = {})
|
47
|
+
api_name = 'cat.fielddata'
|
48
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html
|
54
|
+
def cat_health(params = {})
|
55
|
+
api_name = 'cat.health'
|
56
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html
|
62
|
+
def cat_help(params = {})
|
63
|
+
api_name = 'cat.help'
|
64
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html
|
70
|
+
def cat_indices(params = {})
|
71
|
+
api_name = 'cat.indices'
|
72
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html
|
78
|
+
def cat_master(params = {})
|
79
|
+
api_name = 'cat.master'
|
80
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html
|
86
|
+
def cat_nodeattrs(params = {})
|
87
|
+
api_name = 'cat.nodeattrs'
|
88
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html
|
94
|
+
def cat_nodes(params = {})
|
95
|
+
api_name = 'cat.nodes'
|
96
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html
|
102
|
+
def cat_pending_tasks(params = {})
|
103
|
+
api_name = 'cat.pending_tasks'
|
104
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html
|
110
|
+
def cat_plugins(params = {})
|
111
|
+
api_name = 'cat.plugins'
|
112
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html
|
118
|
+
def cat_recovery(params = {})
|
119
|
+
api_name = 'cat.recovery'
|
120
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html
|
126
|
+
def cat_repositories(params = {})
|
127
|
+
api_name = 'cat.repositories'
|
128
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html
|
134
|
+
def cat_segments(params = {})
|
135
|
+
api_name = 'cat.segments'
|
136
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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"}, "bytes"=>{"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, "h"=>{"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help"=>{"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s"=>{"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v"=>{"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}}}, "body"=>nil}
|
137
|
+
request(api_name, api_spec, params)
|
138
|
+
end
|
139
|
+
|
140
|
+
# cat.shards ["GET"]
|
141
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html
|
142
|
+
def cat_shards(params = {})
|
143
|
+
api_name = 'cat.shards'
|
144
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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"}, "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}
|
145
|
+
request(api_name, api_spec, params)
|
146
|
+
end
|
147
|
+
|
148
|
+
# cat.snapshots ["GET"]
|
149
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html
|
150
|
+
def cat_snapshots(params = {})
|
151
|
+
api_name = 'cat.snapshots'
|
152
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html", "methods"=>["GET"], "url"=>{"path"=>"/_cat/snapshots", "paths"=>["/_cat/snapshots", "/_cat/snapshots/{repository}"], "parts"=>{"repository"=>{"type"=>"list", "description"=>"Name of repository from which to fetch the snapshot information"}}, "params"=>{"format"=>{"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Set to true to ignore unavailable snapshots", "default"=>false}, "master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h"=>{"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help"=>{"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s"=>{"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
|
158
|
+
def cat_tasks(params = {})
|
159
|
+
api_name = 'cat.tasks'
|
160
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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_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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html
|
166
|
+
def cat_templates(params = {})
|
167
|
+
api_name = 'cat.templates'
|
168
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html
|
174
|
+
def cat_thread_pool(params = {})
|
175
|
+
api_name = 'cat.thread_pool'
|
176
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html
|
182
|
+
def clear_scroll(params = {})
|
183
|
+
api_name = 'clear_scroll'
|
184
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html
|
190
|
+
def cluster_allocation_explain(params = {})
|
191
|
+
api_name = 'cluster.allocation_explain'
|
192
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html
|
198
|
+
def cluster_get_settings(params = {})
|
199
|
+
api_name = 'cluster.get_settings'
|
200
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html
|
206
|
+
def cluster_health(params = {})
|
207
|
+
api_name = 'cluster.health'
|
208
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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_no_initializing_shards"=>{"type"=>"boolean", "description"=>"Whether to wait until there are no initializing shards in the cluster"}, "wait_for_status"=>{"type"=>"enum", "options"=>["green", "yellow", "red"], "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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html
|
214
|
+
def cluster_pending_tasks(params = {})
|
215
|
+
api_name = 'cluster.pending_tasks'
|
216
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html
|
222
|
+
def cluster_put_settings(params = {})
|
223
|
+
api_name = 'cluster.put_settings'
|
224
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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).", "required"=>true}}
|
225
|
+
request(api_name, api_spec, params)
|
226
|
+
end
|
227
|
+
|
228
|
+
# cluster.remote_info ["GET"]
|
229
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html
|
230
|
+
def cluster_remote_info(params = {})
|
231
|
+
api_name = 'cluster.remote_info'
|
232
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html", "methods"=>["GET"], "url"=>{"path"=>"/_remote/info", "paths"=>["/_remote/info"], "params"=>{}}, "body"=>nil}
|
233
|
+
request(api_name, api_spec, params)
|
234
|
+
end
|
235
|
+
|
236
|
+
# cluster.reroute ["POST"]
|
237
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html
|
238
|
+
def cluster_reroute(params = {})
|
239
|
+
api_name = 'cluster.reroute'
|
240
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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`)"}}
|
241
|
+
request(api_name, api_spec, params)
|
242
|
+
end
|
243
|
+
|
244
|
+
# cluster.state ["GET"]
|
245
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html
|
246
|
+
def cluster_state(params = {})
|
247
|
+
api_name = 'cluster.state'
|
248
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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)"}, "wait_for_metadata_version"=>{"type"=>"number", "description"=>"Wait for the metadata version to be equal or greater than the specified metadata version"}, "wait_for_timeout"=>{"type"=>"time", "description"=>"The maximum time to wait for wait_for_metadata_version before timing out"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}, "body"=>nil}
|
249
|
+
request(api_name, api_spec, params)
|
250
|
+
end
|
251
|
+
|
252
|
+
# cluster.stats ["GET"]
|
253
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html
|
254
|
+
def cluster_stats(params = {})
|
255
|
+
api_name = 'cluster.stats'
|
256
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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)"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}}, "body"=>nil}
|
257
|
+
request(api_name, api_spec, params)
|
258
|
+
end
|
259
|
+
|
260
|
+
# count ["POST", "GET"]
|
261
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html
|
262
|
+
def count(params = {})
|
263
|
+
api_name = 'count'
|
264
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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)"}, "ignore_throttled"=>{"type"=>"boolean", "description"=>"Whether specified concrete, expanded or aliased indices should be ignored when throttled"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "min_score"=>{"type"=>"number", "description"=>"Include only documents with a specific `_score` value in the result"}, "preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "routing"=>{"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, "q"=>{"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, "analyzer"=>{"type"=>"string", "description"=>"The analyzer to use for the query string"}, "analyze_wildcard"=>{"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, "default_operator"=>{"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, "df"=>{"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, "lenient"=>{"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "terminate_after"=>{"type"=>"number", "description"=>"The maximum count for each shard, upon reaching which the query execution will terminate early"}}}, "body"=>{"description"=>"A query to restrict the results specified with the Query DSL (optional)"}}
|
265
|
+
request(api_name, api_spec, params)
|
266
|
+
end
|
267
|
+
|
268
|
+
# create ["PUT", "POST"]
|
269
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html
|
270
|
+
def create(params = {})
|
271
|
+
api_name = 'create'
|
272
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html", "methods"=>["PUT", "POST"], "url"=>{"path"=>"/{index}/_create/{id}", "paths"=>["/{index}/_create/{id}", "/{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", "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"}, "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
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html
|
278
|
+
def delete(params = {})
|
279
|
+
api_name = 'delete'
|
280
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html", "methods"=>["DELETE"], "url"=>{"path"=>"/{index}/_doc/{id}", "paths"=>["/{index}/{type}/{id}", "/{index}/_doc/{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", "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"}, "if_seq_no"=>{"type"=>"number", "description"=>"only perform the delete operation if the last operation that has changed the document has the specified sequence number"}, "if_primary_term"=>{"type"=>"number", "description"=>"only perform the delete operation if the last operation that has changed the document has the specified primary term"}, "version"=>{"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type"=>{"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}}}, "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/master/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/master/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_excludes"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_includes"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "terminate_after"=>{"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, "stats"=>{"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, "version"=>{"type"=>"boolean", "description"=>"Specify whether to return document version as part of a hit"}, "request_cache"=>{"type"=>"boolean", "description"=>"Specify if request cache should be used for this request or not, defaults to index level setting"}, "refresh"=>{"type"=>"boolean", "description"=>"Should the effected indexes be refreshed?"}, "timeout"=>{"type"=>"time", "default"=>"1m", "description"=>"Time each individual bulk request should wait for shards that are unavailable."}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "scroll_size"=>{"type"=>"number", "defaut_value"=>100, "description"=>"Size on the scroll request powering the delete by query"}, "wait_for_completion"=>{"type"=>"boolean", "default"=>true, "description"=>"Should the request should block until the delete by query is complete."}, "requests_per_second"=>{"type"=>"number", "default"=>0, "description"=>"The throttle for this request in sub-requests per second. -1 means no throttle."}, "slices"=>{"type"=>"number", "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_by_query_rethrottle ["POST"]
|
293
|
+
# https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html
|
294
|
+
def delete_by_query_rethrottle(params = {})
|
295
|
+
api_name = 'delete_by_query_rethrottle'
|
296
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html", "methods"=>["POST"], "url"=>{"path"=>"/_delete_by_query/{task_id}/_rethrottle", "paths"=>["/_delete_by_query/{task_id}/_rethrottle"], "parts"=>{"task_id"=>{"type"=>"string", "required"=>true, "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}
|
297
|
+
request(api_name, api_spec, params)
|
298
|
+
end
|
299
|
+
|
300
|
+
# delete_script ["DELETE"]
|
301
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
|
302
|
+
def delete_script(params = {})
|
303
|
+
api_name = 'delete_script'
|
304
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html", "methods"=>["DELETE"], "url"=>{"path"=>"/_scripts/{id}", "paths"=>["/_scripts/{id}"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Script ID", "required"=>true}}, "params"=>{"timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}}}, "body"=>nil}
|
305
|
+
request(api_name, api_spec, params)
|
306
|
+
end
|
307
|
+
|
308
|
+
# exists ["HEAD"]
|
309
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
|
310
|
+
def exists(params = {})
|
311
|
+
api_name = 'exists'
|
312
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html", "methods"=>["HEAD"], "url"=>{"path"=>"/{index}/_doc/{id}", "paths"=>["/{index}/_doc/{id}", "/{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", "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_excludes"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_includes"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "version"=>{"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type"=>{"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}}}, "body"=>nil}
|
313
|
+
request(api_name, api_spec, params)
|
314
|
+
end
|
315
|
+
alias :exists? :exists
|
316
|
+
|
317
|
+
# exists_source ["HEAD"]
|
318
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
|
319
|
+
def exists_source(params = {})
|
320
|
+
api_name = 'exists_source'
|
321
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html", "methods"=>["HEAD"], "url"=>{"path"=>"/{index}/_source/{id}", "paths"=>["/{index}/_source/{id}", "/{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"=>false, "description"=>"The type of the document; deprecated and optional starting with 7.0"}}, "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_excludes"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_includes"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "version"=>{"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type"=>{"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}}}, "body"=>nil}
|
322
|
+
request(api_name, api_spec, params)
|
323
|
+
end
|
324
|
+
alias :exists_source? :exists_source
|
325
|
+
|
326
|
+
# explain ["GET", "POST"]
|
327
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html
|
328
|
+
def explain(params = {})
|
329
|
+
api_name = 'explain'
|
330
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/{index}/_explain/{id}", "paths"=>["/{index}/_explain/{id}", "/{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", "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_excludes"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_includes"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}}}, "body"=>{"description"=>"The query definition using the Query DSL"}}
|
331
|
+
request(api_name, api_spec, params)
|
332
|
+
end
|
333
|
+
|
334
|
+
# field_caps ["GET", "POST"]
|
335
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html
|
336
|
+
def field_caps(params = {})
|
337
|
+
api_name = 'field_caps'
|
338
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/_field_caps", "paths"=>["/_field_caps", "/{index}/_field_caps"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}}, "params"=>{"fields"=>{"type"=>"list", "description"=>"A comma-separated list of field names"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}, "body"=>nil}
|
339
|
+
request(api_name, api_spec, params)
|
340
|
+
end
|
341
|
+
|
342
|
+
# get ["GET"]
|
343
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
|
344
|
+
def get(params = {})
|
345
|
+
api_name = 'get'
|
346
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html", "methods"=>["GET"], "url"=>{"path"=>"/{index}/_doc/{id}", "paths"=>["/{index}/_doc/{id}", "/{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", "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_excludes"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_includes"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "_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}
|
347
|
+
request(api_name, api_spec, params)
|
348
|
+
end
|
349
|
+
|
350
|
+
# get_script ["GET"]
|
351
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
|
352
|
+
def get_script(params = {})
|
353
|
+
api_name = 'get_script'
|
354
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html", "methods"=>["GET"], "url"=>{"path"=>"/_scripts/{id}", "paths"=>["/_scripts/{id}"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Script ID", "required"=>true}}, "params"=>{"master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}}}, "body"=>nil}
|
355
|
+
request(api_name, api_spec, params)
|
356
|
+
end
|
357
|
+
|
358
|
+
# get_source ["GET"]
|
359
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
|
360
|
+
def get_source(params = {})
|
361
|
+
api_name = 'get_source'
|
362
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html", "methods"=>["GET"], "url"=>{"path"=>"/{index}/_source/{id}", "paths"=>["/{index}/_source/{id}", "/{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"=>false, "description"=>"The type of the document; deprecated and optional starting with 7.0"}}, "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_excludes"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_includes"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "version"=>{"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type"=>{"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}}}, "body"=>nil}
|
363
|
+
request(api_name, api_spec, params)
|
364
|
+
end
|
365
|
+
|
366
|
+
# index ["POST", "PUT"]
|
367
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html
|
368
|
+
def index(params = {})
|
369
|
+
api_name = 'index'
|
370
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html", "methods"=>["POST", "PUT"], "url"=>{"path"=>"/{index}/_doc", "paths"=>["/{index}/{type}", "/{index}/{type}/{id}", "/{index}/_doc/{id}", "/{index}/_doc"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Document ID"}, "index"=>{"type"=>"string", "required"=>true, "description"=>"The name of the index"}, "type"=>{"type"=>"string", "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"}, "version"=>{"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type"=>{"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, "if_seq_no"=>{"type"=>"number", "description"=>"only perform the index operation if the last operation that has changed the document has the specified sequence number"}, "if_primary_term"=>{"type"=>"number", "description"=>"only perform the index operation if the last operation that has changed the document has the specified primary term"}, "pipeline"=>{"type"=>"string", "description"=>"The pipeline id to preprocess incoming documents with"}}}, "body"=>{"description"=>"The document", "required"=>true}}
|
371
|
+
request(api_name, api_spec, params)
|
372
|
+
end
|
373
|
+
|
374
|
+
# indices.analyze ["GET", "POST"]
|
375
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html
|
376
|
+
def indices_analyze(params = {})
|
377
|
+
api_name = 'indices.analyze'
|
378
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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"=>{"index"=>{"type"=>"string", "description"=>"The name of the index to scope the operation"}}}, "body"=>{"description"=>"Define analyzer/tokenizer parameters and the text on which the analysis should be performed"}}
|
379
|
+
request(api_name, api_spec, params)
|
380
|
+
end
|
381
|
+
|
382
|
+
# indices.clear_cache ["POST"]
|
383
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html
|
384
|
+
def indices_clear_cache(params = {})
|
385
|
+
api_name = 'indices.clear_cache'
|
386
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html", "methods"=>["POST"], "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"=>{"fielddata"=>{"type"=>"boolean", "description"=>"Clear field data"}, "fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields to clear when using the `fielddata` parameter (default: all)"}, "query"=>{"type"=>"boolean", "description"=>"Clear query caches"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "index"=>{"type"=>"list", "description"=>"A comma-separated list of index name to limit the operation"}, "request"=>{"type"=>"boolean", "description"=>"Clear request cache"}}}, "body"=>nil}
|
387
|
+
request(api_name, api_spec, params)
|
388
|
+
end
|
389
|
+
|
390
|
+
# indices.close ["POST"]
|
391
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html
|
392
|
+
def indices_close(params = {})
|
393
|
+
api_name = 'indices.close'
|
394
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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}
|
395
|
+
request(api_name, api_spec, params)
|
396
|
+
end
|
397
|
+
|
398
|
+
# indices.create ["PUT"]
|
399
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html
|
400
|
+
def indices_create(params = {})
|
401
|
+
api_name = 'indices.create'
|
402
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html", "methods"=>["PUT"], "url"=>{"path"=>"/{index}", "paths"=>["/{index}"], "parts"=>{"index"=>{"type"=>"string", "required"=>true, "description"=>"The name of the index"}}, "params"=>{"include_type_name"=>{"type"=>"boolean", "description"=>"Whether a type should be expected in the body of the mappings."}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Set the number of active shards to wait for before the operation returns."}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}}}, "body"=>{"description"=>"The configuration for the index (`settings` and `mappings`)"}}
|
403
|
+
request(api_name, api_spec, params)
|
404
|
+
end
|
405
|
+
|
406
|
+
# indices.delete ["DELETE"]
|
407
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html
|
408
|
+
def indices_delete(params = {})
|
409
|
+
api_name = 'indices.delete'
|
410
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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"}, "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)"}}}, "body"=>nil}
|
411
|
+
request(api_name, api_spec, params)
|
412
|
+
end
|
413
|
+
|
414
|
+
# indices.delete_alias ["DELETE"]
|
415
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
|
416
|
+
def indices_delete_alias(params = {})
|
417
|
+
api_name = 'indices.delete_alias'
|
418
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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}
|
419
|
+
request(api_name, api_spec, params)
|
420
|
+
end
|
421
|
+
|
422
|
+
# indices.delete_template ["DELETE"]
|
423
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
|
424
|
+
def indices_delete_template(params = {})
|
425
|
+
api_name = 'indices.delete_template'
|
426
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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}
|
427
|
+
request(api_name, api_spec, params)
|
428
|
+
end
|
429
|
+
|
430
|
+
# indices.exists ["HEAD"]
|
431
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html
|
432
|
+
def indices_exists(params = {})
|
433
|
+
api_name = 'indices.exists'
|
434
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html", "methods"=>["HEAD"], "url"=>{"path"=>"/{index}", "paths"=>["/{index}"], "parts"=>{"index"=>{"type"=>"list", "required"=>true, "description"=>"A comma-separated list of index names"}}, "params"=>{"local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Ignore unavailable indexes (default: false)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Ignore if a wildcard expression resolves to no concrete indices (default: false)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether wildcard expressions should get expanded to open or closed indices (default: open)"}, "flat_settings"=>{"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "include_defaults"=>{"type"=>"boolean", "description"=>"Whether to return all default setting for each of the indices.", "default"=>false}}}, "body"=>nil}
|
435
|
+
request(api_name, api_spec, params)
|
436
|
+
end
|
437
|
+
alias :indices_exists? :indices_exists
|
438
|
+
|
439
|
+
# indices.exists_alias ["HEAD"]
|
440
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
|
441
|
+
def indices_exists_alias(params = {})
|
442
|
+
api_name = 'indices.exists_alias'
|
443
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html", "methods"=>["HEAD"], "url"=>{"path"=>"/_alias/{name}", "paths"=>["/_alias/{name}", "/{index}/_alias/{name}"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to filter aliases"}, "name"=>{"type"=>"list", "required"=>true, "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}
|
444
|
+
request(api_name, api_spec, params)
|
445
|
+
end
|
446
|
+
alias :indices_exists_alias? :indices_exists_alias
|
447
|
+
|
448
|
+
# indices.exists_template ["HEAD"]
|
449
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
|
450
|
+
def indices_exists_template(params = {})
|
451
|
+
api_name = 'indices.exists_template'
|
452
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "methods"=>["HEAD"], "url"=>{"path"=>"/_template/{name}", "paths"=>["/_template/{name}"], "parts"=>{"name"=>{"type"=>"list", "required"=>true, "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}
|
453
|
+
request(api_name, api_spec, params)
|
454
|
+
end
|
455
|
+
alias :indices_exists_template? :indices_exists_template
|
456
|
+
|
457
|
+
# indices.exists_type ["HEAD"]
|
458
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html
|
459
|
+
def indices_exists_type(params = {})
|
460
|
+
api_name = 'indices.exists_type'
|
461
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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}
|
462
|
+
request(api_name, api_spec, params)
|
463
|
+
end
|
464
|
+
alias :indices_exists_type? :indices_exists_type
|
465
|
+
|
466
|
+
# indices.flush ["POST", "GET"]
|
467
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html
|
468
|
+
def indices_flush(params = {})
|
469
|
+
api_name = 'indices.flush'
|
470
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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}
|
471
|
+
request(api_name, api_spec, params)
|
472
|
+
end
|
473
|
+
|
474
|
+
# indices.flush_synced ["POST", "GET"]
|
475
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush.html
|
476
|
+
def indices_flush_synced(params = {})
|
477
|
+
api_name = 'indices.flush_synced'
|
478
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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}
|
479
|
+
request(api_name, api_spec, params)
|
480
|
+
end
|
481
|
+
|
482
|
+
# indices.forcemerge ["POST"]
|
483
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html
|
484
|
+
def indices_forcemerge(params = {})
|
485
|
+
api_name = 'indices.forcemerge'
|
486
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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"}}}, "body"=>nil}
|
487
|
+
request(api_name, api_spec, params)
|
488
|
+
end
|
489
|
+
|
490
|
+
# indices.get ["GET"]
|
491
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html
|
492
|
+
def indices_get(params = {})
|
493
|
+
api_name = 'indices.get'
|
494
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html", "methods"=>["GET"], "url"=>{"path"=>"/{index}", "paths"=>["/{index}"], "parts"=>{"index"=>{"type"=>"list", "required"=>true, "description"=>"A comma-separated list of index names"}}, "params"=>{"include_type_name"=>{"type"=>"boolean", "description"=>"Whether to add the type name to the response (default: false)"}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Ignore unavailable indexes (default: false)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Ignore if a wildcard expression resolves to no concrete indices (default: false)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether wildcard expressions should get expanded to open or closed indices (default: open)"}, "flat_settings"=>{"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "include_defaults"=>{"type"=>"boolean", "description"=>"Whether to return all default setting for each of the indices.", "default"=>false}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}}}, "body"=>nil}
|
495
|
+
request(api_name, api_spec, params)
|
496
|
+
end
|
497
|
+
|
498
|
+
# indices.get_alias ["GET"]
|
499
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
|
500
|
+
def indices_get_alias(params = {})
|
501
|
+
api_name = 'indices.get_alias'
|
502
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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}
|
503
|
+
request(api_name, api_spec, params)
|
504
|
+
end
|
505
|
+
|
506
|
+
# indices.get_field_mapping ["GET"]
|
507
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html
|
508
|
+
def indices_get_field_mapping(params = {})
|
509
|
+
api_name = 'indices.get_field_mapping'
|
510
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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_type_name"=>{"type"=>"boolean", "description"=>"Whether a type should be returned in the body of the mappings."}, "include_defaults"=>{"type"=>"boolean", "description"=>"Whether the default mapping values should be returned as well"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "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}
|
511
|
+
request(api_name, api_spec, params)
|
512
|
+
end
|
513
|
+
|
514
|
+
# indices.get_mapping ["GET"]
|
515
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html
|
516
|
+
def indices_get_mapping(params = {})
|
517
|
+
api_name = 'indices.get_mapping'
|
518
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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"=>{"include_type_name"=>{"type"=>"boolean", "description"=>"Whether to add the type name to the response (default: false)"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}}}, "body"=>nil}
|
519
|
+
request(api_name, api_spec, params)
|
520
|
+
end
|
521
|
+
|
522
|
+
# indices.get_settings ["GET"]
|
523
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html
|
524
|
+
def indices_get_settings(params = {})
|
525
|
+
api_name = 'indices.get_settings'
|
526
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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"=>{"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", "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)"}, "include_defaults"=>{"type"=>"boolean", "description"=>"Whether to return all default setting for each of the indices.", "default"=>false}}}, "body"=>nil}
|
527
|
+
request(api_name, api_spec, params)
|
528
|
+
end
|
529
|
+
|
530
|
+
# indices.get_template ["GET"]
|
531
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
|
532
|
+
def indices_get_template(params = {})
|
533
|
+
api_name = 'indices.get_template'
|
534
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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"=>{"include_type_name"=>{"type"=>"boolean", "description"=>"Whether a type should be returned in the body of the mappings."}, "flat_settings"=>{"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "master_timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}}}, "body"=>nil}
|
535
|
+
request(api_name, api_spec, params)
|
536
|
+
end
|
537
|
+
|
538
|
+
# indices.get_upgrade ["GET"]
|
539
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html
|
540
|
+
def indices_get_upgrade(params = {})
|
541
|
+
api_name = 'indices.get_upgrade'
|
542
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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."}}}, "body"=>nil}
|
543
|
+
request(api_name, api_spec, params)
|
544
|
+
end
|
545
|
+
|
546
|
+
# indices.open ["POST"]
|
547
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html
|
548
|
+
def indices_open(params = {})
|
549
|
+
api_name = 'indices.open'
|
550
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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."}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Sets the number of active shards to wait for before the operation returns."}}}, "body"=>nil}
|
551
|
+
request(api_name, api_spec, params)
|
552
|
+
end
|
553
|
+
|
554
|
+
# indices.put_alias ["PUT", "POST"]
|
555
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
|
556
|
+
def indices_put_alias(params = {})
|
557
|
+
api_name = 'indices.put_alias'
|
558
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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}}
|
559
|
+
request(api_name, api_spec, params)
|
560
|
+
end
|
561
|
+
|
562
|
+
# indices.put_mapping ["PUT", "POST"]
|
563
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html
|
564
|
+
def indices_put_mapping(params = {})
|
565
|
+
api_name = 'indices.put_mapping'
|
566
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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}", "{index}/_mappings", "{index}/_mapping"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices."}, "type"=>{"type"=>"string", "description"=>"The name of the document type"}}, "params"=>{"include_type_name"=>{"type"=>"boolean", "description"=>"Whether a type should be expected in the body of the mappings."}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}, "body"=>{"description"=>"The mapping definition", "required"=>true}}
|
567
|
+
request(api_name, api_spec, params)
|
568
|
+
end
|
569
|
+
|
570
|
+
# indices.put_settings ["PUT"]
|
571
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html
|
572
|
+
def indices_put_settings(params = {})
|
573
|
+
api_name = 'indices.put_settings'
|
574
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "preserve_existing"=>{"type"=>"boolean", "description"=>"Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false`"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "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}}
|
575
|
+
request(api_name, api_spec, params)
|
576
|
+
end
|
577
|
+
|
578
|
+
# indices.put_template ["PUT", "POST"]
|
579
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
|
580
|
+
def indices_put_template(params = {})
|
581
|
+
api_name = 'indices.put_template'
|
582
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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"=>{"include_type_name"=>{"type"=>"boolean", "description"=>"Whether a type should be returned in the body of the mappings."}, "order"=>{"type"=>"number", "description"=>"The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)"}, "create"=>{"type"=>"boolean", "description"=>"Whether the index template should only be added if new or can also replace an existing one", "default"=>false}, "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}}
|
583
|
+
request(api_name, api_spec, params)
|
584
|
+
end
|
585
|
+
|
586
|
+
# indices.recovery ["GET"]
|
587
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html
|
588
|
+
def indices_recovery(params = {})
|
589
|
+
api_name = 'indices.recovery'
|
590
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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}}}, "body"=>nil}
|
591
|
+
request(api_name, api_spec, params)
|
592
|
+
end
|
593
|
+
|
594
|
+
# indices.refresh ["POST", "GET"]
|
595
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html
|
596
|
+
def indices_refresh(params = {})
|
597
|
+
api_name = 'indices.refresh'
|
598
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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."}}}, "body"=>nil}
|
599
|
+
request(api_name, api_spec, params)
|
600
|
+
end
|
601
|
+
|
602
|
+
# indices.rollover ["POST"]
|
603
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html
|
604
|
+
def indices_rollover(params = {})
|
605
|
+
api_name = 'indices.rollover'
|
606
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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"=>{"include_type_name"=>{"type"=>"boolean", "description"=>"Whether a type should be included in the body of the mappings."}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "dry_run"=>{"type"=>"boolean", "description"=>"If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Set the number of active shards to wait for on the newly created rollover index before the operation returns."}}}, "body"=>{"description"=>"The conditions that needs to be met for executing rollover"}}
|
607
|
+
request(api_name, api_spec, params)
|
608
|
+
end
|
609
|
+
|
610
|
+
# indices.segments ["GET"]
|
611
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html
|
612
|
+
def indices_segments(params = {})
|
613
|
+
api_name = 'indices.segments'
|
614
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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."}, "verbose"=>{"type"=>"boolean", "description"=>"Includes detailed memory usage by Lucene.", "default"=>false}}}, "body"=>nil}
|
615
|
+
request(api_name, api_spec, params)
|
616
|
+
end
|
617
|
+
|
618
|
+
# indices.shard_stores ["GET"]
|
619
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html
|
620
|
+
def indices_shard_stores(params = {})
|
621
|
+
api_name = 'indices.shard_stores'
|
622
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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."}}}, "body"=>nil}
|
623
|
+
request(api_name, api_spec, params)
|
624
|
+
end
|
625
|
+
|
626
|
+
# indices.shrink ["PUT", "POST"]
|
627
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html
|
628
|
+
def indices_shrink(params = {})
|
629
|
+
api_name = 'indices.shrink'
|
630
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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"=>{"copy_settings"=>{"type"=>"boolean", "description"=>"whether or not to copy settings from the source index (defaults to false)"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Set the number of active shards to wait for on the shrunken index before the operation returns."}}}, "body"=>{"description"=>"The configuration for the target index (`settings` and `aliases`)"}}
|
631
|
+
request(api_name, api_spec, params)
|
632
|
+
end
|
633
|
+
|
634
|
+
# indices.split ["PUT", "POST"]
|
635
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html
|
636
|
+
def indices_split(params = {})
|
637
|
+
api_name = 'indices.split'
|
638
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html", "methods"=>["PUT", "POST"], "url"=>{"path"=>"/{index}/_split/{target}", "paths"=>["/{index}/_split/{target}"], "parts"=>{"index"=>{"type"=>"string", "required"=>true, "description"=>"The name of the source index to split"}, "target"=>{"type"=>"string", "required"=>true, "description"=>"The name of the target index to split into"}}, "params"=>{"copy_settings"=>{"type"=>"boolean", "description"=>"whether or not to copy settings from the source index (defaults to false)"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Set the number of active shards to wait for on the shrunken index before the operation returns."}}}, "body"=>{"description"=>"The configuration for the target index (`settings` and `aliases`)"}}
|
639
|
+
request(api_name, api_spec, params)
|
640
|
+
end
|
641
|
+
|
642
|
+
# indices.stats ["GET"]
|
643
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html
|
644
|
+
def indices_stats(params = {})
|
645
|
+
api_name = 'indices.stats'
|
646
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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", "request_cache", "refresh", "search", "segments", "store", "warmer", "suggest"], "description"=>"Limit the information returned the specific metrics."}}, "params"=>{"completion_fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)"}, "fielddata_fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` index metric (supports wildcards)"}, "fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)"}, "groups"=>{"type"=>"list", "description"=>"A comma-separated list of search groups for `search` index metric"}, "level"=>{"type"=>"enum", "description"=>"Return stats aggregated at cluster, index or shard level", "options"=>["cluster", "indices", "shards"], "default"=>"indices"}, "types"=>{"type"=>"list", "description"=>"A comma-separated list of document types for the `indexing` index metric"}, "include_segment_file_sizes"=>{"type"=>"boolean", "description"=>"Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)", "default"=>false}}}, "body"=>nil}
|
647
|
+
request(api_name, api_spec, params)
|
648
|
+
end
|
649
|
+
|
650
|
+
# indices.update_aliases ["POST"]
|
651
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
|
652
|
+
def indices_update_aliases(params = {})
|
653
|
+
api_name = 'indices.update_aliases'
|
654
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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}}
|
655
|
+
request(api_name, api_spec, params)
|
656
|
+
end
|
657
|
+
|
658
|
+
# indices.upgrade ["POST"]
|
659
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html
|
660
|
+
def indices_upgrade(params = {})
|
661
|
+
api_name = 'indices.upgrade'
|
662
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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}
|
663
|
+
request(api_name, api_spec, params)
|
664
|
+
end
|
665
|
+
|
666
|
+
# indices.validate_query ["GET", "POST"]
|
667
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html
|
668
|
+
def indices_validate_query(params = {})
|
669
|
+
api_name = 'indices.validate_query'
|
670
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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."}, "q"=>{"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, "analyzer"=>{"type"=>"string", "description"=>"The analyzer to use for the query string"}, "analyze_wildcard"=>{"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, "default_operator"=>{"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, "df"=>{"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, "lenient"=>{"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "rewrite"=>{"type"=>"boolean", "description"=>"Provide a more detailed explanation showing the actual Lucene query that will be executed."}, "all_shards"=>{"type"=>"boolean", "description"=>"Execute validation on all shards instead of one random shard per index"}}}, "body"=>{"description"=>"The query definition specified with the Query DSL"}}
|
671
|
+
request(api_name, api_spec, params)
|
672
|
+
end
|
673
|
+
|
674
|
+
# info ["GET"]
|
675
|
+
# http://www.elastic.co/guide/
|
676
|
+
def info(params = {})
|
677
|
+
api_name = 'info'
|
678
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/", "methods"=>["GET"], "url"=>{"path"=>"/", "paths"=>["/"], "parts"=>{}, "params"=>{}}, "body"=>nil}
|
679
|
+
request(api_name, api_spec, params)
|
680
|
+
end
|
681
|
+
|
682
|
+
# ingest.delete_pipeline ["DELETE"]
|
683
|
+
# https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-pipeline-api.html
|
684
|
+
def ingest_delete_pipeline(params = {})
|
685
|
+
api_name = 'ingest.delete_pipeline'
|
686
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-pipeline-api.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}
|
687
|
+
request(api_name, api_spec, params)
|
688
|
+
end
|
689
|
+
|
690
|
+
# ingest.get_pipeline ["GET"]
|
691
|
+
# https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html
|
692
|
+
def ingest_get_pipeline(params = {})
|
693
|
+
api_name = 'ingest.get_pipeline'
|
694
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.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}
|
695
|
+
request(api_name, api_spec, params)
|
696
|
+
end
|
697
|
+
|
698
|
+
# ingest.processor_grok ["GET"]
|
699
|
+
# https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get
|
700
|
+
def ingest_processor_grok(params = {})
|
701
|
+
api_name = 'ingest.processor_grok'
|
702
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get", "methods"=>["GET"], "url"=>{"path"=>"/_ingest/processor/grok", "paths"=>["/_ingest/processor/grok"], "parts"=>{}, "params"=>{}}, "body"=>nil}
|
703
|
+
request(api_name, api_spec, params)
|
704
|
+
end
|
705
|
+
|
706
|
+
# ingest.put_pipeline ["PUT"]
|
707
|
+
# https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html
|
708
|
+
def ingest_put_pipeline(params = {})
|
709
|
+
api_name = 'ingest.put_pipeline'
|
710
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.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}}
|
711
|
+
request(api_name, api_spec, params)
|
712
|
+
end
|
713
|
+
|
714
|
+
# ingest.simulate ["GET", "POST"]
|
715
|
+
# https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html
|
716
|
+
def ingest_simulate(params = {})
|
717
|
+
api_name = 'ingest.simulate'
|
718
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.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}}
|
719
|
+
request(api_name, api_spec, params)
|
720
|
+
end
|
721
|
+
|
722
|
+
# mget ["GET", "POST"]
|
723
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html
|
724
|
+
def mget(params = {})
|
725
|
+
api_name = 'mget'
|
726
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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_excludes"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_includes"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}}}, "body"=>{"description"=>"Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL.", "required"=>true}}
|
727
|
+
request(api_name, api_spec, params)
|
728
|
+
end
|
729
|
+
|
730
|
+
# msearch ["GET", "POST"]
|
731
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html
|
732
|
+
def msearch(params = {})
|
733
|
+
api_name = 'msearch'
|
734
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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"}, "typed_keys"=>{"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, "pre_filter_shard_size"=>{"type"=>"number", "description"=>"A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.", "default"=>128}, "max_concurrent_shard_requests"=>{"type"=>"number", "description"=>"The number of concurrent shard requests each sub search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests", "default"=>"The default grows with the number of nodes in the cluster but is at most 256."}, "rest_total_hits_as_int"=>{"type"=>"boolean", "description"=>"Indicates whether hits.total should be rendered as an integer or an object in the rest search response", "default"=>false}, "ccs_minimize_roundtrips"=>{"type"=>"boolean", "description"=>"Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", "default"=>"true"}}}, "body"=>{"description"=>"The request definitions (metadata-search request definition pairs), separated by newlines", "required"=>true, "serialize"=>"bulk"}}
|
735
|
+
request(api_name, api_spec, params)
|
736
|
+
end
|
737
|
+
|
738
|
+
# msearch_template ["GET", "POST"]
|
739
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html
|
740
|
+
def msearch_template(params = {})
|
741
|
+
api_name = 'msearch_template'
|
742
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.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"}, "typed_keys"=>{"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, "max_concurrent_searches"=>{"type"=>"number", "description"=>"Controls the maximum number of concurrent searches the multi search api will execute"}, "rest_total_hits_as_int"=>{"type"=>"boolean", "description"=>"Indicates whether hits.total should be rendered as an integer or an object in the rest search response", "default"=>false}, "ccs_minimize_roundtrips"=>{"type"=>"boolean", "description"=>"Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", "default"=>"true"}}}, "body"=>{"description"=>"The request definitions (metadata-search request definition pairs), separated by newlines", "required"=>true, "serialize"=>"bulk"}}
|
743
|
+
request(api_name, api_spec, params)
|
744
|
+
end
|
745
|
+
|
746
|
+
# mtermvectors ["GET", "POST"]
|
747
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html
|
748
|
+
def mtermvectors(params = {})
|
749
|
+
api_name = 'mtermvectors'
|
750
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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}}
|
751
|
+
request(api_name, api_spec, params)
|
752
|
+
end
|
753
|
+
|
754
|
+
# nodes.hot_threads ["GET"]
|
755
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html
|
756
|
+
def nodes_hot_threads(params = {})
|
757
|
+
api_name = 'nodes.hot_threads'
|
758
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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}
|
759
|
+
request(api_name, api_spec, params)
|
760
|
+
end
|
761
|
+
|
762
|
+
# nodes.info ["GET"]
|
763
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html
|
764
|
+
def nodes_info(params = {})
|
765
|
+
api_name = 'nodes.info'
|
766
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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)"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}}, "body"=>nil}
|
767
|
+
request(api_name, api_spec, params)
|
768
|
+
end
|
769
|
+
|
770
|
+
# nodes.reload_secure_settings ["POST"]
|
771
|
+
# https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings
|
772
|
+
def nodes_reload_secure_settings(params = {})
|
773
|
+
api_name = 'nodes.reload_secure_settings'
|
774
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings", "methods"=>["POST"], "url"=>{"path"=>"/_nodes/reload_secure_settings", "paths"=>["/_nodes/reload_secure_settings", "/_nodes/{node_id}/reload_secure_settings"], "parts"=>{"node_id"=>{"type"=>"list", "description"=>"A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes."}}, "params"=>{"timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}}, "body"=>nil}
|
775
|
+
request(api_name, api_spec, params)
|
776
|
+
end
|
777
|
+
|
778
|
+
# nodes.stats ["GET"]
|
779
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html
|
780
|
+
def nodes_stats(params = {})
|
781
|
+
api_name = 'nodes.stats'
|
782
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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", "request_cache", "refresh", "search", "segments", "store", "warmer", "suggest"], "description"=>"Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified."}, "node_id"=>{"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}}, "params"=>{"completion_fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)"}, "fielddata_fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` index metric (supports wildcards)"}, "fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)"}, "groups"=>{"type"=>"boolean", "description"=>"A comma-separated list of search groups for `search` index metric"}, "level"=>{"type"=>"enum", "description"=>"Return indices stats aggregated at index, node or shard level", "options"=>["indices", "node", "shards"], "default"=>"node"}, "types"=>{"type"=>"list", "description"=>"A comma-separated list of document types for the `indexing` index metric"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "include_segment_file_sizes"=>{"type"=>"boolean", "description"=>"Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)", "default"=>false}}}, "body"=>nil}
|
783
|
+
request(api_name, api_spec, params)
|
784
|
+
end
|
785
|
+
|
786
|
+
# nodes.usage ["GET"]
|
787
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html
|
788
|
+
def nodes_usage(params = {})
|
789
|
+
api_name = 'nodes.usage'
|
790
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html", "methods"=>["GET"], "url"=>{"path"=>"/_nodes/usage", "paths"=>["/_nodes/usage", "/_nodes/{node_id}/usage", "/_nodes/usage/{metric}", "/_nodes/{node_id}/usage/{metric}"], "parts"=>{"metric"=>{"type"=>"list", "options"=>["_all", "rest_actions"], "description"=>"Limit the information returned to the specified metrics"}, "node_id"=>{"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}}, "params"=>{"timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}}, "body"=>nil}
|
791
|
+
request(api_name, api_spec, params)
|
792
|
+
end
|
793
|
+
|
794
|
+
# ping ["HEAD"]
|
795
|
+
# http://www.elastic.co/guide/
|
796
|
+
def ping(params = {})
|
797
|
+
api_name = 'ping'
|
798
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/", "methods"=>["HEAD"], "url"=>{"path"=>"/", "paths"=>["/"], "parts"=>{}, "params"=>{}}, "body"=>nil}
|
799
|
+
request(api_name, api_spec, params)
|
800
|
+
end
|
801
|
+
alias :ping? :ping
|
802
|
+
|
803
|
+
# put_script ["PUT", "POST"]
|
804
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
|
805
|
+
def put_script(params = {})
|
806
|
+
api_name = 'put_script'
|
807
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html", "methods"=>["PUT", "POST"], "url"=>{"path"=>"/_scripts/{id}", "paths"=>["/_scripts/{id}", "/_scripts/{id}/{context}"], "parts"=>{"id"=>{"type"=>"string", "description"=>"Script ID", "required"=>true}, "context"=>{"type"=>"string", "description"=>"Script context"}}, "params"=>{"timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "context"=>{"type"=>"string", "description"=>"Context name to compile script against"}}}, "body"=>{"description"=>"The document", "required"=>true}}
|
808
|
+
request(api_name, api_spec, params)
|
809
|
+
end
|
810
|
+
|
811
|
+
# rank_eval ["GET", "POST"]
|
812
|
+
# https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html
|
813
|
+
def rank_eval(params = {})
|
814
|
+
api_name = 'rank_eval'
|
815
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/_rank_eval", "paths"=>["/_rank_eval", "/{index}/_rank_eval"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}}, "params"=>{"ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}}}, "body"=>{"description"=>"The ranking evaluation search definition, including search requests, document ratings and ranking metric definition.", "required"=>true}}
|
816
|
+
request(api_name, api_spec, params)
|
817
|
+
end
|
818
|
+
|
819
|
+
# reindex ["POST"]
|
820
|
+
# https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html
|
821
|
+
def reindex(params = {})
|
822
|
+
api_name = 'reindex'
|
823
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/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"=>true, "description"=>"Should the request should block until the reindex is complete."}, "requests_per_second"=>{"type"=>"number", "default"=>0, "description"=>"The throttle to set on this request in sub-requests per second. -1 means no throttle."}, "scroll"=>{"type"=>"time", "description"=>"Control how long to keep the search context alive", "default"=>"5m"}, "slices"=>{"type"=>"number", "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}}
|
824
|
+
request(api_name, api_spec, params)
|
825
|
+
end
|
826
|
+
|
827
|
+
# reindex_rethrottle ["POST"]
|
828
|
+
# https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html
|
829
|
+
def reindex_rethrottle(params = {})
|
830
|
+
api_name = 'reindex_rethrottle'
|
831
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html", "methods"=>["POST"], "url"=>{"path"=>"/_reindex/{task_id}/_rethrottle", "paths"=>["/_reindex/{task_id}/_rethrottle"], "parts"=>{"task_id"=>{"type"=>"string", "required"=>true, "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}
|
832
|
+
request(api_name, api_spec, params)
|
833
|
+
end
|
834
|
+
|
835
|
+
# render_search_template ["GET", "POST"]
|
836
|
+
# http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html
|
837
|
+
def render_search_template(params = {})
|
838
|
+
api_name = 'render_search_template'
|
839
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/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"}}
|
840
|
+
request(api_name, api_spec, params)
|
841
|
+
end
|
842
|
+
|
843
|
+
# scripts_painless_execute ["GET", "POST"]
|
844
|
+
# https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html
|
845
|
+
def scripts_painless_execute(params = {})
|
846
|
+
api_name = 'scripts_painless_execute'
|
847
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/_scripts/painless/_execute", "paths"=>["/_scripts/painless/_execute"], "parts"=>{}, "params"=>{}}, "body"=>{"description"=>"The script to execute"}}
|
848
|
+
request(api_name, api_spec, params)
|
849
|
+
end
|
850
|
+
|
851
|
+
# scroll ["GET", "POST"]
|
852
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html
|
853
|
+
def scroll(params = {})
|
854
|
+
api_name = 'scroll'
|
855
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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"}, "rest_total_hits_as_int"=>{"type"=>"boolean", "description"=>"Indicates whether hits.total should be rendered as an integer or an object in the rest search response", "default"=>false}}}, "body"=>{"description"=>"The scroll ID if not passed by URL or query parameter."}}
|
856
|
+
request(api_name, api_spec, params)
|
857
|
+
end
|
858
|
+
|
859
|
+
# search ["GET", "POST"]
|
860
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html
|
861
|
+
def search(params = {})
|
862
|
+
api_name = 'search'
|
863
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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)"}, "ccs_minimize_roundtrips"=>{"type"=>"boolean", "description"=>"Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", "default"=>"true"}, "default_operator"=>{"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, "df"=>{"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, "explain"=>{"type"=>"boolean", "description"=>"Specify whether to return detailed information about score computation as part of a hit"}, "stored_fields"=>{"type"=>"list", "description"=>"A comma-separated list of stored fields to return as part of a hit"}, "docvalue_fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields to return as the docvalue representation of a field for each hit"}, "from"=>{"type"=>"number", "description"=>"Starting offset (default: 0)"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "ignore_throttled"=>{"type"=>"boolean", "description"=>"Whether specified concrete, expanded or aliased indices should be ignored when throttled"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "lenient"=>{"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "q"=>{"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, "routing"=>{"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, "scroll"=>{"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, "search_type"=>{"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}, "size"=>{"type"=>"number", "description"=>"Number of hits to return (default: 10)"}, "sort"=>{"type"=>"list", "description"=>"A comma-separated list of <field>:<direction> pairs"}, "_source"=>{"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_excludes"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_includes"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "terminate_after"=>{"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, "stats"=>{"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, "suggest_field"=>{"type"=>"string", "description"=>"Specify which field to use for suggestions"}, "suggest_mode"=>{"type"=>"enum", "options"=>["missing", "popular", "always"], "default"=>"missing", "description"=>"Specify suggest mode"}, "suggest_size"=>{"type"=>"number", "description"=>"How many suggestions to return in response"}, "suggest_text"=>{"type"=>"string", "description"=>"The source text for which the suggestions should be returned"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "track_scores"=>{"type"=>"boolean", "description"=>"Whether to calculate and return scores even if they are not used for sorting"}, "track_total_hits"=>{"type"=>"boolean", "description"=>"Indicate if the number of documents that match the query should be tracked"}, "allow_partial_search_results"=>{"type"=>"boolean", "default"=>true, "description"=>"Indicate if an error should be returned if there is a partial search failure or timeout"}, "typed_keys"=>{"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, "version"=>{"type"=>"boolean", "description"=>"Specify whether to return document version as part of a hit"}, "seq_no_primary_term"=>{"type"=>"boolean", "description"=>"Specify whether to return sequence number and primary term of the last modification of each hit"}, "request_cache"=>{"type"=>"boolean", "description"=>"Specify if request cache should be used for this request or not, defaults to index level setting"}, "batched_reduce_size"=>{"type"=>"number", "description"=>"The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.", "default"=>512}, "max_concurrent_shard_requests"=>{"type"=>"number", "description"=>"The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests", "default"=>"The default is 5."}, "pre_filter_shard_size"=>{"type"=>"number", "description"=>"A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.", "default"=>128}, "rest_total_hits_as_int"=>{"type"=>"boolean", "description"=>"Indicates whether hits.total should be rendered as an integer or an object in the rest search response", "default"=>false}}}, "body"=>{"description"=>"The search definition using the Query DSL"}}
|
864
|
+
request(api_name, api_spec, params)
|
865
|
+
end
|
866
|
+
|
867
|
+
# search_shards ["GET", "POST"]
|
868
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html
|
869
|
+
def search_shards(params = {})
|
870
|
+
api_name = 'search_shards'
|
871
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/{index}/_search_shards", "paths"=>["/_search_shards", "/{index}/_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"}}, "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}
|
872
|
+
request(api_name, api_spec, params)
|
873
|
+
end
|
874
|
+
|
875
|
+
# search_template ["GET", "POST"]
|
876
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html
|
877
|
+
def search_template(params = {})
|
878
|
+
api_name = 'search_template'
|
879
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://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)"}, "ignore_throttled"=>{"type"=>"boolean", "description"=>"Whether specified concrete, expanded or aliased indices should be ignored when throttled"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "routing"=>{"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, "scroll"=>{"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, "search_type"=>{"type"=>"enum", "options"=>["query_then_fetch", "query_and_fetch", "dfs_query_then_fetch", "dfs_query_and_fetch"], "description"=>"Search operation type"}, "explain"=>{"type"=>"boolean", "description"=>"Specify whether to return detailed information about score computation as part of a hit"}, "profile"=>{"type"=>"boolean", "description"=>"Specify whether to profile the query execution"}, "typed_keys"=>{"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, "rest_total_hits_as_int"=>{"type"=>"boolean", "description"=>"Indicates whether hits.total should be rendered as an integer or an object in the rest search response", "default"=>false}, "ccs_minimize_roundtrips"=>{"type"=>"boolean", "description"=>"Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", "default"=>"true"}}}, "body"=>{"description"=>"The search definition template and its params", "required"=>true}}
|
880
|
+
request(api_name, api_spec, params)
|
881
|
+
end
|
882
|
+
|
883
|
+
# snapshot.create ["PUT", "POST"]
|
884
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
|
885
|
+
def snapshot_create(params = {})
|
886
|
+
api_name = 'snapshot.create'
|
887
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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}}
|
888
|
+
request(api_name, api_spec, params)
|
889
|
+
end
|
890
|
+
|
891
|
+
# snapshot.create_repository ["PUT", "POST"]
|
892
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
|
893
|
+
def snapshot_create_repository(params = {})
|
894
|
+
api_name = 'snapshot.create_repository'
|
895
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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}}
|
896
|
+
request(api_name, api_spec, params)
|
897
|
+
end
|
898
|
+
|
899
|
+
# snapshot.delete ["DELETE"]
|
900
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
|
901
|
+
def snapshot_delete(params = {})
|
902
|
+
api_name = 'snapshot.delete'
|
903
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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}
|
904
|
+
request(api_name, api_spec, params)
|
905
|
+
end
|
906
|
+
|
907
|
+
# snapshot.delete_repository ["DELETE"]
|
908
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
|
909
|
+
def snapshot_delete_repository(params = {})
|
910
|
+
api_name = 'snapshot.delete_repository'
|
911
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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}
|
912
|
+
request(api_name, api_spec, params)
|
913
|
+
end
|
914
|
+
|
915
|
+
# snapshot.get ["GET"]
|
916
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
|
917
|
+
def snapshot_get(params = {})
|
918
|
+
api_name = 'snapshot.get'
|
919
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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"}, "verbose"=>{"type"=>"boolean", "description"=>"Whether to show verbose snapshot info or only show the basic info found in the repository index blob"}}}, "body"=>nil}
|
920
|
+
request(api_name, api_spec, params)
|
921
|
+
end
|
922
|
+
|
923
|
+
# snapshot.get_repository ["GET"]
|
924
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
|
925
|
+
def snapshot_get_repository(params = {})
|
926
|
+
api_name = 'snapshot.get_repository'
|
927
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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}
|
928
|
+
request(api_name, api_spec, params)
|
929
|
+
end
|
930
|
+
|
931
|
+
# snapshot.restore ["POST"]
|
932
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
|
933
|
+
def snapshot_restore(params = {})
|
934
|
+
api_name = 'snapshot.restore'
|
935
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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}}
|
936
|
+
request(api_name, api_spec, params)
|
937
|
+
end
|
938
|
+
|
939
|
+
# snapshot.status ["GET"]
|
940
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
|
941
|
+
def snapshot_status(params = {})
|
942
|
+
api_name = 'snapshot.status'
|
943
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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}
|
944
|
+
request(api_name, api_spec, params)
|
945
|
+
end
|
946
|
+
|
947
|
+
# snapshot.verify_repository ["POST"]
|
948
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
|
949
|
+
def snapshot_verify_repository(params = {})
|
950
|
+
api_name = 'snapshot.verify_repository'
|
951
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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}
|
952
|
+
request(api_name, api_spec, params)
|
953
|
+
end
|
954
|
+
|
955
|
+
# tasks.cancel ["POST"]
|
956
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
|
957
|
+
def tasks_cancel(params = {})
|
958
|
+
api_name = 'tasks.cancel'
|
959
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/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"=>{"nodes"=>{"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, "actions"=>{"type"=>"list", "description"=>"A comma-separated list of actions that should be cancelled. Leave empty to cancel all."}, "parent_task_id"=>{"type"=>"string", "description"=>"Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all."}}}, "body"=>nil}
|
960
|
+
request(api_name, api_spec, params)
|
961
|
+
end
|
962
|
+
|
963
|
+
# tasks.get ["GET"]
|
964
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
|
965
|
+
def tasks_get(params = {})
|
966
|
+
api_name = 'tasks.get'
|
967
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html", "methods"=>["GET"], "url"=>{"path"=>"/_tasks/{task_id}", "paths"=>["/_tasks/{task_id}"], "parts"=>{"task_id"=>{"type"=>"string", "required"=>true, "description"=>"Return the task with specified id (node_id:task_number)"}}, "params"=>{"wait_for_completion"=>{"type"=>"boolean", "description"=>"Wait for the matching tasks to complete (default: false)"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}}, "body"=>nil}
|
968
|
+
request(api_name, api_spec, params)
|
969
|
+
end
|
970
|
+
|
971
|
+
# tasks.list ["GET"]
|
972
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
|
973
|
+
def tasks_list(params = {})
|
974
|
+
api_name = 'tasks.list'
|
975
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html", "methods"=>["GET"], "url"=>{"path"=>"/_tasks", "paths"=>["/_tasks"], "parts"=>{}, "params"=>{"nodes"=>{"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, "actions"=>{"type"=>"list", "description"=>"A comma-separated list of actions that should be returned. Leave empty to return all."}, "detailed"=>{"type"=>"boolean", "description"=>"Return detailed task information (default: false)"}, "parent_task_id"=>{"type"=>"string", "description"=>"Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all."}, "wait_for_completion"=>{"type"=>"boolean", "description"=>"Wait for the matching tasks to complete (default: false)"}, "group_by"=>{"type"=>"enum", "description"=>"Group tasks by nodes or parent/child relationships", "options"=>["nodes", "parents", "none"], "default"=>"nodes"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}}}, "body"=>nil}
|
976
|
+
request(api_name, api_spec, params)
|
977
|
+
end
|
978
|
+
|
979
|
+
# termvectors ["GET", "POST"]
|
980
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html
|
981
|
+
def termvectors(params = {})
|
982
|
+
api_name = 'termvectors'
|
983
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html", "methods"=>["GET", "POST"], "url"=>{"path"=>"/{index}/_termvectors/{id}", "paths"=>["/{index}/_termvectors/{id}", "/{index}/_termvectors/", "/{index}/{type}/{id}/_termvectors", "/{index}/{type}/_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"=>false}, "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}}
|
984
|
+
request(api_name, api_spec, params)
|
985
|
+
end
|
986
|
+
|
987
|
+
# update ["POST"]
|
988
|
+
# http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html
|
989
|
+
def update(params = {})
|
990
|
+
api_name = 'update'
|
991
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html", "methods"=>["POST"], "url"=>{"path"=>"/{index}/_update/{id}", "paths"=>["/{index}/_update/{id}", "/{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", "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)"}, "_source"=>{"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_excludes"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_includes"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "lang"=>{"type"=>"string", "description"=>"The script language (default: painless)"}, "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"}, "if_seq_no"=>{"type"=>"number", "description"=>"only perform the update operation if the last operation that has changed the document has the specified sequence number"}, "if_primary_term"=>{"type"=>"number", "description"=>"only perform the update operation if the last operation that has changed the document has the specified primary term"}}}, "body"=>{"description"=>"The request definition requires either `script` or partial `doc`", "required"=>true}}
|
992
|
+
request(api_name, api_spec, params)
|
993
|
+
end
|
994
|
+
|
995
|
+
# update_by_query ["POST"]
|
996
|
+
# https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html
|
997
|
+
def update_by_query(params = {})
|
998
|
+
api_name = 'update_by_query'
|
999
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/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_excludes"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_includes"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "terminate_after"=>{"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, "stats"=>{"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, "version"=>{"type"=>"boolean", "description"=>"Specify whether to return document version as part of a hit"}, "version_type"=>{"type"=>"boolean", "description"=>"Should the document increment the version number (internal) on hit or not (reindex)"}, "request_cache"=>{"type"=>"boolean", "description"=>"Specify if request cache should be used for this request or not, defaults to index level setting"}, "refresh"=>{"type"=>"boolean", "description"=>"Should the 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"=>true, "description"=>"Should the request should block until the update by query operation is complete."}, "requests_per_second"=>{"type"=>"number", "default"=>0, "description"=>"The throttle to set on this request in sub-requests per second. -1 means no throttle."}, "slices"=>{"type"=>"number", "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"}}
|
1000
|
+
request(api_name, api_spec, params)
|
1001
|
+
end
|
1002
|
+
|
1003
|
+
# update_by_query_rethrottle ["POST"]
|
1004
|
+
# https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html
|
1005
|
+
def update_by_query_rethrottle(params = {})
|
1006
|
+
api_name = 'update_by_query_rethrottle'
|
1007
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html", "methods"=>["POST"], "url"=>{"path"=>"/_update_by_query/{task_id}/_rethrottle", "paths"=>["/_update_by_query/{task_id}/_rethrottle"], "parts"=>{"task_id"=>{"type"=>"string", "required"=>true, "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}
|
1008
|
+
request(api_name, api_spec, params)
|
1009
|
+
end
|
1010
|
+
end
|
1011
|
+
end
|
1012
|
+
end
|