elasticsearch-api 1.0.14 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/elasticsearch/api/actions/abort_benchmark.rb +0 -2
- data/lib/elasticsearch/api/actions/cat/segments.rb +2 -0
- data/lib/elasticsearch/api/actions/cat/shards.rb +5 -0
- data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +6 -2
- data/lib/elasticsearch/api/actions/indices/get_warmer.rb +3 -2
- data/lib/elasticsearch/api/actions/indices/seal.rb +0 -2
- data/lib/elasticsearch/api/actions/list_benchmarks.rb +0 -2
- data/lib/elasticsearch/api/version.rb +1 -1
- data/test/integration/yaml_test_runner.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68336ac9575020a4a102cbde2a0157d6f47c6b67
|
4
|
+
data.tar.gz: 50c1630f17dec457ff7068c78d48acfd8884ab2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24d082a7abe1d6a40f9051d4d849d57e4e0efaec7e891a38e237ccc0f6b35ce9c3b606490d14636fdcf483e18bcfe097a75a5bcb1b5e6b96efe79ae809bd7e4a
|
7
|
+
data.tar.gz: 5129cac0908e6f23afe58723a2a6ea6e4cc4d087a5525060b6e6cb028f5d41706336e4d96fec1142684f4fa8f25894864681718b59ca26223fc0c6ce9b787069
|
@@ -13,8 +13,6 @@ module Elasticsearch
|
|
13
13
|
# @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-benchmark.html
|
14
14
|
#
|
15
15
|
def abort_benchmark(arguments={})
|
16
|
-
valid_params = [
|
17
|
-
]
|
18
16
|
method = HTTP_POST
|
19
17
|
path = "_bench/abort/#{arguments[:name]}"
|
20
18
|
params = {}
|
@@ -10,6 +10,7 @@ module Elasticsearch
|
|
10
10
|
# puts client.cat.segments
|
11
11
|
#
|
12
12
|
# @option arguments [List] :index A comma-separated list of index names to limit the returned information
|
13
|
+
# @option arguments [String] :bytes The unit in which to display byte values (options: b, k, m, g)
|
13
14
|
# @option arguments [List] :h Comma-separated list of column names to display
|
14
15
|
# @option arguments [Boolean] :help Return help information
|
15
16
|
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
@@ -18,6 +19,7 @@ module Elasticsearch
|
|
18
19
|
#
|
19
20
|
def segments(arguments={})
|
20
21
|
valid_params = [
|
22
|
+
:bytes,
|
21
23
|
:h,
|
22
24
|
:help,
|
23
25
|
:v ]
|
@@ -21,6 +21,10 @@ module Elasticsearch
|
|
21
21
|
#
|
22
22
|
# puts client.cat.shards v: true
|
23
23
|
#
|
24
|
+
# @example Display shard size in choice of units
|
25
|
+
#
|
26
|
+
# puts client.cat.shards bytes: 'b'
|
27
|
+
#
|
24
28
|
# @example Display only specific columns in the output (see the `help` parameter)
|
25
29
|
#
|
26
30
|
# puts client.cat.shards h: ['node', 'index', 'shard', 'prirep', 'docs', 'store', 'merges.total']
|
@@ -49,6 +53,7 @@ module Elasticsearch
|
|
49
53
|
valid_params = [
|
50
54
|
:local,
|
51
55
|
:master_timeout,
|
56
|
+
:bytes,
|
52
57
|
:h,
|
53
58
|
:help,
|
54
59
|
:v ]
|
@@ -34,7 +34,11 @@ module Elasticsearch
|
|
34
34
|
# @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-get-field-mapping.html
|
35
35
|
#
|
36
36
|
def get_field_mapping(arguments={})
|
37
|
-
|
37
|
+
arguments = arguments.clone
|
38
|
+
|
39
|
+
fields = arguments.delete(:field) || arguments.delete(:fields)
|
40
|
+
raise ArgumentError, "Required argument 'field' missing" unless fields
|
41
|
+
|
38
42
|
valid_params = [
|
39
43
|
:include_defaults,
|
40
44
|
:ignore_indices,
|
@@ -49,7 +53,7 @@ module Elasticsearch
|
|
49
53
|
'_mapping',
|
50
54
|
Utils.__listify(arguments[:type]),
|
51
55
|
'field',
|
52
|
-
Utils.__listify(
|
56
|
+
Utils.__listify(fields)
|
53
57
|
)
|
54
58
|
params = Utils.__validate_and_extract_params arguments, valid_params
|
55
59
|
body = nil
|
@@ -43,12 +43,13 @@ module Elasticsearch
|
|
43
43
|
:ignore_indices,
|
44
44
|
:ignore_unavailable,
|
45
45
|
:allow_no_indices,
|
46
|
-
:expand_wildcards
|
46
|
+
:expand_wildcards,
|
47
|
+
:local
|
47
48
|
]
|
48
49
|
|
49
50
|
method = HTTP_GET
|
50
51
|
path = Utils.__pathify( Utils.__listify(arguments[:index]), '_warmer', Utils.__escape(arguments[:name]) )
|
51
|
-
params =
|
52
|
+
params = Utils.__validate_and_extract_params arguments, valid_params
|
52
53
|
body = nil
|
53
54
|
|
54
55
|
perform_request(method, path, params, body).body
|
@@ -11,8 +11,6 @@ module Elasticsearch
|
|
11
11
|
# @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-seal.html
|
12
12
|
#
|
13
13
|
def seal(arguments={})
|
14
|
-
valid_params = [
|
15
|
-
]
|
16
14
|
method = 'POST'
|
17
15
|
path = Utils.__pathify Utils.__listify(arguments[:index]), '_seal'
|
18
16
|
params = {}
|
@@ -24,7 +24,7 @@ Turn.config.format = :pretty
|
|
24
24
|
# Launch test cluster
|
25
25
|
#
|
26
26
|
if ENV['SERVER'] and not Elasticsearch::Extensions::Test::Cluster.running?
|
27
|
-
es_params = "-D es.repositories.url.allowed_urls=http://snapshot.test* -D es.path.repo=/tmp -D es.node.testattr=test " + ENV['TEST_CLUSTER_PARAMS']
|
27
|
+
es_params = "-D es.repositories.url.allowed_urls=http://snapshot.test* -D es.path.repo=/tmp -D es.node.testattr=test " + ENV['TEST_CLUSTER_PARAMS'].to_s
|
28
28
|
Elasticsearch::Extensions::Test::Cluster.start(nodes: 1, es_params: es_params )
|
29
29
|
end
|
30
30
|
|
@@ -83,7 +83,7 @@ url = ENV.fetch('TEST_CLUSTER_URL', "http://localhost:#{ENV['TEST_CLUSTER_PORT']
|
|
83
83
|
$client ||= Elasticsearch::Client.new url: url
|
84
84
|
|
85
85
|
$client.transport.logger = logger unless ENV['QUIET'] || ENV['CI']
|
86
|
-
$client.transport.tracer = tracer if ENV['CI']
|
86
|
+
# $client.transport.tracer = tracer if ENV['CI']
|
87
87
|
|
88
88
|
# Store Elasticsearch version
|
89
89
|
#
|
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: 1.0.
|
4
|
+
version: 1.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karel Minarik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|