elasticsearch-api 2.0.0 → 2.0.1
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/cat/aliases.rb +0 -3
- data/lib/elasticsearch/api/actions/cat/allocation.rb +0 -3
- data/lib/elasticsearch/api/actions/cat/count.rb +0 -3
- data/lib/elasticsearch/api/actions/cat/fielddata.rb +0 -3
- data/lib/elasticsearch/api/actions/cat/health.rb +0 -3
- data/lib/elasticsearch/api/actions/cat/indices.rb +0 -3
- data/lib/elasticsearch/api/actions/cat/master.rb +0 -3
- data/lib/elasticsearch/api/actions/cat/nodes.rb +0 -3
- data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +0 -3
- data/lib/elasticsearch/api/actions/cat/plugins.rb +0 -3
- data/lib/elasticsearch/api/actions/cat/recovery.rb +0 -3
- data/lib/elasticsearch/api/actions/cat/segments.rb +0 -3
- data/lib/elasticsearch/api/actions/cat/shards.rb +0 -3
- data/lib/elasticsearch/api/actions/indices/validate_query.rb +5 -1
- data/lib/elasticsearch/api/actions/ping.rb +1 -1
- data/lib/elasticsearch/api/actions/scroll.rb +9 -3
- data/lib/elasticsearch/api/utils.rb +6 -6
- data/lib/elasticsearch/api/version.rb +1 -1
- data/test/integration/yaml_test_runner.rb +2 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3768e622d02b04ed6d2f34897589f64b16a353c7
|
4
|
+
data.tar.gz: 3e26771c0bf181965151263cfa62f5fd3ab30324
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de3b63d3e1f60333d4c95b6ab0c45b2963ab04075a0ba8f83250a4331d16592e9732bbe993f5b98230c24bb1bf36abf9c596f9999891e6c7751bf7ca213f0fee
|
7
|
+
data.tar.gz: 1f15eec971262a774e988126bb90ef36676d8b8f16d4a22251c24b80c8eca78dd530de6ce758b226fc3f8a5d3a5431deee46f6deeb4bf2ddab3485426a409d27
|
@@ -37,9 +37,6 @@ module Elasticsearch
|
|
37
37
|
:ts,
|
38
38
|
:v ]
|
39
39
|
|
40
|
-
unsupported_params = [ :format ]
|
41
|
-
Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
|
42
|
-
|
43
40
|
method = HTTP_GET
|
44
41
|
path = "_cat/health"
|
45
42
|
params = Utils.__validate_and_extract_params arguments, valid_params
|
@@ -35,9 +35,6 @@ module Elasticsearch
|
|
35
35
|
:help,
|
36
36
|
:v ]
|
37
37
|
|
38
|
-
unsupported_params = [ :format ]
|
39
|
-
Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
|
40
|
-
|
41
38
|
method = HTTP_GET
|
42
39
|
path = "_cat/master"
|
43
40
|
params = Utils.__validate_and_extract_params arguments, valid_params
|
@@ -35,9 +35,6 @@ module Elasticsearch
|
|
35
35
|
:help,
|
36
36
|
:v ]
|
37
37
|
|
38
|
-
unsupported_params = [ :format ]
|
39
|
-
Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
|
40
|
-
|
41
38
|
method = HTTP_GET
|
42
39
|
path = "_cat/pending_tasks"
|
43
40
|
params = Utils.__validate_and_extract_params arguments, valid_params
|
@@ -22,9 +22,6 @@ module Elasticsearch
|
|
22
22
|
:help,
|
23
23
|
:v ]
|
24
24
|
|
25
|
-
unsupported_params = [ :format ]
|
26
|
-
Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
|
27
|
-
|
28
25
|
method = HTTP_GET
|
29
26
|
path = "_cat/plugins"
|
30
27
|
params = Utils.__validate_and_extract_params arguments, valid_params
|
@@ -24,9 +24,6 @@ module Elasticsearch
|
|
24
24
|
:help,
|
25
25
|
:v ]
|
26
26
|
|
27
|
-
unsupported_params = [ :format ]
|
28
|
-
Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
|
29
|
-
|
30
27
|
method = HTTP_GET
|
31
28
|
path = "_cat/segments"
|
32
29
|
params = Utils.__validate_and_extract_params arguments, valid_params
|
@@ -13,9 +13,12 @@ module Elasticsearch
|
|
13
13
|
#
|
14
14
|
# client.indices.validate_query index: 'myindex', q: '[[[ BOOM! ]]]', explain: true
|
15
15
|
#
|
16
|
-
# @example Validate a DSL query (with explanation)
|
16
|
+
# @example Validate a DSL query (with explanation and rewrite). With rewrite set to true, the
|
17
|
+
# explanation is more detailed showing the actual Lucene query that will
|
18
|
+
# be executed.
|
17
19
|
#
|
18
20
|
# client.indices.validate_query index: 'myindex',
|
21
|
+
# rewrite: true,
|
19
22
|
# explain: true,
|
20
23
|
# body: {
|
21
24
|
# filtered: {
|
@@ -64,6 +67,7 @@ module Elasticsearch
|
|
64
67
|
#
|
65
68
|
def validate_query(arguments={})
|
66
69
|
valid_params = [
|
70
|
+
:rewrite,
|
67
71
|
:explain,
|
68
72
|
:ignore_unavailable,
|
69
73
|
:allow_no_indices,
|
@@ -7,7 +7,8 @@ module Elasticsearch
|
|
7
7
|
# When using `from` and `size` to return a large result sets, performance drops as you "paginate" in the set,
|
8
8
|
# and you can't guarantee the consistency when the index is being updated at the same time.
|
9
9
|
#
|
10
|
-
# "
|
10
|
+
# The "Scroll" API uses a "point in time" snapshot of the index state, which was created via a "Search" API
|
11
|
+
# request specifying the `scroll` parameter.
|
11
12
|
#
|
12
13
|
# @example A basic example
|
13
14
|
#
|
@@ -24,8 +25,13 @@ module Elasticsearch
|
|
24
25
|
# 1_000.times do |i| client.index index: 'test', type: 'test', id: i+1, body: {title: "Test #{i}"} end
|
25
26
|
# client.indices.refresh index: 'test'
|
26
27
|
#
|
27
|
-
# # Open the "view" of the index
|
28
|
-
#
|
28
|
+
# # Open the "view" of the index by passing the `scroll` parameter
|
29
|
+
# # Sorting by `_doc` makes the operations faster
|
30
|
+
# r = client.search index: 'test', scroll: '1m', body: {sort: ['_doc']}
|
31
|
+
#
|
32
|
+
# # Display the initial results
|
33
|
+
# puts "--- BATCH 0 -------------------------------------------------"
|
34
|
+
# puts r['hits']['hits'].map { |d| d['_source']['title'] }.inspect
|
29
35
|
#
|
30
36
|
# # Call the `scroll` API until empty results are returned
|
31
37
|
# while r = client.scroll(scroll_id: r['_scroll_id'], scroll: '5m') and not r['hits']['hits'].empty? do
|
@@ -235,7 +235,7 @@ module Elasticsearch
|
|
235
235
|
end
|
236
236
|
|
237
237
|
unless messages.empty?
|
238
|
-
if
|
238
|
+
if STDERR.tty?
|
239
239
|
STDERR.puts messages.map { |m| "\e[31;1m#{m}\e[0m" }.join("\n")
|
240
240
|
else
|
241
241
|
STDERR.puts messages.join("\n")
|
@@ -251,11 +251,11 @@ module Elasticsearch
|
|
251
251
|
|
252
252
|
message += ". This method is not supported in the version you're using: #{Elasticsearch::API::VERSION}, and will be removed in the next release."
|
253
253
|
|
254
|
-
if
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
254
|
+
if STDERR.tty?
|
255
|
+
STDERR.puts "\e[31;1m#{message}\e[0m"
|
256
|
+
else
|
257
|
+
STDERR.puts message
|
258
|
+
end
|
259
259
|
end
|
260
260
|
|
261
261
|
extend self
|
@@ -258,7 +258,8 @@ module Elasticsearch
|
|
258
258
|
|
259
259
|
# Skip features
|
260
260
|
elsif skip && skip['skip']['features']
|
261
|
-
|
261
|
+
skip_features = skip['skip']['features'].respond_to?(:split) ? skip['skip']['features'].split(',') : skip['skip']['features']
|
262
|
+
if ( skip_features & SKIP_FEATURES.split(',') ).size > 0
|
262
263
|
return skip['skip']['features']
|
263
264
|
end
|
264
265
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticsearch-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karel Minarik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -795,4 +795,3 @@ test_files:
|
|
795
795
|
- test/unit/update_by_query_test.rb
|
796
796
|
- test/unit/update_document_test.rb
|
797
797
|
- test/unit/utils_test.rb
|
798
|
-
has_rdoc:
|