elasticsearch-api 6.2.0 → 6.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/elasticsearch/api/actions/abort_benchmark.rb +1 -1
- data/lib/elasticsearch/api/actions/benchmark.rb +1 -1
- data/lib/elasticsearch/api/actions/bulk.rb +4 -6
- data/lib/elasticsearch/api/actions/cat/aliases.rb +10 -10
- data/lib/elasticsearch/api/actions/cat/allocation.rb +11 -11
- data/lib/elasticsearch/api/actions/cat/count.rb +10 -10
- data/lib/elasticsearch/api/actions/cat/fielddata.rb +9 -7
- data/lib/elasticsearch/api/actions/cat/health.rb +11 -11
- data/lib/elasticsearch/api/actions/cat/help.rb +4 -2
- data/lib/elasticsearch/api/actions/cat/indices.rb +14 -15
- data/lib/elasticsearch/api/actions/cat/master.rb +10 -10
- data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/nodes.rb +10 -10
- data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +10 -10
- data/lib/elasticsearch/api/actions/cat/plugins.rb +7 -6
- data/lib/elasticsearch/api/actions/cat/recovery.rb +10 -12
- data/lib/elasticsearch/api/actions/cat/repositories.rb +7 -3
- data/lib/elasticsearch/api/actions/cat/segments.rb +9 -7
- data/lib/elasticsearch/api/actions/cat/shards.rb +12 -12
- data/lib/elasticsearch/api/actions/cat/snapshots.rb +8 -4
- data/lib/elasticsearch/api/actions/cat/tasks.rb +4 -6
- data/lib/elasticsearch/api/actions/cat/templates.rb +6 -6
- data/lib/elasticsearch/api/actions/cat/thread_pool.rb +13 -17
- data/lib/elasticsearch/api/actions/clear_scroll.rb +7 -0
- data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +2 -3
- data/lib/elasticsearch/api/actions/cluster/get_settings.rb +5 -2
- data/lib/elasticsearch/api/actions/cluster/health.rb +11 -20
- data/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +2 -3
- data/lib/elasticsearch/api/actions/cluster/put_settings.rb +8 -3
- data/lib/elasticsearch/api/actions/cluster/remote_info.rb +7 -1
- data/lib/elasticsearch/api/actions/cluster/reroute.rb +7 -7
- data/lib/elasticsearch/api/actions/cluster/state.rb +18 -15
- data/lib/elasticsearch/api/actions/cluster/stats.rb +12 -5
- data/lib/elasticsearch/api/actions/count.rb +12 -23
- data/lib/elasticsearch/api/actions/count_percolate.rb +1 -1
- data/lib/elasticsearch/api/actions/delete.rb +16 -8
- data/lib/elasticsearch/api/actions/delete_by_query.rb +7 -9
- data/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +29 -0
- data/lib/elasticsearch/api/actions/delete_script.rb +5 -6
- data/lib/elasticsearch/api/actions/exists.rb +3 -4
- data/lib/elasticsearch/api/actions/exists_source.rb +51 -0
- data/lib/elasticsearch/api/actions/explain.rb +11 -25
- data/lib/elasticsearch/api/actions/field_caps.rb +2 -2
- data/lib/elasticsearch/api/actions/get.rb +13 -19
- data/lib/elasticsearch/api/actions/get_script.rb +9 -2
- data/lib/elasticsearch/api/actions/get_source.rb +10 -14
- data/lib/elasticsearch/api/actions/index.rb +10 -16
- data/lib/elasticsearch/api/actions/indices/analyze.rb +3 -27
- data/lib/elasticsearch/api/actions/indices/clear_cache.rb +2 -4
- data/lib/elasticsearch/api/actions/indices/close.rb +9 -15
- data/lib/elasticsearch/api/actions/indices/create.rb +7 -7
- data/lib/elasticsearch/api/actions/indices/delete.rb +3 -4
- data/lib/elasticsearch/api/actions/indices/delete_alias.rb +7 -4
- data/lib/elasticsearch/api/actions/indices/delete_template.rb +5 -2
- data/lib/elasticsearch/api/actions/indices/exists.rb +11 -17
- data/lib/elasticsearch/api/actions/indices/exists_alias.rb +6 -14
- data/lib/elasticsearch/api/actions/indices/exists_template.rb +8 -4
- data/lib/elasticsearch/api/actions/indices/exists_type.rb +6 -15
- data/lib/elasticsearch/api/actions/indices/flush.rb +5 -9
- data/lib/elasticsearch/api/actions/indices/flush_synced.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/forcemerge.rb +13 -11
- data/lib/elasticsearch/api/actions/indices/freeze.rb +0 -1
- data/lib/elasticsearch/api/actions/indices/get.rb +9 -15
- data/lib/elasticsearch/api/actions/indices/get_alias.rb +6 -14
- data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +11 -15
- data/lib/elasticsearch/api/actions/indices/get_mapping.rb +12 -16
- data/lib/elasticsearch/api/actions/indices/get_settings.rb +12 -21
- data/lib/elasticsearch/api/actions/indices/get_template.rb +8 -5
- data/lib/elasticsearch/api/actions/indices/open.rb +9 -15
- data/lib/elasticsearch/api/actions/indices/put_alias.rb +6 -3
- data/lib/elasticsearch/api/actions/indices/put_mapping.rb +11 -23
- data/lib/elasticsearch/api/actions/indices/put_settings.rb +10 -20
- data/lib/elasticsearch/api/actions/indices/put_template.rb +10 -5
- data/lib/elasticsearch/api/actions/indices/recovery.rb +2 -4
- data/lib/elasticsearch/api/actions/indices/refresh.rb +6 -14
- data/lib/elasticsearch/api/actions/indices/rollover.rb +6 -5
- data/lib/elasticsearch/api/actions/indices/segments.rb +6 -14
- data/lib/elasticsearch/api/actions/indices/shard_stores.rb +2 -4
- data/lib/elasticsearch/api/actions/indices/shrink.rb +6 -7
- data/lib/elasticsearch/api/actions/indices/split.rb +2 -1
- data/lib/elasticsearch/api/actions/indices/update_aliases.rb +7 -4
- data/lib/elasticsearch/api/actions/indices/upgrade.rb +10 -13
- data/lib/elasticsearch/api/actions/indices/validate_query.rb +14 -25
- data/lib/elasticsearch/api/actions/info.rb +6 -0
- data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +1 -1
- data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +4 -3
- data/lib/elasticsearch/api/actions/ingest/processor_grok.rb +29 -0
- data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +1 -1
- data/lib/elasticsearch/api/actions/ingest/simulate.rb +5 -5
- data/lib/elasticsearch/api/actions/mget.rb +8 -17
- data/lib/elasticsearch/api/actions/msearch.rb +7 -2
- data/lib/elasticsearch/api/actions/msearch_template.rb +8 -1
- data/lib/elasticsearch/api/actions/mtermvectors.rb +21 -22
- data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +4 -6
- data/lib/elasticsearch/api/actions/nodes/info.rb +6 -26
- data/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +10 -4
- data/lib/elasticsearch/api/actions/nodes/stats.rb +11 -30
- data/lib/elasticsearch/api/actions/nodes/usage.rb +31 -0
- data/lib/elasticsearch/api/actions/ping.rb +6 -0
- data/lib/elasticsearch/api/actions/put_script.rb +10 -9
- data/lib/elasticsearch/api/actions/rank_eval.rb +36 -0
- data/lib/elasticsearch/api/actions/reindex.rb +9 -14
- data/lib/elasticsearch/api/actions/reindex_rethrottle.rb +29 -0
- data/lib/elasticsearch/api/actions/render_search_template.rb +1 -1
- data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +27 -0
- data/lib/elasticsearch/api/actions/scroll.rb +3 -2
- data/lib/elasticsearch/api/actions/search.rb +36 -53
- data/lib/elasticsearch/api/actions/search_shards.rb +7 -14
- data/lib/elasticsearch/api/actions/search_template.rb +20 -19
- data/lib/elasticsearch/api/actions/snapshot/create.rb +2 -3
- data/lib/elasticsearch/api/actions/snapshot/create_repository.rb +4 -3
- data/lib/elasticsearch/api/actions/snapshot/delete.rb +3 -3
- data/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +1 -2
- data/lib/elasticsearch/api/actions/snapshot/get.rb +3 -3
- data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +3 -6
- data/lib/elasticsearch/api/actions/snapshot/restore.rb +1 -1
- data/lib/elasticsearch/api/actions/snapshot/status.rb +4 -5
- data/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +1 -2
- data/lib/elasticsearch/api/actions/tasks/cancel.rb +7 -13
- data/lib/elasticsearch/api/actions/tasks/get.rb +6 -3
- data/lib/elasticsearch/api/actions/tasks/list.rb +10 -16
- data/lib/elasticsearch/api/actions/termvectors.rb +22 -21
- data/lib/elasticsearch/api/actions/update.rb +19 -33
- data/lib/elasticsearch/api/actions/update_by_query.rb +13 -33
- data/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +29 -0
- data/lib/elasticsearch/api/version.rb +1 -1
- data/spec/elasticsearch/api/actions/cluster/state_spec.rb +0 -17
- data/spec/elasticsearch/api/actions/cluster/stats_spec.rb +17 -0
- data/spec/elasticsearch/api/actions/indices/analyze_spec.rb +0 -37
- data/spec/elasticsearch/api/actions/indices/put_settings_spec.rb +0 -15
- data/spec/elasticsearch/api/actions/indices/refresh_spec.rb +0 -15
- data/spec/elasticsearch/api/actions/indices/segments_spec.rb +0 -15
- data/spec/elasticsearch/api/actions/mget_spec.rb +0 -15
- data/spec/elasticsearch/api/actions/mlt_spec.rb +127 -114
- data/spec/elasticsearch/api/actions/search_exists_spec.rb +58 -12
- data/spec/elasticsearch/api/actions/search_spec.rb +0 -15
- data/test/integration/yaml_test_runner.rb +2 -4
- data/utils/thor/generate_source.rb +1 -0
- data/utils/thor/templates/ruby/method.erb +7 -5
- metadata +12 -10
- data/spec/elasticsearch/api/actions/indices/freeze_spec.rb +0 -68
- data/spec/elasticsearch/api/actions/indices/stats_spec.rb +0 -108
- data/spec/elasticsearch/api/actions/indices/unfreeze_spec.rb +0 -68
@@ -42,8 +42,9 @@ module Elasticsearch
|
|
42
42
|
#
|
43
43
|
# @option arguments [String] :scroll_id The scroll ID
|
44
44
|
# @option arguments [Hash] :body The scroll ID if not passed by URL or query parameter.
|
45
|
-
# @option arguments [
|
46
|
-
#
|
45
|
+
# @option arguments [Time] :scroll Specify how long a consistent view of the index should be maintained for scrolled search
|
46
|
+
# @option arguments [String] :scroll_id The scroll ID for scrolled search
|
47
|
+
# @option arguments [Boolean] :rest_total_hits_as_int This parameter is ignored in this version. It is used in the next major version to control whether the rest response should render the total.hits as an object or a number
|
47
48
|
#
|
48
49
|
# @see http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/scan-scroll.html#scan-scroll
|
49
50
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html
|
@@ -62,62 +62,50 @@ module Elasticsearch
|
|
62
62
|
#
|
63
63
|
# response.aggregations.tags.terms.to_a.map { |f| "#{f.term} [#{f.count}]" }.join(', ')
|
64
64
|
#
|
65
|
-
#
|
66
|
-
#
|
67
|
-
# @option arguments [List] :type A comma-separated list of document types to search;
|
68
|
-
# leave empty to perform the operation on all types
|
65
|
+
#
|
66
|
+
# @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
|
67
|
+
# @option arguments [List] :type A comma-separated list of document types to search; leave empty to perform the operation on all types
|
69
68
|
# @option arguments [Hash] :body The search definition using the Query DSL
|
70
69
|
# @option arguments [String] :analyzer The analyzer to use for the query string
|
71
|
-
# @option arguments [Boolean] :analyze_wildcard Specify whether wildcard and prefix queries should be analyzed
|
72
|
-
#
|
73
|
-
# @option arguments [String] :default_operator The default operator for query string query (AND or OR)
|
74
|
-
# (options: AND, OR)
|
70
|
+
# @option arguments [Boolean] :analyze_wildcard Specify whether wildcard and prefix queries should be analyzed (default: false)
|
71
|
+
# @option arguments [String] :default_operator The default operator for query string query (AND or OR) (options: AND, OR)
|
75
72
|
# @option arguments [String] :df The field to use as default where no field prefix is given in the query string
|
76
|
-
# @option arguments [Boolean] :explain Specify whether to return detailed information about score computation
|
77
|
-
# as part of a hit
|
78
|
-
# @option arguments [List] :fields A comma-separated list of fields to return as part of a hit
|
79
|
-
# @option arguments [List] :fielddata_fields A comma-separated list of fields to return as the field data
|
80
|
-
# representation of a field for each hit
|
81
|
-
# @option arguments [List] :docvalue_fields A comma-separated list of fields to return as the docvalue
|
82
|
-
# representation of a field for each hit
|
73
|
+
# @option arguments [Boolean] :explain Specify whether to return detailed information about score computation as part of a hit
|
83
74
|
# @option arguments [List] :stored_fields A comma-separated list of stored fields to return as part of a hit
|
75
|
+
# @option arguments [List] :docvalue_fields A comma-separated list of fields to return as the docvalue representation of a field for each hit
|
84
76
|
# @option arguments [Number] :from Starting offset (default: 0)
|
85
|
-
# @option arguments [
|
86
|
-
#
|
87
|
-
# @option arguments [Boolean] :
|
88
|
-
#
|
89
|
-
# @option arguments [Boolean] :
|
90
|
-
# @option arguments [String] :preference Specify the node or shard the operation should be performed on
|
91
|
-
# (default: random)
|
77
|
+
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
78
|
+
# @option arguments [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indices should be ignored when throttled
|
79
|
+
# @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
80
|
+
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, none, all)
|
81
|
+
# @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
|
82
|
+
# @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
|
92
83
|
# @option arguments [String] :q Query in the Lucene query string syntax
|
93
|
-
# @option arguments [Boolean] :request_cache Specify if request cache should be used for this request
|
94
|
-
# (defaults to index level setting)
|
95
84
|
# @option arguments [List] :routing A comma-separated list of specific routing values
|
96
|
-
# @option arguments [
|
97
|
-
#
|
98
|
-
# @option arguments [String] :search_type Search operation type (options: query_then_fetch, query_and_fetch,
|
99
|
-
# dfs_query_then_fetch, dfs_query_and_fetch, count, scan)
|
85
|
+
# @option arguments [Time] :scroll Specify how long a consistent view of the index should be maintained for scrolled search
|
86
|
+
# @option arguments [String] :search_type Search operation type (options: query_then_fetch, dfs_query_then_fetch)
|
100
87
|
# @option arguments [Number] :size Number of hits to return (default: 10)
|
101
88
|
# @option arguments [List] :sort A comma-separated list of <field>:<direction> pairs
|
102
|
-
# @option arguments [
|
103
|
-
#
|
104
|
-
# @option arguments [
|
105
|
-
#
|
106
|
-
# @option arguments [String] :_source_exclude A list of fields to exclude from the returned _source field
|
107
|
-
# @option arguments [String] :_source_include A list of fields to extract and return from the _source field
|
108
|
-
# @option arguments [List] :stored_fields A comma-separated list of stored fields to return in the response
|
89
|
+
# @option arguments [List] :_source True or false to return the _source field or not, or a list of fields to return
|
90
|
+
# @option arguments [List] :_source_excludes A list of fields to exclude from the returned _source field
|
91
|
+
# @option arguments [List] :_source_includes A list of fields to extract and return from the _source field
|
92
|
+
# @option arguments [Number] :terminate_after The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
|
109
93
|
# @option arguments [List] :stats Specific 'tag' of the request for logging and statistical purposes
|
110
94
|
# @option arguments [String] :suggest_field Specify which field to use for suggestions
|
111
95
|
# @option arguments [String] :suggest_mode Specify suggest mode (options: missing, popular, always)
|
112
96
|
# @option arguments [Number] :suggest_size How many suggestions to return in response
|
113
|
-
# @option arguments [
|
114
|
-
# @option arguments [Number] :terminate_after The maximum number of documents to collect for each shard
|
97
|
+
# @option arguments [String] :suggest_text The source text for which the suggestions should be returned
|
115
98
|
# @option arguments [Time] :timeout Explicit operation timeout
|
99
|
+
# @option arguments [Boolean] :track_scores Whether to calculate and return scores even if they are not used for sorting
|
100
|
+
# @option arguments [Boolean] :track_total_hits Indicate if the number of documents that match the query should be tracked
|
101
|
+
# @option arguments [Boolean] :allow_partial_search_results Indicate if an error should be returned if there is a partial search failure or timeout
|
116
102
|
# @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response
|
117
103
|
# @option arguments [Boolean] :version Specify whether to return document version as part of a hit
|
104
|
+
# @option arguments [Boolean] :request_cache Specify if request cache should be used for this request or not, defaults to index level setting
|
118
105
|
# @option arguments [Number] :batched_reduce_size 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.
|
119
|
-
# @option arguments [Number] :max_concurrent_shard_requests 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
|
120
|
-
# @option arguments [Number] :pre_filter_shard_size 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.
|
106
|
+
# @option arguments [Number] :max_concurrent_shard_requests 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
|
107
|
+
# @option arguments [Number] :pre_filter_shard_size 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.
|
108
|
+
# @option arguments [Boolean] :rest_total_hits_as_int This parameter is ignored in this version. It is used in the next major version to control whether the rest response should render the total.hits as an object or a number
|
121
109
|
#
|
122
110
|
# @return [Hash]
|
123
111
|
#
|
@@ -151,47 +139,42 @@ module Elasticsearch
|
|
151
139
|
:default_operator,
|
152
140
|
:df,
|
153
141
|
:explain,
|
154
|
-
:fielddata_fields,
|
155
|
-
:docvalue_fields,
|
156
142
|
:stored_fields,
|
157
|
-
:
|
143
|
+
:docvalue_fields,
|
158
144
|
:from,
|
159
|
-
:ignore_indices,
|
160
145
|
:ignore_unavailable,
|
146
|
+
:ignore_throttled,
|
161
147
|
:allow_no_indices,
|
162
148
|
:expand_wildcards,
|
163
149
|
:lenient,
|
164
|
-
:lowercase_expanded_terms,
|
165
150
|
:preference,
|
166
151
|
:q,
|
167
|
-
:query_cache,
|
168
|
-
:request_cache,
|
169
152
|
:routing,
|
170
153
|
:scroll,
|
171
154
|
:search_type,
|
172
155
|
:size,
|
173
156
|
:sort,
|
174
|
-
:source,
|
175
157
|
:_source,
|
176
|
-
:_source_include,
|
177
|
-
:_source_includes,
|
178
|
-
:_source_exclude,
|
179
158
|
:_source_excludes,
|
180
|
-
:
|
159
|
+
:_source_includes,
|
160
|
+
:terminate_after,
|
181
161
|
:stats,
|
182
162
|
:suggest_field,
|
183
163
|
:suggest_mode,
|
184
164
|
:suggest_size,
|
185
165
|
:suggest_text,
|
186
|
-
:terminate_after,
|
187
166
|
:timeout,
|
167
|
+
:track_scores,
|
168
|
+
:track_total_hits,
|
169
|
+
:allow_partial_search_results,
|
188
170
|
:typed_keys,
|
189
171
|
:version,
|
172
|
+
:request_cache,
|
190
173
|
:batched_reduce_size,
|
191
174
|
:max_concurrent_shard_requests,
|
192
175
|
:pre_filter_shard_size,
|
193
176
|
:rest_total_hits_as_int,
|
194
|
-
:
|
177
|
+
:seq_no_primary_term ].freeze)
|
195
178
|
end
|
196
179
|
end
|
197
180
|
end
|
@@ -4,22 +4,15 @@ module Elasticsearch
|
|
4
4
|
|
5
5
|
# Returns the names of indices and shards on which a search request would be executed
|
6
6
|
#
|
7
|
-
# @option arguments [
|
8
|
-
# @option arguments [String] :
|
9
|
-
# @option arguments [String] :preference Specify the node or shard the operation should be performed on
|
10
|
-
# (default: random)
|
7
|
+
# @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
|
8
|
+
# @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
|
11
9
|
# @option arguments [String] :routing Specific routing value
|
12
|
-
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
|
13
|
-
#
|
14
|
-
# @option arguments [Boolean] :
|
15
|
-
#
|
16
|
-
# @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves
|
17
|
-
# into no concrete indices.
|
18
|
-
# (This includes `_all` or when no indices have been specified)
|
19
|
-
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices
|
20
|
-
# that are open, closed or both. (options: open, closed)
|
10
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
|
11
|
+
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
12
|
+
# @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
13
|
+
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, none, all)
|
21
14
|
#
|
22
|
-
# @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/
|
15
|
+
# @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-shards.html
|
23
16
|
#
|
24
17
|
def search_shards(arguments={})
|
25
18
|
method = HTTP_GET
|
@@ -18,25 +18,21 @@ module Elasticsearch
|
|
18
18
|
# params: { start: "2014-02-01", end: "2014-03-01" }
|
19
19
|
# }
|
20
20
|
#
|
21
|
-
# @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty
|
22
|
-
#
|
23
|
-
# @option arguments [
|
24
|
-
#
|
25
|
-
# @option arguments [
|
26
|
-
# @option arguments [Boolean] :
|
27
|
-
#
|
28
|
-
# @option arguments [
|
29
|
-
# no concrete indices. (This includes `_all` string or when no
|
30
|
-
# indices have been specified)
|
31
|
-
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices
|
32
|
-
# that are open, closed or both. (options: open, closed)
|
33
|
-
# @option arguments [String] :preference Specify the node or shard the operation should be performed on
|
34
|
-
# (default: random)
|
21
|
+
# @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
|
22
|
+
# @option arguments [List] :type A comma-separated list of document types to search; leave empty to perform the operation on all types
|
23
|
+
# @option arguments [Hash] :body The search definition template and its params (*Required*)
|
24
|
+
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
25
|
+
# @option arguments [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indices should be ignored when throttled
|
26
|
+
# @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
27
|
+
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, none, all)
|
28
|
+
# @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
|
35
29
|
# @option arguments [List] :routing A comma-separated list of specific routing values
|
36
|
-
# @option arguments [
|
37
|
-
#
|
38
|
-
# @option arguments [
|
39
|
-
#
|
30
|
+
# @option arguments [Time] :scroll Specify how long a consistent view of the index should be maintained for scrolled search
|
31
|
+
# @option arguments [String] :search_type Search operation type (options: query_then_fetch, query_and_fetch, dfs_query_then_fetch, dfs_query_and_fetch)
|
32
|
+
# @option arguments [Boolean] :explain Specify whether to return detailed information about score computation as part of a hit
|
33
|
+
# @option arguments [Boolean] :profile Specify whether to profile the query execution
|
34
|
+
# @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response
|
35
|
+
# @option arguments [Boolean] :rest_total_hits_as_int This parameter is ignored in this version. It is used in the next major version to control whether the rest response should render the total.hits as an object or a number
|
40
36
|
#
|
41
37
|
# @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-template.html
|
42
38
|
#
|
@@ -54,12 +50,17 @@ module Elasticsearch
|
|
54
50
|
# @since 6.2.0
|
55
51
|
ParamsRegistry.register(:search_template, [
|
56
52
|
:ignore_unavailable,
|
53
|
+
:ignore_throttled,
|
57
54
|
:allow_no_indices,
|
58
55
|
:expand_wildcards,
|
59
56
|
:preference,
|
60
57
|
:routing,
|
61
58
|
:scroll,
|
62
|
-
:search_type
|
59
|
+
:search_type,
|
60
|
+
:explain,
|
61
|
+
:profile,
|
62
|
+
:typed_keys,
|
63
|
+
:rest_total_hits_as_int ].freeze)
|
63
64
|
end
|
64
65
|
end
|
65
66
|
end
|
@@ -19,10 +19,9 @@ module Elasticsearch
|
|
19
19
|
# @option arguments [String] :snapshot A snapshot name (*Required*)
|
20
20
|
# @option arguments [Hash] :body The snapshot definition
|
21
21
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
22
|
-
# @option arguments [Boolean] :wait_for_completion
|
23
|
-
# the operation has completed
|
22
|
+
# @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before returning
|
24
23
|
#
|
25
|
-
# @see http://www.
|
24
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
|
26
25
|
#
|
27
26
|
def create(arguments={})
|
28
27
|
raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
|
@@ -17,8 +17,9 @@ module Elasticsearch
|
|
17
17
|
# @option arguments [Hash] :body The repository definition (*Required*)
|
18
18
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
19
19
|
# @option arguments [Time] :timeout Explicit operation timeout
|
20
|
+
# @option arguments [Boolean] :verify Whether to verify the repository after creation
|
20
21
|
#
|
21
|
-
# @see http://www.
|
22
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
|
22
23
|
#
|
23
24
|
def create_repository(arguments={})
|
24
25
|
raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
|
@@ -38,9 +39,9 @@ module Elasticsearch
|
|
38
39
|
#
|
39
40
|
# @since 6.2.0
|
40
41
|
ParamsRegistry.register(:create_repository, [
|
41
|
-
:repository,
|
42
42
|
:master_timeout,
|
43
|
-
:timeout
|
43
|
+
:timeout,
|
44
|
+
:verify ].freeze)
|
44
45
|
end
|
45
46
|
end
|
46
47
|
end
|
@@ -14,9 +14,8 @@ module Elasticsearch
|
|
14
14
|
# @option arguments [String] :repository A repository name (*Required*)
|
15
15
|
# @option arguments [String] :snapshot A snapshot name (*Required*)
|
16
16
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
17
|
-
# @option arguments [Number,List] :ignore The list of HTTP errors to ignore
|
18
17
|
#
|
19
|
-
# @see http://www.
|
18
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
|
20
19
|
#
|
21
20
|
def delete(arguments={})
|
22
21
|
raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
|
@@ -40,7 +39,8 @@ module Elasticsearch
|
|
40
39
|
# Register this action with its valid params when the module is loaded.
|
41
40
|
#
|
42
41
|
# @since 6.2.0
|
43
|
-
ParamsRegistry.register(:delete, [
|
42
|
+
ParamsRegistry.register(:delete, [
|
43
|
+
:master_timeout ].freeze)
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
@@ -12,9 +12,8 @@ module Elasticsearch
|
|
12
12
|
# @option arguments [List] :repository A comma-separated list of repository names (*Required*)
|
13
13
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
14
14
|
# @option arguments [Time] :timeout Explicit operation timeout
|
15
|
-
# @option arguments [Number,List] :ignore The list of HTTP errors to ignore
|
16
15
|
#
|
17
|
-
# @see http://www.
|
16
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
|
18
17
|
#
|
19
18
|
def delete_repository(arguments={})
|
20
19
|
raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
|
@@ -19,11 +19,11 @@ module Elasticsearch
|
|
19
19
|
#
|
20
20
|
# @option arguments [String] :repository A repository name (*Required*)
|
21
21
|
# @option arguments [List] :snapshot A comma-separated list of snapshot names (*Required*)
|
22
|
-
# @option arguments [Boolean] :ignore_unavailable Whether to ignore unavailable snapshots, defaults to # false which means a SnapshotMissingException is thrown
|
23
22
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
23
|
+
# @option arguments [Boolean] :ignore_unavailable Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
|
24
24
|
# @option arguments [Boolean] :verbose Whether to show verbose snapshot info or only show the basic info found in the repository index blob
|
25
25
|
#
|
26
|
-
# @see http://www.
|
26
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
|
27
27
|
#
|
28
28
|
def get(arguments={})
|
29
29
|
raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
|
@@ -48,8 +48,8 @@ module Elasticsearch
|
|
48
48
|
#
|
49
49
|
# @since 6.2.0
|
50
50
|
ParamsRegistry.register(:get, [
|
51
|
-
:ignore_unavailable,
|
52
51
|
:master_timeout,
|
52
|
+
:ignore_unavailable,
|
53
53
|
:verbose ].freeze)
|
54
54
|
end
|
55
55
|
end
|
@@ -13,14 +13,11 @@ module Elasticsearch
|
|
13
13
|
#
|
14
14
|
# client.snapshot.get_repository repository: 'my-backups'
|
15
15
|
#
|
16
|
-
# @option arguments [List] :repository A comma-separated list of repository names
|
17
|
-
# to get a list of repositories
|
16
|
+
# @option arguments [List] :repository A comma-separated list of repository names
|
18
17
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
19
|
-
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
|
20
|
-
# (default: false)
|
21
|
-
# @option arguments [Number,List] :ignore The list of HTTP errors to ignore
|
18
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
|
22
19
|
#
|
23
|
-
# @see http://www.
|
20
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
|
24
21
|
#
|
25
22
|
def get_repository(arguments={})
|
26
23
|
repository = arguments.delete(:repository)
|
@@ -26,7 +26,7 @@ module Elasticsearch
|
|
26
26
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
27
27
|
# @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before returning
|
28
28
|
#
|
29
|
-
# @see http://www.
|
29
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
|
30
30
|
#
|
31
31
|
def restore(arguments={})
|
32
32
|
raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
|
@@ -15,11 +15,10 @@ module Elasticsearch
|
|
15
15
|
#
|
16
16
|
# @option arguments [String] :repository A repository name
|
17
17
|
# @option arguments [List] :snapshot A comma-separated list of snapshot names
|
18
|
-
# @option arguments [Boolean] :ignore_unavailable Whether to ignore unavailable snapshots, defaults to # false which means a SnapshotMissingException is thrown
|
19
18
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
20
|
-
# @option arguments [
|
19
|
+
# @option arguments [Boolean] :ignore_unavailable Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
|
21
20
|
#
|
22
|
-
# @see http://www.
|
21
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
|
23
22
|
#
|
24
23
|
def status(arguments={})
|
25
24
|
repository = arguments.delete(:repository)
|
@@ -42,8 +41,8 @@ module Elasticsearch
|
|
42
41
|
#
|
43
42
|
# @since 6.2.0
|
44
43
|
ParamsRegistry.register(:status, [
|
45
|
-
:
|
46
|
-
:
|
44
|
+
:master_timeout,
|
45
|
+
:ignore_unavailable ].freeze)
|
47
46
|
end
|
48
47
|
end
|
49
48
|
end
|
@@ -9,7 +9,7 @@ module Elasticsearch
|
|
9
9
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
10
10
|
# @option arguments [Time] :timeout Explicit operation timeout
|
11
11
|
#
|
12
|
-
# @see http://www.
|
12
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
|
13
13
|
#
|
14
14
|
def verify_repository(arguments={})
|
15
15
|
raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
|
@@ -26,7 +26,6 @@ module Elasticsearch
|
|
26
26
|
#
|
27
27
|
# @since 6.2.0
|
28
28
|
ParamsRegistry.register(:verify_repository, [
|
29
|
-
:repository,
|
30
29
|
:master_timeout,
|
31
30
|
:timeout ].freeze)
|
32
31
|
end
|
@@ -5,17 +5,12 @@ module Elasticsearch
|
|
5
5
|
|
6
6
|
# Cancel a specific task
|
7
7
|
#
|
8
|
-
# @option arguments [
|
9
|
-
# @option arguments [List] :
|
10
|
-
#
|
11
|
-
#
|
12
|
-
# @option arguments [List] :actions A comma-separated list of actions that should be returned.
|
13
|
-
# Leave empty to return all.
|
14
|
-
# @option arguments [String] :parent_node Cancel tasks with specified parent node.
|
15
|
-
# @option arguments [Number] :parent_task Cancel tasks with specified parent task id.
|
16
|
-
# Set to -1 to cancel all.
|
8
|
+
# @option arguments [String] :task_id Cancel the task with specified task id (node_id:task_number)
|
9
|
+
# @option arguments [List] :nodes 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
|
10
|
+
# @option arguments [List] :actions A comma-separated list of actions that should be cancelled. Leave empty to cancel all.
|
11
|
+
# @option arguments [String] :parent_task_id Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all.
|
17
12
|
#
|
18
|
-
# @see http://www.elastic.co/guide/en/elasticsearch/reference/
|
13
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html
|
19
14
|
#
|
20
15
|
def cancel(arguments={})
|
21
16
|
arguments = arguments.clone
|
@@ -33,10 +28,9 @@ module Elasticsearch
|
|
33
28
|
#
|
34
29
|
# @since 6.2.0
|
35
30
|
ParamsRegistry.register(:cancel, [
|
36
|
-
:
|
31
|
+
:nodes,
|
37
32
|
:actions,
|
38
|
-
:
|
39
|
-
:parent_task ].freeze)
|
33
|
+
:parent_task_id ].freeze)
|
40
34
|
end
|
41
35
|
end
|
42
36
|
end
|
@@ -5,10 +5,11 @@ module Elasticsearch
|
|
5
5
|
|
6
6
|
# Return information about a specific task
|
7
7
|
#
|
8
|
-
# @option arguments [String] :task_id Return the task with specified id (node_id:task_number)
|
8
|
+
# @option arguments [String] :task_id Return the task with specified id (node_id:task_number) (*Required*)
|
9
9
|
# @option arguments [Boolean] :wait_for_completion Wait for the matching tasks to complete (default: false)
|
10
|
+
# @option arguments [Time] :timeout Explicit operation timeout
|
10
11
|
#
|
11
|
-
# @see http://www.elastic.co/guide/en/elasticsearch/reference/
|
12
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html
|
12
13
|
#
|
13
14
|
def get(arguments={})
|
14
15
|
arguments = arguments.clone
|
@@ -24,7 +25,9 @@ module Elasticsearch
|
|
24
25
|
# Register this action with its valid params when the module is loaded.
|
25
26
|
#
|
26
27
|
# @since 6.2.0
|
27
|
-
ParamsRegistry.register(:get, [
|
28
|
+
ParamsRegistry.register(:get, [
|
29
|
+
:wait_for_completion,
|
30
|
+
:timeout ].freeze)
|
28
31
|
end
|
29
32
|
end
|
30
33
|
end
|
@@ -5,21 +5,15 @@ module Elasticsearch
|
|
5
5
|
|
6
6
|
# Return the list of tasks
|
7
7
|
#
|
8
|
-
# @option arguments [
|
9
|
-
# @option arguments [List] :
|
10
|
-
# information; use `_local` to return information from the node
|
11
|
-
# you're connecting to, leave empty to get information from all nodes
|
12
|
-
# @option arguments [List] :actions A comma-separated list of actions that should be returned.
|
13
|
-
# Leave empty to return all.
|
8
|
+
# @option arguments [List] :nodes 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
|
9
|
+
# @option arguments [List] :actions A comma-separated list of actions that should be returned. Leave empty to return all.
|
14
10
|
# @option arguments [Boolean] :detailed Return detailed task information (default: false)
|
15
|
-
# @option arguments [String] :
|
16
|
-
# @option arguments [Number] :parent_task Return tasks with specified parent task id.
|
17
|
-
# Set to -1 to return all.
|
18
|
-
# @option arguments [String] :group_by Group tasks by nodes or parent/child relationships
|
19
|
-
# Options: nodes, parents
|
11
|
+
# @option arguments [String] :parent_task_id Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all.
|
20
12
|
# @option arguments [Boolean] :wait_for_completion Wait for the matching tasks to complete (default: false)
|
13
|
+
# @option arguments [String] :group_by Group tasks by nodes or parent/child relationships (options: nodes, parents, none)
|
14
|
+
# @option arguments [Time] :timeout Explicit operation timeout
|
21
15
|
#
|
22
|
-
# @see http://www.elastic.co/guide/en/elasticsearch/reference/
|
16
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html
|
23
17
|
#
|
24
18
|
def list(arguments={})
|
25
19
|
arguments = arguments.clone
|
@@ -37,13 +31,13 @@ module Elasticsearch
|
|
37
31
|
#
|
38
32
|
# @since 6.2.0
|
39
33
|
ParamsRegistry.register(:list, [
|
40
|
-
:
|
34
|
+
:nodes,
|
41
35
|
:actions,
|
42
36
|
:detailed,
|
43
|
-
:
|
44
|
-
:
|
37
|
+
:parent_task_id,
|
38
|
+
:wait_for_completion,
|
45
39
|
:group_by,
|
46
|
-
:
|
40
|
+
:timeout ].freeze)
|
47
41
|
end
|
48
42
|
end
|
49
43
|
end
|
@@ -36,26 +36,25 @@ module Elasticsearch
|
|
36
36
|
# }
|
37
37
|
# # => { ..., "term_vectors" => { "text" => { "field_statistics" => { ... }, "terms" => { "bar" => ... } } }
|
38
38
|
#
|
39
|
-
# @option arguments [String] :index The name of the index (*Required*)
|
40
|
-
# @option arguments [String] :type The type of the document (*Required*)
|
41
|
-
# @option arguments [String] :id The document ID
|
42
|
-
# @option arguments [Hash] :body The request definition
|
43
|
-
# @option arguments [Boolean] :term_statistics Whether total term frequency and
|
44
|
-
# document frequency should be returned
|
45
|
-
# @option arguments [Boolean] :field_statistics Whether document count, sum of document frequencies
|
46
|
-
# and sum of total term frequencies should be returned
|
47
|
-
# @option arguments [List] :fields A comma-separated list of fields to return
|
48
|
-
# @option arguments [Boolean] :offsets Whether term offsets should be returned
|
49
|
-
# @option arguments [Boolean] :positions Whether term positions should be returned
|
50
|
-
# @option arguments [Boolean] :payloads Whether term payloads should be returned
|
51
|
-
# @option arguments [String] :preference Specify the node or shard the operation should be performed on
|
52
|
-
# (default: random)
|
53
|
-
# @option arguments [String] :realtime Specifies if requests are real-time as opposed to near-real-time
|
54
|
-
# (default: true)
|
55
|
-
# @option arguments [String] :routing Specific routing value
|
56
|
-
# @option arguments [String] :parent Parent ID of the documents
|
57
39
|
#
|
58
|
-
# @
|
40
|
+
# @option arguments [String] :index The index in which the document resides. (*Required*)
|
41
|
+
# @option arguments [String] :type The type of the document. (*Required*)
|
42
|
+
# @option arguments [String] :id The id of the document, when not specified a doc param should be supplied.
|
43
|
+
# @option arguments [Hash] :body Define parameters and or supply a document to get termvectors for. See documentation.
|
44
|
+
# @option arguments [Boolean] :term_statistics Specifies if total term frequency and document frequency should be returned.
|
45
|
+
# @option arguments [Boolean] :field_statistics Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
|
46
|
+
# @option arguments [List] :fields A comma-separated list of fields to return.
|
47
|
+
# @option arguments [Boolean] :offsets Specifies if term offsets should be returned.
|
48
|
+
# @option arguments [Boolean] :positions Specifies if term positions should be returned.
|
49
|
+
# @option arguments [Boolean] :payloads Specifies if term payloads should be returned.
|
50
|
+
# @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random).
|
51
|
+
# @option arguments [String] :routing Specific routing value.
|
52
|
+
# @option arguments [String] :parent Parent id of documents.
|
53
|
+
# @option arguments [Boolean] :realtime Specifies if request is real-time as opposed to near-real-time (default: true).
|
54
|
+
# @option arguments [Number] :version Explicit version number for concurrency control
|
55
|
+
# @option arguments [String] :version_type Specific version type (options: internal, external, external_gte, force)
|
56
|
+
#
|
57
|
+
# @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-termvectors.html
|
59
58
|
#
|
60
59
|
def termvectors(arguments={})
|
61
60
|
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
@@ -91,9 +90,11 @@ module Elasticsearch
|
|
91
90
|
:positions,
|
92
91
|
:payloads,
|
93
92
|
:preference,
|
94
|
-
:realtime,
|
95
93
|
:routing,
|
96
|
-
:parent
|
94
|
+
:parent,
|
95
|
+
:realtime,
|
96
|
+
:version,
|
97
|
+
:version_type ].freeze)
|
97
98
|
end
|
98
99
|
end
|
99
100
|
end
|