antbird 0.0.7 → 0.2.0
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 +14 -1
- data/antbird.gemspec +7 -8
- data/lib/antbird/client.rb +8 -4
- data/lib/antbird/rest_api/{rest_api_v6_2.rb → rest_api_v6_4.rb} +38 -22
- data/lib/antbird/rest_api/{rest_api_v6_1.rb → rest_api_v6_5.rb} +67 -27
- data/lib/antbird/rest_api/rest_api_v6_6.rb +1012 -0
- data/lib/antbird/rest_api/rest_api_v6_7.rb +1012 -0
- data/lib/antbird/rest_api/rest_api_v6_8.rb +1012 -0
- 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 +60 -49
- data/.travis.yml +0 -20
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 162b46a36d97a442af5e15d9c741fe28c63edd8f7a9be3d615ab84d93de930d0
|
4
|
+
data.tar.gz: 2a00c3244dae121c1e33839bd69fe0358f43a474aab562f5fb3783263c75df51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d7d986cde55b29d5f5a03527c1eb38d10bba3be4143586a481fa96b1d7dc045bc8766eb8b4474afb4aaf248a23113b498fd620449cb9f070c86b623a8796869
|
7
|
+
data.tar.gz: '091ef52dec8499efaf8f073bbcb046318ac654fbb4b6a93a486867828a6ae5b376456eccaa32b53abb002ea21c9cbaaafd99f0142362161f90b92bc27d23a884'
|
@@ -0,0 +1,41 @@
|
|
1
|
+
name: build
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
strategy:
|
9
|
+
fail-fast: false
|
10
|
+
matrix:
|
11
|
+
# 1. Run script/list_versions
|
12
|
+
# 2. Check https://www.elastic.co/jp/support/eol
|
13
|
+
elasticsearch:
|
14
|
+
- 7.9.2
|
15
|
+
- 7.8.1
|
16
|
+
- 7.7.1
|
17
|
+
- 7.6.2
|
18
|
+
- 7.5.2
|
19
|
+
- 7.4.2
|
20
|
+
- 7.3.2
|
21
|
+
- 7.2.1
|
22
|
+
- 7.1.1
|
23
|
+
- 6.8.12
|
24
|
+
services:
|
25
|
+
elasticsearch:
|
26
|
+
image: docker.elastic.co/elasticsearch/elasticsearch-oss:${{matrix.elasticsearch}}
|
27
|
+
ports:
|
28
|
+
- 9200:9200
|
29
|
+
- 9300:9300
|
30
|
+
env:
|
31
|
+
discovery.type: single-node
|
32
|
+
steps:
|
33
|
+
- uses: actions/checkout@v2
|
34
|
+
- uses: ruby/setup-ruby@v1
|
35
|
+
with:
|
36
|
+
ruby-version: 2.6
|
37
|
+
bundler-cache: true
|
38
|
+
- run: bundle install --jobs 4 --retry 3
|
39
|
+
- name: Wait for elasticsearch
|
40
|
+
run: timeout 60 bash -c "until curl --silent --output /dev/null localhost:9200/_cat/health?h=st; do printf '.'; sleep 5; done; printf '\n'"
|
41
|
+
- run: bundle exec rspec
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Nearly auto-generated Elasticsearch client
|
4
4
|
|
5
|
-
[![Build Status](https://
|
5
|
+
[![Build Status](https://github.com/fukayatsu/antbird/workflows/build/badge.svg)](https://github.com/fukayatsu/antbird/actions)
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -52,6 +52,12 @@ client = Antbird::Client.new(
|
|
52
52
|
type: 'test-type'
|
53
53
|
}
|
54
54
|
) do |f|
|
55
|
+
# https://github.com/lostisland/faraday/blob/master/docs/adapters/net_http_persistent.md
|
56
|
+
f.adapter :net_http_persistent, pool_size: 5 do |http|
|
57
|
+
http.idle_timeout = 100
|
58
|
+
end
|
59
|
+
|
60
|
+
# https://github.com/winebarrel/faraday_middleware-aws-sigv4
|
55
61
|
f.request(
|
56
62
|
:aws_sigv4,
|
57
63
|
service: 'es',
|
@@ -111,6 +117,13 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
111
117
|
|
112
118
|
Bug reports and pull requests are welcome on GitHub at https://github.com/fukayatsu/antbird. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
113
119
|
|
120
|
+
### How to support newer version of Elasticsearch
|
121
|
+
|
122
|
+
1. Add Elasticsearch version to `jobs.build.strategy.matrix.elasticsearch` on `.github/workflows/build.yml`
|
123
|
+
- Only one line for `x.y.*` version
|
124
|
+
1. `script/generate_api_methods`
|
125
|
+
- Set `GITHUB_TOKEN=***` env for GitHub API Limit
|
126
|
+
|
114
127
|
## License
|
115
128
|
|
116
129
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/antbird.gemspec
CHANGED
@@ -10,25 +10,24 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["fukayatsu@gmail.com"]
|
11
11
|
|
12
12
|
spec.summary = %q{Nearly auto-generated Elasticsearch client}
|
13
|
-
spec.description = %q{
|
13
|
+
spec.description = %q{Antbird is a yet another low level API client for the Elasticsearch HTTP interface.}
|
14
14
|
spec.homepage = "https://github.com/fukayatsu/antbird"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
-
f.match(%r{^(test|spec|features)/})
|
18
|
+
f.match(%r{^(test|spec|features|script|tmp)/})
|
19
19
|
end
|
20
20
|
spec.bindir = "exe"
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
|
-
spec.add_dependency "faraday", "
|
25
|
-
spec.add_dependency 'faraday_middleware',
|
24
|
+
spec.add_dependency "faraday", "> 0.8", "< 2.0"
|
25
|
+
spec.add_dependency 'faraday_middleware', "> 0.12", "< 1.0"
|
26
26
|
|
27
|
-
spec.add_development_dependency "
|
28
|
-
spec.add_development_dependency "
|
27
|
+
spec.add_development_dependency "net-http-persistent"
|
28
|
+
spec.add_development_dependency "bundler", "> 1.16", "< 3.0"
|
29
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
29
30
|
spec.add_development_dependency "rspec", "~> 3.0"
|
30
|
-
spec.add_development_dependency "guard-rspec", "~> 4.0"
|
31
|
-
spec.add_development_dependency "rspec-nc"
|
32
31
|
spec.add_development_dependency "octokit", "~> 4.0"
|
33
32
|
spec.add_development_dependency "pry-byebug", "~> 3.0"
|
34
33
|
end
|
data/lib/antbird/client.rb
CHANGED
@@ -44,7 +44,13 @@ module Antbird
|
|
44
44
|
|
45
45
|
# Greedy match
|
46
46
|
api_path = nil
|
47
|
+
path_methods = nil
|
47
48
|
api_spec['url']['paths'].sort { |a, b| b.size <=> a.size }.each do |path|
|
49
|
+
if path.is_a?(Hash)
|
50
|
+
path_methods = path['methods']
|
51
|
+
path = path['path']
|
52
|
+
end
|
53
|
+
|
48
54
|
embeded = path.gsub(/{([a-z_\-}]+)}/) do |match|
|
49
55
|
scopes[$1.to_sym] || @scope[$1.to_sym] || match
|
50
56
|
end
|
@@ -56,7 +62,7 @@ module Antbird
|
|
56
62
|
raise "API path not found: paths: #{api_spec['url']['paths']}, scope: #{@scope}"
|
57
63
|
end
|
58
64
|
|
59
|
-
methods = api_spec['methods'].map(&:downcase).map(&:to_sym)
|
65
|
+
methods = (Array(path_methods) + Array(api_spec['methods'])).map(&:downcase).map(&:to_sym)
|
60
66
|
method = methods.include?(:post) ? :post : methods.first
|
61
67
|
|
62
68
|
read_timeout = params.delete(:read_timeout)
|
@@ -145,12 +151,10 @@ module Antbird
|
|
145
151
|
@connection ||= Faraday.new(url) do |conn|
|
146
152
|
@block.call(conn) if @block
|
147
153
|
conn.request :json
|
148
|
-
conn.response :json, :
|
154
|
+
conn.response :json, content_type: /\bjson$/
|
149
155
|
|
150
156
|
conn.options[:timeout] = read_timeout
|
151
157
|
conn.options[:open_timeout] = open_timeout
|
152
|
-
|
153
|
-
conn.adapter Faraday.default_adapter
|
154
158
|
end
|
155
159
|
end
|
156
160
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# Generated REST API methods file - DO NOT EDIT!
|
2
|
-
# Date:
|
3
|
-
# ES version: 6.
|
2
|
+
# Date: 2019-12-14
|
3
|
+
# ES version: 6.4.3
|
4
4
|
|
5
5
|
module Antbird
|
6
6
|
module RestApi
|
7
|
-
module
|
7
|
+
module RestApiV6_4
|
8
8
|
def common_params
|
9
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 respone."}}}
|
10
10
|
end
|
@@ -157,7 +157,7 @@ module Antbird
|
|
157
157
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
|
158
158
|
def cat_tasks(params = {})
|
159
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)"}, "
|
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
161
|
request(api_name, api_spec, params)
|
162
162
|
end
|
163
163
|
|
@@ -285,7 +285,7 @@ module Antbird
|
|
285
285
|
# https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html
|
286
286
|
def delete_by_query(params = {})
|
287
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
|
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_exclude"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "terminate_after"=>{"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, "stats"=>{"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, "version"=>{"type"=>"boolean", "description"=>"Specify whether to return document version as part of a hit"}, "request_cache"=>{"type"=>"boolean", "description"=>"Specify if request cache should be used for this request or not, defaults to index level setting"}, "refresh"=>{"type"=>"boolean", "description"=>"Should the effected indexes be refreshed?"}, "timeout"=>{"type"=>"time", "default"=>"1m", "description"=>"Time each individual bulk request should wait for shards that are unavailable."}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "scroll_size"=>{"type"=>"number", "defaut_value"=>100, "description"=>"Size on the scroll request powering the 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
289
|
request(api_name, api_spec, params)
|
290
290
|
end
|
291
291
|
|
@@ -343,7 +343,7 @@ module Antbird
|
|
343
343
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
|
344
344
|
def get_script(params = {})
|
345
345
|
api_name = 'get_script'
|
346
|
-
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"=>{}}, "body"=>nil}
|
346
|
+
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}
|
347
347
|
request(api_name, api_spec, params)
|
348
348
|
end
|
349
349
|
|
@@ -367,7 +367,7 @@ module Antbird
|
|
367
367
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html
|
368
368
|
def indices_analyze(params = {})
|
369
369
|
api_name = 'indices.analyze'
|
370
|
-
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"}
|
370
|
+
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"}}
|
371
371
|
request(api_name, api_spec, params)
|
372
372
|
end
|
373
373
|
|
@@ -375,7 +375,7 @@ module Antbird
|
|
375
375
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html
|
376
376
|
def indices_clear_cache(params = {})
|
377
377
|
api_name = 'indices.clear_cache'
|
378
|
-
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html", "methods"=>["POST", "GET"], "url"=>{"path"=>"/_cache/clear", "paths"=>["/_cache/clear", "/{index}/_cache/clear"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index name to limit the operation"}}, "params"=>{"field_data"=>{"type"=>"boolean", "description"=>"Clear field data"}, "fielddata"=>{"type"=>"boolean", "description"=>"Clear field data"}, "fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields to clear when using the `
|
378
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html", "methods"=>["POST", "GET"], "url"=>{"path"=>"/_cache/clear", "paths"=>["/_cache/clear", "/{index}/_cache/clear"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index name to limit the operation"}}, "params"=>{"field_data"=>{"type"=>"boolean", "description"=>"Clear field data. This is deprecated. Prefer `fielddata`."}, "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_cache"=>{"type"=>"boolean", "description"=>"Clear request cache"}, "request"=>{"type"=>"boolean", "description"=>"Clear request cache"}}}, "body"=>nil}
|
379
379
|
request(api_name, api_spec, params)
|
380
380
|
end
|
381
381
|
|
@@ -483,7 +483,7 @@ module Antbird
|
|
483
483
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html
|
484
484
|
def indices_get(params = {})
|
485
485
|
api_name = 'indices.get'
|
486
|
-
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"=>{"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}
|
486
|
+
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"=>{"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}
|
487
487
|
request(api_name, api_spec, params)
|
488
488
|
end
|
489
489
|
|
@@ -507,7 +507,7 @@ module Antbird
|
|
507
507
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html
|
508
508
|
def indices_get_mapping(params = {})
|
509
509
|
api_name = 'indices.get_mapping'
|
510
|
-
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"=>{"ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}}}, "body"=>nil}
|
510
|
+
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"=>{"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}
|
511
511
|
request(api_name, api_spec, params)
|
512
512
|
end
|
513
513
|
|
@@ -515,7 +515,7 @@ module Antbird
|
|
515
515
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html
|
516
516
|
def indices_get_settings(params = {})
|
517
517
|
api_name = 'indices.get_settings'
|
518
|
-
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"=>{"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}
|
518
|
+
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}
|
519
519
|
request(api_name, api_spec, params)
|
520
520
|
end
|
521
521
|
|
@@ -563,7 +563,7 @@ module Antbird
|
|
563
563
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html
|
564
564
|
def indices_put_settings(params = {})
|
565
565
|
api_name = 'indices.put_settings'
|
566
|
-
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"}, "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}}
|
566
|
+
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}}
|
567
567
|
request(api_name, api_spec, params)
|
568
568
|
end
|
569
569
|
|
@@ -619,7 +619,7 @@ module Antbird
|
|
619
619
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html
|
620
620
|
def indices_shrink(params = {})
|
621
621
|
api_name = 'indices.shrink'
|
622
|
-
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"=>{"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`)"}}
|
622
|
+
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`)"}}
|
623
623
|
request(api_name, api_spec, params)
|
624
624
|
end
|
625
625
|
|
@@ -627,7 +627,7 @@ module Antbird
|
|
627
627
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html
|
628
628
|
def indices_split(params = {})
|
629
629
|
api_name = 'indices.split'
|
630
|
-
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"=>{"timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Set the number of active shards to wait for on the shrunken index before the operation returns."}}}, "body"=>{"description"=>"The configuration for the target index (`settings` and `aliases`)"}}
|
630
|
+
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`)"}}
|
631
631
|
request(api_name, api_spec, params)
|
632
632
|
end
|
633
633
|
|
@@ -759,6 +759,14 @@ module Antbird
|
|
759
759
|
request(api_name, api_spec, params)
|
760
760
|
end
|
761
761
|
|
762
|
+
# nodes.reload_secure_settings ["POST"]
|
763
|
+
# https://www.elastic.co/guide/en/elasticsearch/reference/6.4/secure-settings.html#reloadable-secure-settings
|
764
|
+
def nodes_reload_secure_settings(params = {})
|
765
|
+
api_name = 'nodes.reload_secure_settings'
|
766
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/6.4/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}
|
767
|
+
request(api_name, api_spec, params)
|
768
|
+
end
|
769
|
+
|
762
770
|
# nodes.stats ["GET"]
|
763
771
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html
|
764
772
|
def nodes_stats(params = {})
|
@@ -771,7 +779,7 @@ module Antbird
|
|
771
779
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html
|
772
780
|
def nodes_usage(params = {})
|
773
781
|
api_name = 'nodes.usage'
|
774
|
-
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"=>{"
|
782
|
+
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}
|
775
783
|
request(api_name, api_spec, params)
|
776
784
|
end
|
777
785
|
|
@@ -792,11 +800,11 @@ module Antbird
|
|
792
800
|
request(api_name, api_spec, params)
|
793
801
|
end
|
794
802
|
|
795
|
-
# rank_eval ["POST"]
|
803
|
+
# rank_eval ["GET", "POST"]
|
796
804
|
# https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html
|
797
805
|
def rank_eval(params = {})
|
798
806
|
api_name = 'rank_eval'
|
799
|
-
api_spec = @api_specs[api_name] ||= {"documentation"=>"https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html", "methods"=>["POST"], "url"=>{"path"=>"/_rank_eval", "paths"=>["/_rank_eval", "/{index}/_rank_eval"
|
807
|
+
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}}
|
800
808
|
request(api_name, api_spec, params)
|
801
809
|
end
|
802
810
|
|
@@ -824,6 +832,14 @@ module Antbird
|
|
824
832
|
request(api_name, api_spec, params)
|
825
833
|
end
|
826
834
|
|
835
|
+
# scripts_painless_execute ["GET", "POST"]
|
836
|
+
# https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html
|
837
|
+
def scripts_painless_execute(params = {})
|
838
|
+
api_name = 'scripts_painless_execute'
|
839
|
+
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"}}
|
840
|
+
request(api_name, api_spec, params)
|
841
|
+
end
|
842
|
+
|
827
843
|
# scroll ["GET", "POST"]
|
828
844
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html
|
829
845
|
def scroll(params = {})
|
@@ -836,7 +852,7 @@ module Antbird
|
|
836
852
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html
|
837
853
|
def search(params = {})
|
838
854
|
api_name = 'search'
|
839
|
-
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)"}, "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)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "lenient"=>{"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "q"=>{"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, "routing"=>{"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, "scroll"=>{"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, "search_type"=>{"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}, "size"=>{"type"=>"number", "description"=>"Number of hits to return (default: 10)"}, "sort"=>{"type"=>"list", "description"=>"A comma-separated list of <field>:<direction> pairs"}, "_source"=>{"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_exclude"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "terminate_after"=>{"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, "stats"=>{"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, "suggest_field"=>{"type"=>"string", "description"=>"Specify which field to use for suggestions"}, "suggest_mode"=>{"type"=>"enum", "options"=>["missing", "popular", "always"], "default"=>"missing", "description"=>"Specify suggest mode"}, "suggest_size"=>{"type"=>"number", "description"=>"How many suggestions to return in response"}, "suggest_text"=>{"type"=>"string", "description"=>"The source text for which the suggestions should be returned"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "track_scores"=>{"type"=>"boolean", "description"=>"Whether to calculate and return scores even if they are not used for sorting"}, "track_total_hits"=>{"type"=>"boolean", "description"=>"Indicate if the number of documents that match the query should be tracked"}, "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"}, "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 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 grows with the number of nodes in the cluster but is at most 256."}, "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}}}, "body"=>{"description"=>"The search definition using the Query DSL"}}
|
855
|
+
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)"}, "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)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "lenient"=>{"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "q"=>{"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, "routing"=>{"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, "scroll"=>{"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, "search_type"=>{"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}, "size"=>{"type"=>"number", "description"=>"Number of hits to return (default: 10)"}, "sort"=>{"type"=>"list", "description"=>"A comma-separated list of <field>:<direction> pairs"}, "_source"=>{"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_exclude"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "terminate_after"=>{"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, "stats"=>{"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, "suggest_field"=>{"type"=>"string", "description"=>"Specify which field to use for suggestions"}, "suggest_mode"=>{"type"=>"enum", "options"=>["missing", "popular", "always"], "default"=>"missing", "description"=>"Specify suggest mode"}, "suggest_size"=>{"type"=>"number", "description"=>"How many suggestions to return in response"}, "suggest_text"=>{"type"=>"string", "description"=>"The source text for which the suggestions should be returned"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "track_scores"=>{"type"=>"boolean", "description"=>"Whether to calculate and return scores even if they are not used for sorting"}, "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"}, "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 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 grows with the number of nodes in the cluster but is at most 256."}, "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}}}, "body"=>{"description"=>"The search definition using the Query DSL"}}
|
840
856
|
request(api_name, api_spec, params)
|
841
857
|
end
|
842
858
|
|
@@ -932,7 +948,7 @@ module Antbird
|
|
932
948
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
|
933
949
|
def tasks_cancel(params = {})
|
934
950
|
api_name = 'tasks.cancel'
|
935
|
-
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."}, "
|
951
|
+
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}
|
936
952
|
request(api_name, api_spec, params)
|
937
953
|
end
|
938
954
|
|
@@ -940,7 +956,7 @@ module Antbird
|
|
940
956
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
|
941
957
|
def tasks_get(params = {})
|
942
958
|
api_name = 'tasks.get'
|
943
|
-
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)"}}}, "body"=>nil}
|
959
|
+
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}
|
944
960
|
request(api_name, api_spec, params)
|
945
961
|
end
|
946
962
|
|
@@ -948,7 +964,7 @@ module Antbird
|
|
948
964
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
|
949
965
|
def tasks_list(params = {})
|
950
966
|
api_name = 'tasks.list'
|
951
|
-
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)"}, "
|
967
|
+
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}
|
952
968
|
request(api_name, api_spec, params)
|
953
969
|
end
|
954
970
|
|
@@ -972,7 +988,7 @@ module Antbird
|
|
972
988
|
# https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html
|
973
989
|
def update_by_query(params = {})
|
974
990
|
api_name = 'update_by_query'
|
975
|
-
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_exclude"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "terminate_after"=>{"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, "stats"=>{"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, "version"=>{"type"=>"boolean", "description"=>"Specify whether to return document version as part of a hit"}, "version_type"=>{"type"=>"boolean", "description"=>"Should the document increment the version number (internal) on hit or not (reindex)"}, "request_cache"=>{"type"=>"boolean", "description"=>"Specify if request cache should be used for this request or not, defaults to index level setting"}, "refresh"=>{"type"=>"boolean", "description"=>"Should the effected indexes be refreshed?"}, "timeout"=>{"type"=>"time", "default"=>"1m", "description"=>"Time each individual bulk request should wait for shards that are unavailable."}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "scroll_size"=>{"type"=>"number", "defaut_value"=>100, "description"=>"Size on the scroll request powering the
|
991
|
+
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_exclude"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "terminate_after"=>{"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, "stats"=>{"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, "version"=>{"type"=>"boolean", "description"=>"Specify whether to return document version as part of a hit"}, "version_type"=>{"type"=>"boolean", "description"=>"Should the document increment the version number (internal) on hit or not (reindex)"}, "request_cache"=>{"type"=>"boolean", "description"=>"Specify if request cache should be used for this request or not, defaults to index level setting"}, "refresh"=>{"type"=>"boolean", "description"=>"Should the effected indexes be refreshed?"}, "timeout"=>{"type"=>"time", "default"=>"1m", "description"=>"Time each individual bulk request should wait for shards that are unavailable."}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "scroll_size"=>{"type"=>"number", "defaut_value"=>100, "description"=>"Size on the scroll request powering the update by query"}, "wait_for_completion"=>{"type"=>"boolean", "default"=>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"}}
|
976
992
|
request(api_name, api_spec, params)
|
977
993
|
end
|
978
994
|
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# Generated REST API methods file - DO NOT EDIT!
|
2
|
-
# Date:
|
3
|
-
# ES version: 6.
|
2
|
+
# Date: 2019-12-14
|
3
|
+
# ES version: 6.5.4
|
4
4
|
|
5
5
|
module Antbird
|
6
6
|
module RestApi
|
7
|
-
module
|
7
|
+
module RestApiV6_5
|
8
8
|
def common_params
|
9
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 respone."}}}
|
10
10
|
end
|
@@ -157,7 +157,7 @@ module Antbird
|
|
157
157
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
|
158
158
|
def cat_tasks(params = {})
|
159
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)"}, "
|
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
161
|
request(api_name, api_spec, params)
|
162
162
|
end
|
163
163
|
|
@@ -205,7 +205,7 @@ module Antbird
|
|
205
205
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html
|
206
206
|
def cluster_health(params = {})
|
207
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_status"=>{"type"=>"enum", "options"=>["green", "yellow", "red"], "default"=>nil, "description"=>"Wait until cluster is in a specific state"}}}, "body"=>nil}
|
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
209
|
request(api_name, api_spec, params)
|
210
210
|
end
|
211
211
|
|
@@ -285,7 +285,15 @@ module Antbird
|
|
285
285
|
# https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html
|
286
286
|
def delete_by_query(params = {})
|
287
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
|
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_exclude"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "terminate_after"=>{"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, "stats"=>{"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, "version"=>{"type"=>"boolean", "description"=>"Specify whether to return document version as part of a hit"}, "request_cache"=>{"type"=>"boolean", "description"=>"Specify if request cache should be used for this request or not, defaults to index level setting"}, "refresh"=>{"type"=>"boolean", "description"=>"Should the effected indexes be refreshed?"}, "timeout"=>{"type"=>"time", "default"=>"1m", "description"=>"Time each individual bulk request should wait for shards that are unavailable."}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "scroll_size"=>{"type"=>"number", "defaut_value"=>100, "description"=>"Size on the scroll request powering the 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}
|
289
297
|
request(api_name, api_spec, params)
|
290
298
|
end
|
291
299
|
|
@@ -343,7 +351,7 @@ module Antbird
|
|
343
351
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
|
344
352
|
def get_script(params = {})
|
345
353
|
api_name = 'get_script'
|
346
|
-
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"=>{}}, "body"=>nil}
|
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}
|
347
355
|
request(api_name, api_spec, params)
|
348
356
|
end
|
349
357
|
|
@@ -367,7 +375,7 @@ module Antbird
|
|
367
375
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html
|
368
376
|
def indices_analyze(params = {})
|
369
377
|
api_name = 'indices.analyze'
|
370
|
-
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"}
|
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"}}
|
371
379
|
request(api_name, api_spec, params)
|
372
380
|
end
|
373
381
|
|
@@ -375,7 +383,7 @@ module Antbird
|
|
375
383
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html
|
376
384
|
def indices_clear_cache(params = {})
|
377
385
|
api_name = 'indices.clear_cache'
|
378
|
-
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html", "methods"=>["POST", "GET"], "url"=>{"path"=>"/_cache/clear", "paths"=>["/_cache/clear", "/{index}/_cache/clear"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index name to limit the operation"}}, "params"=>{"field_data"=>{"type"=>"boolean", "description"=>"Clear field data"}, "fielddata"=>{"type"=>"boolean", "description"=>"Clear field data"}, "fields"=>{"type"=>"list", "description"=>"A comma-separated list of fields to clear when using the `
|
386
|
+
api_spec = @api_specs[api_name] ||= {"documentation"=>"http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html", "methods"=>["POST", "GET"], "url"=>{"path"=>"/_cache/clear", "paths"=>["/_cache/clear", "/{index}/_cache/clear"], "parts"=>{"index"=>{"type"=>"list", "description"=>"A comma-separated list of index name to limit the operation"}}, "params"=>{"field_data"=>{"type"=>"boolean", "description"=>"Clear field data. This is deprecated. Prefer `fielddata`."}, "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_cache"=>{"type"=>"boolean", "description"=>"Clear request cache"}, "request"=>{"type"=>"boolean", "description"=>"Clear request cache"}}}, "body"=>nil}
|
379
387
|
request(api_name, api_spec, params)
|
380
388
|
end
|
381
389
|
|
@@ -475,7 +483,7 @@ module Antbird
|
|
475
483
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html
|
476
484
|
def indices_forcemerge(params = {})
|
477
485
|
api_name = 'indices.forcemerge'
|
478
|
-
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"}
|
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}
|
479
487
|
request(api_name, api_spec, params)
|
480
488
|
end
|
481
489
|
|
@@ -483,7 +491,7 @@ module Antbird
|
|
483
491
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html
|
484
492
|
def indices_get(params = {})
|
485
493
|
api_name = 'indices.get'
|
486
|
-
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"=>{"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}
|
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"=>{"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}
|
487
495
|
request(api_name, api_spec, params)
|
488
496
|
end
|
489
497
|
|
@@ -507,7 +515,7 @@ module Antbird
|
|
507
515
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html
|
508
516
|
def indices_get_mapping(params = {})
|
509
517
|
api_name = 'indices.get_mapping'
|
510
|
-
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"=>{"ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "local"=>{"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}}}, "body"=>nil}
|
518
|
+
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"=>{"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}
|
511
519
|
request(api_name, api_spec, params)
|
512
520
|
end
|
513
521
|
|
@@ -515,7 +523,7 @@ module Antbird
|
|
515
523
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html
|
516
524
|
def indices_get_settings(params = {})
|
517
525
|
api_name = 'indices.get_settings'
|
518
|
-
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"=>{"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}
|
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}
|
519
527
|
request(api_name, api_spec, params)
|
520
528
|
end
|
521
529
|
|
@@ -563,7 +571,7 @@ module Antbird
|
|
563
571
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html
|
564
572
|
def indices_put_settings(params = {})
|
565
573
|
api_name = 'indices.put_settings'
|
566
|
-
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"}, "preserve_existing"=>{"type"=>"boolean", "description"=>"Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false`"}, "ignore_unavailable"=>{"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "flat_settings"=>{"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}}}, "body"=>{"description"=>"The index settings to be updated", "required"=>true}}
|
574
|
+
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}}
|
567
575
|
request(api_name, api_spec, params)
|
568
576
|
end
|
569
577
|
|
@@ -603,7 +611,7 @@ module Antbird
|
|
603
611
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html
|
604
612
|
def indices_segments(params = {})
|
605
613
|
api_name = 'indices.segments'
|
606
|
-
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."}, "
|
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}
|
607
615
|
request(api_name, api_spec, params)
|
608
616
|
end
|
609
617
|
|
@@ -611,7 +619,7 @@ module Antbird
|
|
611
619
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html
|
612
620
|
def indices_shard_stores(params = {})
|
613
621
|
api_name = 'indices.shard_stores'
|
614
|
-
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."}
|
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}
|
615
623
|
request(api_name, api_spec, params)
|
616
624
|
end
|
617
625
|
|
@@ -619,7 +627,7 @@ module Antbird
|
|
619
627
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html
|
620
628
|
def indices_shrink(params = {})
|
621
629
|
api_name = 'indices.shrink'
|
622
|
-
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"=>{"timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout"=>{"type"=>"time", "description"=>"Specify timeout for connection to master"}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Set the number of active shards to wait for on the shrunken index before the operation returns."}}}, "body"=>{"description"=>"The configuration for the target index (`settings` and `aliases`)"}}
|
630
|
+
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`)"}}
|
623
631
|
request(api_name, api_spec, params)
|
624
632
|
end
|
625
633
|
|
@@ -627,7 +635,7 @@ module Antbird
|
|
627
635
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html
|
628
636
|
def indices_split(params = {})
|
629
637
|
api_name = 'indices.split'
|
630
|
-
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"=>{"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`)"}}
|
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`)"}}
|
631
639
|
request(api_name, api_spec, params)
|
632
640
|
end
|
633
641
|
|
@@ -659,7 +667,7 @@ module Antbird
|
|
659
667
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html
|
660
668
|
def indices_validate_query(params = {})
|
661
669
|
api_name = 'indices.validate_query'
|
662
|
-
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."}, "
|
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"}}
|
663
671
|
request(api_name, api_spec, params)
|
664
672
|
end
|
665
673
|
|
@@ -723,7 +731,7 @@ module Antbird
|
|
723
731
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html
|
724
732
|
def msearch(params = {})
|
725
733
|
api_name = 'msearch'
|
726
|
-
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}}}, "body"=>{"description"=>"The request definitions (metadata-search request definition pairs), separated by newlines", "required"=>true, "serialize"=>"bulk"}}
|
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."}}}, "body"=>{"description"=>"The request definitions (metadata-search request definition pairs), separated by newlines", "required"=>true, "serialize"=>"bulk"}}
|
727
735
|
request(api_name, api_spec, params)
|
728
736
|
end
|
729
737
|
|
@@ -759,6 +767,14 @@ module Antbird
|
|
759
767
|
request(api_name, api_spec, params)
|
760
768
|
end
|
761
769
|
|
770
|
+
# nodes.reload_secure_settings ["POST"]
|
771
|
+
# https://www.elastic.co/guide/en/elasticsearch/reference/6.5/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/6.5/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
|
+
|
762
778
|
# nodes.stats ["GET"]
|
763
779
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html
|
764
780
|
def nodes_stats(params = {})
|
@@ -771,7 +787,7 @@ module Antbird
|
|
771
787
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html
|
772
788
|
def nodes_usage(params = {})
|
773
789
|
api_name = 'nodes.usage'
|
774
|
-
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"=>{"
|
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}
|
775
791
|
request(api_name, api_spec, params)
|
776
792
|
end
|
777
793
|
|
@@ -792,6 +808,14 @@ module Antbird
|
|
792
808
|
request(api_name, api_spec, params)
|
793
809
|
end
|
794
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
|
+
|
795
819
|
# reindex ["POST"]
|
796
820
|
# https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html
|
797
821
|
def reindex(params = {})
|
@@ -804,7 +828,7 @@ module Antbird
|
|
804
828
|
# https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html
|
805
829
|
def reindex_rethrottle(params = {})
|
806
830
|
api_name = 'reindex_rethrottle'
|
807
|
-
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"
|
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}
|
808
832
|
request(api_name, api_spec, params)
|
809
833
|
end
|
810
834
|
|
@@ -816,6 +840,14 @@ module Antbird
|
|
816
840
|
request(api_name, api_spec, params)
|
817
841
|
end
|
818
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
|
+
|
819
851
|
# scroll ["GET", "POST"]
|
820
852
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html
|
821
853
|
def scroll(params = {})
|
@@ -828,7 +860,7 @@ module Antbird
|
|
828
860
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html
|
829
861
|
def search(params = {})
|
830
862
|
api_name = 'search'
|
831
|
-
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)"}, "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)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "lenient"=>{"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "q"=>{"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, "routing"=>{"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, "scroll"=>{"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, "search_type"=>{"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}, "size"=>{"type"=>"number", "description"=>"Number of hits to return (default: 10)"}, "sort"=>{"type"=>"list", "description"=>"A comma-separated list of <field>:<direction> pairs"}, "_source"=>{"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_exclude"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "terminate_after"=>{"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, "stats"=>{"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, "suggest_field"=>{"type"=>"string", "description"=>"Specify which field to use for suggestions"}, "suggest_mode"=>{"type"=>"enum", "options"=>["missing", "popular", "always"], "default"=>"missing", "description"=>"Specify suggest mode"}, "suggest_size"=>{"type"=>"number", "description"=>"How many suggestions to return in response"}, "suggest_text"=>{"type"=>"string", "description"=>"The source text for which the suggestions should be returned"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "track_scores"=>{"type"=>"boolean", "description"=>"Whether to calculate and return scores even if they are not used for sorting"}, "track_total_hits"=>{"type"=>"boolean", "description"=>"Indicate if the number of documents that match the query should be tracked"}, "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"}, "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 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 grows with the number of nodes in the cluster but is at most 256."}, "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}}}, "body"=>{"description"=>"The search definition using the Query DSL"}}
|
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)"}, "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)"}, "allow_no_indices"=>{"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards"=>{"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "lenient"=>{"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "preference"=>{"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "q"=>{"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, "routing"=>{"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, "scroll"=>{"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, "search_type"=>{"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}, "size"=>{"type"=>"number", "description"=>"Number of hits to return (default: 10)"}, "sort"=>{"type"=>"list", "description"=>"A comma-separated list of <field>:<direction> pairs"}, "_source"=>{"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_exclude"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "terminate_after"=>{"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, "stats"=>{"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, "suggest_field"=>{"type"=>"string", "description"=>"Specify which field to use for suggestions"}, "suggest_mode"=>{"type"=>"enum", "options"=>["missing", "popular", "always"], "default"=>"missing", "description"=>"Specify suggest mode"}, "suggest_size"=>{"type"=>"number", "description"=>"How many suggestions to return in response"}, "suggest_text"=>{"type"=>"string", "description"=>"The source text for which the suggestions should be returned"}, "timeout"=>{"type"=>"time", "description"=>"Explicit operation timeout"}, "track_scores"=>{"type"=>"boolean", "description"=>"Whether to calculate and return scores even if they are not used for sorting"}, "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"}, "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 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 grows with the number of nodes in the cluster but is at most 256."}, "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}}}, "body"=>{"description"=>"The search definition using the Query DSL"}}
|
832
864
|
request(api_name, api_spec, params)
|
833
865
|
end
|
834
866
|
|
@@ -924,7 +956,7 @@ module Antbird
|
|
924
956
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
|
925
957
|
def tasks_cancel(params = {})
|
926
958
|
api_name = 'tasks.cancel'
|
927
|
-
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."}, "
|
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}
|
928
960
|
request(api_name, api_spec, params)
|
929
961
|
end
|
930
962
|
|
@@ -932,7 +964,7 @@ module Antbird
|
|
932
964
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
|
933
965
|
def tasks_get(params = {})
|
934
966
|
api_name = 'tasks.get'
|
935
|
-
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)"}}}, "body"=>nil}
|
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}
|
936
968
|
request(api_name, api_spec, params)
|
937
969
|
end
|
938
970
|
|
@@ -940,7 +972,7 @@ module Antbird
|
|
940
972
|
# http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
|
941
973
|
def tasks_list(params = {})
|
942
974
|
api_name = 'tasks.list'
|
943
|
-
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)"}, "
|
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}
|
944
976
|
request(api_name, api_spec, params)
|
945
977
|
end
|
946
978
|
|
@@ -964,7 +996,15 @@ module Antbird
|
|
964
996
|
# https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html
|
965
997
|
def update_by_query(params = {})
|
966
998
|
api_name = 'update_by_query'
|
967
|
-
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_exclude"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "terminate_after"=>{"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, "stats"=>{"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, "version"=>{"type"=>"boolean", "description"=>"Specify whether to return document version as part of a hit"}, "version_type"=>{"type"=>"boolean", "description"=>"Should the document increment the version number (internal) on hit or not (reindex)"}, "request_cache"=>{"type"=>"boolean", "description"=>"Specify if request cache should be used for this request or not, defaults to index level setting"}, "refresh"=>{"type"=>"boolean", "description"=>"Should the effected indexes be refreshed?"}, "timeout"=>{"type"=>"time", "default"=>"1m", "description"=>"Time each individual bulk request should wait for shards that are unavailable."}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "scroll_size"=>{"type"=>"number", "defaut_value"=>100, "description"=>"Size on the scroll request powering the
|
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_exclude"=>{"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include"=>{"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "terminate_after"=>{"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, "stats"=>{"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, "version"=>{"type"=>"boolean", "description"=>"Specify whether to return document version as part of a hit"}, "version_type"=>{"type"=>"boolean", "description"=>"Should the document increment the version number (internal) on hit or not (reindex)"}, "request_cache"=>{"type"=>"boolean", "description"=>"Specify if request cache should be used for this request or not, defaults to index level setting"}, "refresh"=>{"type"=>"boolean", "description"=>"Should the effected indexes be refreshed?"}, "timeout"=>{"type"=>"time", "default"=>"1m", "description"=>"Time each individual bulk request should wait for shards that are unavailable."}, "wait_for_active_shards"=>{"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "scroll_size"=>{"type"=>"number", "defaut_value"=>100, "description"=>"Size on the scroll request powering the update by query"}, "wait_for_completion"=>{"type"=>"boolean", "default"=>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}
|
968
1008
|
request(api_name, api_spec, params)
|
969
1009
|
end
|
970
1010
|
end
|