elasticsearch-api 1.1.3 → 2.0.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. data/lib/elasticsearch/api/actions/bulk.rb +1 -1
  2. data/lib/elasticsearch/api/actions/cat/aliases.rb +3 -0
  3. data/lib/elasticsearch/api/actions/cat/allocation.rb +3 -0
  4. data/lib/elasticsearch/api/actions/cat/count.rb +3 -0
  5. data/lib/elasticsearch/api/actions/cat/fielddata.rb +3 -0
  6. data/lib/elasticsearch/api/actions/cat/health.rb +3 -0
  7. data/lib/elasticsearch/api/actions/cat/indices.rb +3 -0
  8. data/lib/elasticsearch/api/actions/cat/master.rb +3 -0
  9. data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +4 -3
  10. data/lib/elasticsearch/api/actions/cat/nodes.rb +3 -0
  11. data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +3 -0
  12. data/lib/elasticsearch/api/actions/cat/plugins.rb +4 -1
  13. data/lib/elasticsearch/api/actions/cat/recovery.rb +3 -0
  14. data/lib/elasticsearch/api/actions/cat/repositories.rb +3 -2
  15. data/lib/elasticsearch/api/actions/cat/segments.rb +4 -1
  16. data/lib/elasticsearch/api/actions/cat/shards.rb +3 -0
  17. data/lib/elasticsearch/api/actions/cat/snapshots.rb +3 -2
  18. data/lib/elasticsearch/api/actions/cat/tasks.rb +3 -1
  19. data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +3 -3
  20. data/lib/elasticsearch/api/actions/delete_by_query.rb +2 -0
  21. data/lib/elasticsearch/api/actions/index.rb +1 -1
  22. data/lib/elasticsearch/api/actions/indices/analyze.rb +0 -3
  23. data/lib/elasticsearch/api/actions/indices/create.rb +0 -3
  24. data/lib/elasticsearch/api/actions/indices/forcemerge.rb +0 -2
  25. data/lib/elasticsearch/api/actions/indices/get.rb +3 -0
  26. data/lib/elasticsearch/api/actions/indices/get_settings.rb +3 -0
  27. data/lib/elasticsearch/api/actions/indices/put_mapping.rb +0 -3
  28. data/lib/elasticsearch/api/actions/indices/put_settings.rb +1 -1
  29. data/lib/elasticsearch/api/actions/indices/segments.rb +0 -3
  30. data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +3 -1
  31. data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +3 -1
  32. data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +3 -1
  33. data/lib/elasticsearch/api/actions/ingest/simulate.rb +4 -3
  34. data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +0 -3
  35. data/lib/elasticsearch/api/actions/nodes/info.rb +2 -4
  36. data/lib/elasticsearch/api/actions/nodes/stats.rb +0 -3
  37. data/lib/elasticsearch/api/actions/percolate.rb +0 -3
  38. data/lib/elasticsearch/api/actions/ping.rb +1 -1
  39. data/lib/elasticsearch/api/actions/put_template.rb +0 -2
  40. data/lib/elasticsearch/api/actions/reindex.rb +1 -4
  41. data/lib/elasticsearch/api/actions/render_search_template.rb +4 -5
  42. data/lib/elasticsearch/api/actions/search.rb +0 -3
  43. data/lib/elasticsearch/api/actions/tasks/cancel.rb +2 -3
  44. data/lib/elasticsearch/api/actions/tasks/list.rb +5 -3
  45. data/lib/elasticsearch/api/actions/termvectors.rb +0 -2
  46. data/lib/elasticsearch/api/actions/update_by_query.rb +3 -0
  47. data/lib/elasticsearch/api/utils.rb +6 -6
  48. data/lib/elasticsearch/api/version.rb +1 -1
  49. data/test/integration/yaml_test_runner.rb +1 -2
  50. metadata +242 -330
  51. checksums.yaml +0 -7
@@ -64,7 +64,7 @@ module Elasticsearch
64
64
  def bulk(arguments={})
65
65
  arguments = arguments.clone
66
66
 
67
- type = arguments.delete(:type)
67
+ type = arguments.delete(:type)
68
68
 
69
69
  valid_params = [
70
70
  :consistency,
@@ -48,6 +48,9 @@ module Elasticsearch
48
48
  :help,
49
49
  :v ]
50
50
 
51
+ unsupported_params = [ :format ]
52
+ Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
53
+
51
54
  name = arguments.delete(:name)
52
55
 
53
56
  method = HTTP_GET
@@ -50,6 +50,9 @@ module Elasticsearch
50
50
  :help,
51
51
  :v ]
52
52
 
53
+ unsupported_params = [ :format ]
54
+ Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
55
+
53
56
  node_id = arguments.delete(:node_id)
54
57
 
55
58
  method = HTTP_GET
@@ -44,6 +44,9 @@ module Elasticsearch
44
44
  :help,
45
45
  :v ]
46
46
 
47
+ unsupported_params = [ :format ]
48
+ Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
49
+
47
50
  index = arguments.delete(:index)
48
51
 
49
52
  method = HTTP_GET
@@ -34,6 +34,9 @@ module Elasticsearch
34
34
  :v,
35
35
  :fields ]
36
36
 
37
+ unsupported_params = [ :format ]
38
+ Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
39
+
37
40
  fields = arguments.delete(:fields)
38
41
 
39
42
  method = HTTP_GET
@@ -37,6 +37,9 @@ module Elasticsearch
37
37
  :ts,
38
38
  :v ]
39
39
 
40
+ unsupported_params = [ :format ]
41
+ Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
42
+
40
43
  method = HTTP_GET
41
44
  path = "_cat/health"
42
45
  params = Utils.__validate_and_extract_params arguments, valid_params
@@ -58,6 +58,9 @@ module Elasticsearch
58
58
  :pri,
59
59
  :v ]
60
60
 
61
+ unsupported_params = [ :format ]
62
+ Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
63
+
61
64
  index = arguments.delete(:index)
62
65
 
63
66
  method = HTTP_GET
@@ -35,6 +35,9 @@ module Elasticsearch
35
35
  :help,
36
36
  :v ]
37
37
 
38
+ unsupported_params = [ :format ]
39
+ Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
40
+
38
41
  method = HTTP_GET
39
42
  path = "_cat/master"
40
43
  params = Utils.__validate_and_extract_params arguments, valid_params
@@ -14,8 +14,6 @@ module Elasticsearch
14
14
  # @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html
15
15
  #
16
16
  def nodeattrs(arguments={})
17
- Utils.__report_unsupported_method(__method__)
18
-
19
17
  valid_params = [
20
18
  :local,
21
19
  :master_timeout,
@@ -23,7 +21,10 @@ module Elasticsearch
23
21
  :help,
24
22
  :v ]
25
23
 
26
- method = 'GET'
24
+ unsupported_params = [ :format ]
25
+ Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
26
+
27
+ method = HTTP_GET
27
28
  path = "_cat/nodeattrs"
28
29
  params = Utils.__validate_and_extract_params arguments, valid_params
29
30
  body = nil
@@ -43,6 +43,9 @@ module Elasticsearch
43
43
  :help,
44
44
  :v ]
45
45
 
46
+ unsupported_params = [ :format ]
47
+ Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
48
+
46
49
  method = HTTP_GET
47
50
  path = "_cat/nodes"
48
51
 
@@ -35,6 +35,9 @@ module Elasticsearch
35
35
  :help,
36
36
  :v ]
37
37
 
38
+ unsupported_params = [ :format ]
39
+ Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
40
+
38
41
  method = HTTP_GET
39
42
  path = "_cat/pending_tasks"
40
43
  params = Utils.__validate_and_extract_params arguments, valid_params
@@ -22,7 +22,10 @@ module Elasticsearch
22
22
  :help,
23
23
  :v ]
24
24
 
25
- method = 'GET'
25
+ unsupported_params = [ :format ]
26
+ Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
27
+
28
+ method = HTTP_GET
26
29
  path = "_cat/plugins"
27
30
  params = Utils.__validate_and_extract_params arguments, valid_params
28
31
  body = nil
@@ -54,6 +54,9 @@ module Elasticsearch
54
54
  :help,
55
55
  :v ]
56
56
 
57
+ unsupported_params = [ :format ]
58
+ Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
59
+
57
60
  index = arguments.delete(:index)
58
61
 
59
62
  method = HTTP_GET
@@ -21,14 +21,15 @@ module Elasticsearch
21
21
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-repositories.html
22
22
  #
23
23
  def repositories(arguments={})
24
- Utils.__report_unsupported_method(__method__)
25
-
26
24
  valid_params = [
27
25
  :master_timeout,
28
26
  :h,
29
27
  :help,
30
28
  :v ]
31
29
 
30
+ unsupported_params = [ :format ]
31
+ Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
32
+
32
33
  method = HTTP_GET
33
34
  path = "_cat/repositories"
34
35
  params = Utils.__validate_and_extract_params arguments, valid_params
@@ -24,7 +24,10 @@ module Elasticsearch
24
24
  :help,
25
25
  :v ]
26
26
 
27
- method = 'GET'
27
+ unsupported_params = [ :format ]
28
+ Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
29
+
30
+ method = HTTP_GET
28
31
  path = "_cat/segments"
29
32
  params = Utils.__validate_and_extract_params arguments, valid_params
30
33
  body = nil
@@ -58,6 +58,9 @@ module Elasticsearch
58
58
  :help,
59
59
  :v ]
60
60
 
61
+ unsupported_params = [ :format ]
62
+ Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
63
+
61
64
  index = arguments.delete(:index)
62
65
 
63
66
  method = HTTP_GET
@@ -21,8 +21,6 @@ module Elasticsearch
21
21
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-snapshots.html
22
22
  #
23
23
  def snapshots(arguments={})
24
- Utils.__report_unsupported_method(__method__)
25
-
26
24
  raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
27
25
 
28
26
  valid_params = [
@@ -31,6 +29,9 @@ module Elasticsearch
31
29
  :help,
32
30
  :v ]
33
31
 
32
+ unsupported_params = [ :format ]
33
+ Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
34
+
34
35
  repository = arguments.delete(:repository)
35
36
 
36
37
  method = HTTP_GET
@@ -30,7 +30,9 @@ module Elasticsearch
30
30
  :h,
31
31
  :help,
32
32
  :v ]
33
- method = 'GET'
33
+
34
+ method = HTTP_GET
35
+
34
36
  path = "_cat/tasks"
35
37
  params = Utils.__validate_and_extract_params arguments, valid_params
36
38
  body = nil
@@ -13,9 +13,9 @@ module Elasticsearch
13
13
  def allocation_explain(arguments={})
14
14
  Utils.__report_unsupported_method(__method__)
15
15
 
16
- valid_params = [
17
- :include_yes_decisions ]
18
- method = 'GET'
16
+ valid_params = [ :include_yes_decisions ]
17
+
18
+ method = HTTP_GET
19
19
  path = "_cluster/allocation/explain"
20
20
  params = Utils.__validate_and_extract_params arguments, valid_params
21
21
  body = arguments[:body]
@@ -43,6 +43,8 @@ module Elasticsearch
43
43
  # @see http://www.elasticsearch.org/guide/reference/api/delete-by-query/
44
44
  #
45
45
  def delete_by_query(arguments={})
46
+ Utils.__report_unsupported_method(__method__)
47
+
46
48
  raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
47
49
 
48
50
  valid_params = [
@@ -90,7 +90,7 @@ module Elasticsearch
90
90
  :version_type ]
91
91
 
92
92
  unsupported_params = [ :pipeline ]
93
- Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
93
+ Utils.__report_unsupported_parameters(arguments, unsupported_params)
94
94
 
95
95
  method = arguments[:id] ? HTTP_PUT : HTTP_POST
96
96
  path = Utils.__pathify Utils.__escape(arguments[:index]),
@@ -64,9 +64,6 @@ module Elasticsearch
64
64
  :token_filters,
65
65
  :format ]
66
66
 
67
- unsupported_params = [ :explain, :attributes ]
68
- Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
69
-
70
67
  method = HTTP_GET
71
68
  path = Utils.__pathify Utils.__listify(arguments[:index]), '_analyze'
72
69
 
@@ -75,9 +75,6 @@ module Elasticsearch
75
75
  :update_all_types
76
76
  ]
77
77
 
78
- unsupported_params = [ :update_all_types ]
79
- Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
80
-
81
78
  method = HTTP_PUT
82
79
  path = Utils.__pathify Utils.__escape(arguments[:index])
83
80
 
@@ -42,8 +42,6 @@ module Elasticsearch
42
42
  # @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html
43
43
  #
44
44
  def forcemerge(arguments={})
45
- Utils.__report_unsupported_method(__method__)
46
-
47
45
  valid_params = [
48
46
  :max_num_segments,
49
47
  :only_expunge_deletes,
@@ -35,6 +35,9 @@ module Elasticsearch
35
35
  :human,
36
36
  :include_defaults ]
37
37
 
38
+ unsupported_params = [ :include_defaults ]
39
+ Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
40
+
38
41
  method = HTTP_GET
39
42
 
40
43
  path = Utils.__pathify Utils.__listify(arguments[:index]), Utils.__listify(arguments.delete(:feature))
@@ -53,6 +53,9 @@ module Elasticsearch
53
53
  :local
54
54
  ]
55
55
 
56
+ unsupported_params = [ :include_defaults ]
57
+ Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
58
+
56
59
  method = HTTP_GET
57
60
  path = Utils.__pathify Utils.__listify(arguments[:index]),
58
61
  Utils.__listify(arguments[:type]),
@@ -62,9 +62,6 @@ module Elasticsearch
62
62
  :timeout
63
63
  ]
64
64
 
65
- unsupported_params = [ :update_all_types ]
66
- Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
67
-
68
65
  method = HTTP_PUT
69
66
  path = Utils.__pathify Utils.__listify(arguments[:index]), '_mapping', Utils.__escape(arguments[:type])
70
67
 
@@ -59,7 +59,7 @@ module Elasticsearch
59
59
  :flat_settings
60
60
  ]
61
61
 
62
- unsupported_params = [ :update_all_types ]
62
+ unsupported_params = [ :preserve_existing ]
63
63
  Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
64
64
 
65
65
  method = HTTP_PUT
@@ -32,9 +32,6 @@ module Elasticsearch
32
32
  :verbose
33
33
  ]
34
34
 
35
- unsupported_params = [ :verbose ]
36
- Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
37
-
38
35
  method = HTTP_GET
39
36
  path = Utils.__pathify Utils.__listify(arguments[:index]), '_segments'
40
37
 
@@ -15,10 +15,12 @@ module Elasticsearch
15
15
  Utils.__report_unsupported_method(__method__)
16
16
 
17
17
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
18
+
18
19
  valid_params = [
19
20
  :master_timeout,
20
21
  :timeout ]
21
- method = 'DELETE'
22
+
23
+ method = HTTP_DELETE
22
24
  path = Utils.__pathify "_ingest/pipeline", Utils.__escape(arguments[:id])
23
25
  params = Utils.__validate_and_extract_params arguments, valid_params
24
26
  body = nil
@@ -14,9 +14,11 @@ module Elasticsearch
14
14
  Utils.__report_unsupported_method(__method__)
15
15
 
16
16
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
17
+
17
18
  valid_params = [
18
19
  :master_timeout ]
19
- method = 'GET'
20
+
21
+ method = HTTP_GET
20
22
  path = Utils.__pathify "_ingest/pipeline", Utils.__escape(arguments[:id])
21
23
  params = Utils.__validate_and_extract_params arguments, valid_params
22
24
  body = nil
@@ -17,10 +17,12 @@ module Elasticsearch
17
17
 
18
18
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
19
19
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
20
+
20
21
  valid_params = [
21
22
  :master_timeout,
22
23
  :timeout ]
23
- method = 'PUT'
24
+
25
+ method = HTTP_PUT
24
26
  path = Utils.__pathify "_ingest/pipeline", Utils.__escape(arguments[:id])
25
27
 
26
28
  params = Utils.__validate_and_extract_params arguments, valid_params
@@ -16,9 +16,10 @@ module Elasticsearch
16
16
  Utils.__report_unsupported_method(__method__)
17
17
 
18
18
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
19
- valid_params = [
20
- :verbose ]
21
- method = 'GET'
19
+
20
+ valid_params = [ :verbose ]
21
+
22
+ method = HTTP_GET
22
23
  path = Utils.__pathify "_ingest/pipeline", Utils.__escape(arguments[:id]), '_simulate'
23
24
  params = Utils.__validate_and_extract_params arguments, valid_params
24
25
  body = arguments[:body]
@@ -34,9 +34,6 @@ module Elasticsearch
34
34
  :type,
35
35
  :timeout ]
36
36
 
37
- unsupported_params = [ :timeout ]
38
- Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
39
-
40
37
  method = HTTP_GET
41
38
  path = Utils.__pathify '_nodes', Utils.__listify(arguments[:node_id]), 'hot_threads'
42
39
 
@@ -53,13 +53,11 @@ module Elasticsearch
53
53
  :process,
54
54
  :settings,
55
55
  :thread_pool,
56
- :transport ]
56
+ :transport,
57
+ :timeout ]
57
58
 
58
59
  valid_params = [ :timeout ]
59
60
 
60
- unsupported_params = [ :timeout ]
61
- Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
62
-
63
61
  method = HTTP_GET
64
62
 
65
63
  if metric
@@ -57,9 +57,6 @@ module Elasticsearch
57
57
  :types,
58
58
  :timeout ]
59
59
 
60
- unsupported_params = [ :timeout ]
61
- Utils.__report_unsupported_parameters(arguments.keys, unsupported_params)
62
-
63
60
  method = HTTP_GET
64
61
 
65
62
  path = Utils.__pathify '_nodes',