opensearch-api 1.0.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/.gitignore +1 -0
  4. data/CHANGELOG.md +28 -0
  5. data/Gemfile +2 -2
  6. data/README.md +12 -182
  7. data/Rakefile +5 -5
  8. data/USER_GUIDE.md +155 -0
  9. data/lib/opensearch/api/actions/benchmark.rb +0 -1
  10. data/lib/opensearch/api/actions/bulk.rb +1 -7
  11. data/lib/opensearch/api/actions/cat/all_pit_segments.rb +46 -0
  12. data/lib/opensearch/api/actions/cat/allocation.rb +4 -2
  13. data/lib/opensearch/api/actions/cat/cluster_manager.rb +54 -0
  14. data/lib/opensearch/api/actions/cat/indices.rb +4 -2
  15. data/lib/opensearch/api/actions/cat/master.rb +3 -1
  16. data/lib/opensearch/api/actions/cat/nodeattrs.rb +4 -2
  17. data/lib/opensearch/api/actions/cat/nodes.rb +4 -2
  18. data/lib/opensearch/api/actions/cat/pending_tasks.rb +4 -2
  19. data/lib/opensearch/api/actions/cat/pit_segments.rb +49 -0
  20. data/lib/opensearch/api/actions/cat/plugins.rb +4 -2
  21. data/lib/opensearch/api/actions/cat/repositories.rb +4 -2
  22. data/lib/opensearch/api/actions/cat/shards.rb +4 -2
  23. data/lib/opensearch/api/actions/cat/snapshots.rb +3 -1
  24. data/lib/opensearch/api/actions/cat/templates.rb +4 -2
  25. data/lib/opensearch/api/actions/cat/thread_pool.rb +4 -2
  26. data/lib/opensearch/api/actions/cluster/delete_component_template.rb +4 -2
  27. data/lib/opensearch/api/actions/cluster/exists_component_template.rb +4 -2
  28. data/lib/opensearch/api/actions/cluster/get_component_template.rb +4 -2
  29. data/lib/opensearch/api/actions/cluster/get_settings.rb +3 -1
  30. data/lib/opensearch/api/actions/cluster/health.rb +4 -2
  31. data/lib/opensearch/api/actions/cluster/pending_tasks.rb +5 -3
  32. data/lib/opensearch/api/actions/cluster/put_component_template.rb +4 -2
  33. data/lib/opensearch/api/actions/cluster/put_settings.rb +3 -1
  34. data/lib/opensearch/api/actions/cluster/reroute.rb +4 -2
  35. data/lib/opensearch/api/actions/cluster/state.rb +4 -2
  36. data/lib/opensearch/api/actions/count.rb +1 -6
  37. data/lib/opensearch/api/actions/create.rb +0 -1
  38. data/lib/opensearch/api/actions/create_pit.rb +45 -0
  39. data/lib/opensearch/api/actions/dangling_indices/delete_dangling_index.rb +4 -2
  40. data/lib/opensearch/api/actions/dangling_indices/import_dangling_index.rb +4 -2
  41. data/lib/opensearch/api/actions/delete.rb +1 -8
  42. data/lib/opensearch/api/actions/delete_all_pits.rb +26 -0
  43. data/lib/opensearch/api/actions/delete_by_query.rb +1 -8
  44. data/lib/opensearch/api/actions/delete_pit.rb +30 -0
  45. data/lib/opensearch/api/actions/delete_script.rb +4 -2
  46. data/lib/opensearch/api/actions/exists.rb +1 -8
  47. data/lib/opensearch/api/actions/exists_source.rb +1 -8
  48. data/lib/opensearch/api/actions/explain.rb +1 -8
  49. data/lib/opensearch/api/actions/features/get_features.rb +4 -2
  50. data/lib/opensearch/api/actions/get.rb +1 -8
  51. data/lib/opensearch/api/actions/get_all_pits.rb +26 -0
  52. data/lib/opensearch/api/actions/get_script.rb +4 -2
  53. data/lib/opensearch/api/actions/get_source.rb +1 -8
  54. data/lib/opensearch/api/actions/index.rb +1 -8
  55. data/lib/opensearch/api/actions/indices/add_block.rb +3 -1
  56. data/lib/opensearch/api/actions/indices/clone.rb +3 -1
  57. data/lib/opensearch/api/actions/indices/close.rb +3 -1
  58. data/lib/opensearch/api/actions/indices/create.rb +4 -4
  59. data/lib/opensearch/api/actions/indices/delete.rb +3 -1
  60. data/lib/opensearch/api/actions/indices/delete_alias.rb +4 -2
  61. data/lib/opensearch/api/actions/indices/delete_index_template.rb +4 -2
  62. data/lib/opensearch/api/actions/indices/delete_template.rb +4 -2
  63. data/lib/opensearch/api/actions/indices/exists_index_template.rb +4 -2
  64. data/lib/opensearch/api/actions/indices/exists_template.rb +4 -2
  65. data/lib/opensearch/api/actions/indices/get.rb +4 -4
  66. data/lib/opensearch/api/actions/indices/get_field_mapping.rb +1 -10
  67. data/lib/opensearch/api/actions/indices/get_index_template.rb +4 -2
  68. data/lib/opensearch/api/actions/indices/get_mapping.rb +5 -12
  69. data/lib/opensearch/api/actions/indices/get_settings.rb +3 -1
  70. data/lib/opensearch/api/actions/indices/get_template.rb +4 -4
  71. data/lib/opensearch/api/actions/indices/open.rb +3 -1
  72. data/lib/opensearch/api/actions/indices/put_alias.rb +4 -2
  73. data/lib/opensearch/api/actions/indices/put_index_template.rb +4 -2
  74. data/lib/opensearch/api/actions/indices/put_mapping.rb +4 -13
  75. data/lib/opensearch/api/actions/indices/put_settings.rb +3 -1
  76. data/lib/opensearch/api/actions/indices/put_template.rb +4 -4
  77. data/lib/opensearch/api/actions/indices/rollover.rb +3 -3
  78. data/lib/opensearch/api/actions/indices/shrink.rb +3 -1
  79. data/lib/opensearch/api/actions/indices/simulate_index_template.rb +4 -2
  80. data/lib/opensearch/api/actions/indices/simulate_template.rb +4 -2
  81. data/lib/opensearch/api/actions/indices/split.rb +3 -1
  82. data/lib/opensearch/api/actions/indices/update_aliases.rb +4 -2
  83. data/lib/opensearch/api/actions/indices/validate_query.rb +1 -6
  84. data/lib/opensearch/api/actions/ingest/delete_pipeline.rb +3 -1
  85. data/lib/opensearch/api/actions/ingest/get_pipeline.rb +4 -2
  86. data/lib/opensearch/api/actions/ingest/put_pipeline.rb +3 -1
  87. data/lib/opensearch/api/actions/mget.rb +2 -7
  88. data/lib/opensearch/api/actions/msearch.rb +1 -6
  89. data/lib/opensearch/api/actions/msearch_template.rb +1 -6
  90. data/lib/opensearch/api/actions/mtermvectors.rb +1 -6
  91. data/lib/opensearch/api/actions/put_script.rb +3 -1
  92. data/lib/opensearch/api/actions/search.rb +1 -7
  93. data/lib/opensearch/api/actions/search_shards.rb +1 -1
  94. data/lib/opensearch/api/actions/search_template.rb +1 -6
  95. data/lib/opensearch/api/actions/snapshot/cleanup_repository.rb +3 -1
  96. data/lib/opensearch/api/actions/snapshot/clone.rb +4 -2
  97. data/lib/opensearch/api/actions/snapshot/create.rb +3 -1
  98. data/lib/opensearch/api/actions/snapshot/create_repository.rb +3 -1
  99. data/lib/opensearch/api/actions/snapshot/delete.rb +4 -2
  100. data/lib/opensearch/api/actions/snapshot/delete_repository.rb +3 -1
  101. data/lib/opensearch/api/actions/snapshot/get.rb +3 -1
  102. data/lib/opensearch/api/actions/snapshot/get_features.rb +4 -2
  103. data/lib/opensearch/api/actions/snapshot/get_repository.rb +3 -2
  104. data/lib/opensearch/api/actions/snapshot/restore.rb +3 -1
  105. data/lib/opensearch/api/actions/snapshot/status.rb +3 -1
  106. data/lib/opensearch/api/actions/snapshot/verify_repository.rb +3 -1
  107. data/lib/opensearch/api/actions/termvectors.rb +1 -8
  108. data/lib/opensearch/api/actions/update.rb +1 -8
  109. data/lib/opensearch/api/actions/update_by_query.rb +1 -8
  110. data/lib/opensearch/api/utils.rb +5 -5
  111. data/lib/opensearch/api/version.rb +1 -1
  112. data/lib/opensearch/api.rb +1 -1
  113. data/opensearch-api.gemspec +2 -3
  114. data/spec/opensearch/api/actions/bulk_spec.rb +10 -21
  115. data/spec/opensearch/api/actions/cat/all_pit_segments_spec.rb +36 -0
  116. data/spec/opensearch/api/actions/cat/allocation_spec.rb +6 -7
  117. data/spec/opensearch/api/actions/cat/cluster_manager_spec.rb +26 -0
  118. data/spec/opensearch/api/actions/cat/pit_segments_spec.rb +43 -0
  119. data/spec/opensearch/api/actions/count_spec.rb +3 -3
  120. data/spec/opensearch/api/actions/create_document_spec.rb +8 -8
  121. data/spec/opensearch/api/actions/create_pit_spec.rb +58 -0
  122. data/spec/opensearch/api/actions/delete_all_pits_spec.rb +35 -0
  123. data/spec/opensearch/api/actions/delete_by_query_spec.rb +0 -17
  124. data/spec/opensearch/api/actions/delete_document_spec.rb +10 -10
  125. data/spec/opensearch/api/actions/delete_pit_spec.rb +41 -0
  126. data/spec/opensearch/api/actions/exists_document_spec.rb +10 -10
  127. data/spec/opensearch/api/actions/explain_document_spec.rb +8 -8
  128. data/spec/opensearch/api/actions/get_all_pits_spec.rb +35 -0
  129. data/spec/opensearch/api/actions/get_document_source_spec.rb +6 -6
  130. data/spec/opensearch/api/actions/get_document_spec.rb +8 -8
  131. data/spec/opensearch/api/actions/get_script_spec.rb +2 -2
  132. data/spec/opensearch/api/actions/hashie_spec.rb +0 -2
  133. data/spec/opensearch/api/actions/index_document_spec.rb +12 -12
  134. data/spec/opensearch/api/actions/indices/clone_spec.rb +2 -2
  135. data/spec/opensearch/api/actions/indices/get_field_mapping_spec.rb +0 -11
  136. data/spec/opensearch/api/actions/indices/get_mapping_spec.rb +5 -16
  137. data/spec/opensearch/api/actions/indices/put_mapping_spec.rb +8 -21
  138. data/spec/opensearch/api/actions/indices/validate_query_spec.rb +0 -10
  139. data/spec/opensearch/api/actions/mget_spec.rb +2 -17
  140. data/spec/opensearch/api/actions/mtermvectors_spec.rb +3 -3
  141. data/spec/opensearch/api/actions/search_spec.rb +5 -16
  142. data/spec/opensearch/api/actions/termvectors_spec.rb +5 -5
  143. data/spec/opensearch/api/actions/update_document_spec.rb +11 -11
  144. data/spec/opensearch/api/utils_spec.rb +7 -14
  145. data.tar.gz.sig +0 -0
  146. metadata +40 -43
  147. metadata.gz.sig +0 -0
  148. data/lib/opensearch/api/actions/close_point_in_time.rb +0 -50
  149. data/lib/opensearch/api/actions/indices/exists_type.rb +0 -79
  150. data/lib/opensearch/api/actions/indices/flush_synced.rb +0 -79
  151. data/lib/opensearch/api/actions/open_point_in_time.rb +0 -72
  152. data/spec/opensearch/api/actions/close_point_in_time_spec.rb +0 -43
  153. data/spec/opensearch/api/actions/indices/exists_type_spec.rb +0 -117
  154. data/spec/opensearch/api/actions/indices/flush_synced_spec.rb +0 -99
  155. data/spec/opensearch/api/actions/open_point_in_time_spec.rb +0 -53
@@ -32,7 +32,8 @@ module OpenSearch
32
32
  #
33
33
  # @option arguments [List] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
34
34
  # @option arguments [List] :name The name of the settings that should be included
35
- # @option arguments [Time] :master_timeout Specify timeout for connection to master
35
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
36
+ # @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
36
37
  # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
37
38
  # @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)
38
39
  # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all)
@@ -72,6 +73,7 @@ module OpenSearch
72
73
  # @since 6.2.0
73
74
  ParamsRegistry.register(:get_settings, [
74
75
  :master_timeout,
76
+ :cluster_manager_timeout,
75
77
  :ignore_unavailable,
76
78
  :allow_no_indices,
77
79
  :expand_wildcards,
@@ -31,10 +31,10 @@ module OpenSearch
31
31
  # Returns an index template.
32
32
  #
33
33
  # @option arguments [List] :name The comma separated names of the index templates
34
- # @option arguments [Boolean] :include_type_name Whether a type should be returned in the body of the mappings.
35
34
  # @option arguments [Boolean] :flat_settings Return settings in flat format (default: false)
36
- # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
37
- # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
35
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
36
+ # @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
37
+ # @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
38
38
  # @option arguments [Hash] :headers Custom HTTP headers
39
39
  #
40
40
  #
@@ -61,9 +61,9 @@ module OpenSearch
61
61
  #
62
62
  # @since 6.2.0
63
63
  ParamsRegistry.register(:get_template, [
64
- :include_type_name,
65
64
  :flat_settings,
66
65
  :master_timeout,
66
+ :cluster_manager_timeout,
67
67
  :local
68
68
  ].freeze)
69
69
  end
@@ -32,7 +32,8 @@ module OpenSearch
32
32
  #
33
33
  # @option arguments [List] :index A comma separated list of indices to open
34
34
  # @option arguments [Time] :timeout Explicit operation timeout
35
- # @option arguments [Time] :master_timeout Specify timeout for connection to master
35
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
36
+ # @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
36
37
  # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
37
38
  # @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)
38
39
  # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all)
@@ -63,6 +64,7 @@ module OpenSearch
63
64
  ParamsRegistry.register(:open, [
64
65
  :timeout,
65
66
  :master_timeout,
67
+ :cluster_manager_timeout,
66
68
  :ignore_unavailable,
67
69
  :allow_no_indices,
68
70
  :expand_wildcards,
@@ -33,7 +33,8 @@ module OpenSearch
33
33
  # @option arguments [List] :index A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices.
34
34
  # @option arguments [String] :name The name of the alias to be created or updated
35
35
  # @option arguments [Time] :timeout Explicit timestamp for the document
36
- # @option arguments [Time] :master_timeout Specify timeout for connection to master
36
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
37
+ # @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
37
38
  # @option arguments [Hash] :headers Custom HTTP headers
38
39
  # @option arguments [Hash] :body The settings for the alias, such as `routing` or `filter`
39
40
  #
@@ -65,7 +66,8 @@ module OpenSearch
65
66
  # @since 6.2.0
66
67
  ParamsRegistry.register(:put_alias, [
67
68
  :timeout,
68
- :master_timeout
69
+ :master_timeout,
70
+ :cluster_manager_timeout
69
71
  ].freeze)
70
72
  end
71
73
  end
@@ -33,7 +33,8 @@ module OpenSearch
33
33
  # @option arguments [String] :name The name of the template
34
34
  # @option arguments [Boolean] :create Whether the index template should only be added if new or can also replace an existing one
35
35
  # @option arguments [String] :cause User defined reason for creating/updating the index template
36
- # @option arguments [Time] :master_timeout Specify timeout for connection to master
36
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
37
+ # @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
37
38
  # @option arguments [Hash] :headers Custom HTTP headers
38
39
  # @option arguments [Hash] :body The template definition (*Required*)
39
40
  #
@@ -62,7 +63,8 @@ module OpenSearch
62
63
  ParamsRegistry.register(:put_index_template, [
63
64
  :create,
64
65
  :cause,
65
- :master_timeout
66
+ :master_timeout,
67
+ :cluster_manager_timeout
66
68
  ].freeze)
67
69
  end
68
70
  end
@@ -31,10 +31,9 @@ module OpenSearch
31
31
  # Updates the index mappings.
32
32
  #
33
33
  # @option arguments [List] :index A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
34
- # @option arguments [String] :type The name of the document type *Deprecated*
35
- # @option arguments [Boolean] :include_type_name Whether a type should be expected in the body of the mappings.
36
34
  # @option arguments [Time] :timeout Explicit operation timeout
37
- # @option arguments [Time] :master_timeout Specify timeout for connection to master
35
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
36
+ # @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
38
37
  # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
39
38
  # @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)
40
39
  # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all)
@@ -57,16 +56,8 @@ module OpenSearch
57
56
 
58
57
  _index = arguments.delete(:index)
59
58
 
60
- _type = arguments.delete(:type)
61
-
62
59
  method = OpenSearch::API::HTTP_PUT
63
- path = if _index && _type
64
- "#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/_mappings"
65
- elsif _index
66
- "#{Utils.__listify(_index)}/_mappings"
67
- elsif _type
68
- "_mappings/#{Utils.__listify(_type)}"
69
- end
60
+ path = "#{Utils.__listify(_index)}/_mappings"
70
61
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
71
62
 
72
63
  body = arguments[:body]
@@ -77,9 +68,9 @@ module OpenSearch
77
68
  #
78
69
  # @since 6.2.0
79
70
  ParamsRegistry.register(:put_mapping, [
80
- :include_type_name,
81
71
  :timeout,
82
72
  :master_timeout,
73
+ :cluster_manager_timeout,
83
74
  :ignore_unavailable,
84
75
  :allow_no_indices,
85
76
  :expand_wildcards,
@@ -31,7 +31,8 @@ module OpenSearch
31
31
  # Updates the index settings.
32
32
  #
33
33
  # @option arguments [List] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
34
- # @option arguments [Time] :master_timeout Specify timeout for connection to master
34
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
35
+ # @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
35
36
  # @option arguments [Time] :timeout Explicit operation timeout
36
37
  # @option arguments [Boolean] :preserve_existing Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false`
37
38
  # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
@@ -68,6 +69,7 @@ module OpenSearch
68
69
  # @since 6.2.0
69
70
  ParamsRegistry.register(:put_settings, [
70
71
  :master_timeout,
72
+ :cluster_manager_timeout,
71
73
  :timeout,
72
74
  :preserve_existing,
73
75
  :ignore_unavailable,
@@ -31,10 +31,10 @@ module OpenSearch
31
31
  # Creates or updates an index template.
32
32
  #
33
33
  # @option arguments [String] :name The name of the template
34
- # @option arguments [Boolean] :include_type_name Whether a type should be returned in the body of the mappings.
35
34
  # @option arguments [Number] :order The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
36
35
  # @option arguments [Boolean] :create Whether the index template should only be added if new or can also replace an existing one
37
- # @option arguments [Time] :master_timeout Specify timeout for connection to master
36
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
37
+ # @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
38
38
  # @option arguments [Hash] :headers Custom HTTP headers
39
39
  # @option arguments [Hash] :body The template definition (*Required*)
40
40
  #
@@ -61,10 +61,10 @@ module OpenSearch
61
61
  #
62
62
  # @since 6.2.0
63
63
  ParamsRegistry.register(:put_template, [
64
- :include_type_name,
65
64
  :order,
66
65
  :create,
67
- :master_timeout
66
+ :master_timeout,
67
+ :cluster_manager_timeout
68
68
  ].freeze)
69
69
  end
70
70
  end
@@ -33,10 +33,10 @@ module OpenSearch
33
33
  #
34
34
  # @option arguments [String] :alias The name of the alias to rollover
35
35
  # @option arguments [String] :new_index The name of the rollover index
36
- # @option arguments [Boolean] :include_type_name Whether a type should be included in the body of the mappings.
37
36
  # @option arguments [Time] :timeout Explicit operation timeout
38
37
  # @option arguments [Boolean] :dry_run If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false
39
- # @option arguments [Time] :master_timeout Specify timeout for connection to master
38
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
39
+ # @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
40
40
  # @option arguments [String] :wait_for_active_shards Set the number of active shards to wait for on the newly created rollover index before the operation returns.
41
41
  # @option arguments [Hash] :headers Custom HTTP headers
42
42
  # @option arguments [Hash] :body The conditions that needs to be met for executing rollover
@@ -69,10 +69,10 @@ module OpenSearch
69
69
  #
70
70
  # @since 6.2.0
71
71
  ParamsRegistry.register(:rollover, [
72
- :include_type_name,
73
72
  :timeout,
74
73
  :dry_run,
75
74
  :master_timeout,
75
+ :cluster_manager_timeout,
76
76
  :wait_for_active_shards
77
77
  ].freeze)
78
78
  end
@@ -34,7 +34,8 @@ module OpenSearch
34
34
  # @option arguments [String] :target The name of the target index to shrink into
35
35
  # @option arguments [Boolean] :copy_settings whether or not to copy settings from the source index (defaults to false)
36
36
  # @option arguments [Time] :timeout Explicit operation timeout
37
- # @option arguments [Time] :master_timeout Specify timeout for connection to master
37
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
38
+ # @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
38
39
  # @option arguments [String] :wait_for_active_shards Set the number of active shards to wait for on the shrunken index before the operation returns.
39
40
  # @option arguments [Hash] :headers Custom HTTP headers
40
41
  # @option arguments [Hash] :body The configuration for the target index (`settings` and `aliases`)
@@ -67,6 +68,7 @@ module OpenSearch
67
68
  :copy_settings,
68
69
  :timeout,
69
70
  :master_timeout,
71
+ :cluster_manager_timeout,
70
72
  :wait_for_active_shards
71
73
  ].freeze)
72
74
  end
@@ -33,7 +33,8 @@ module OpenSearch
33
33
  # @option arguments [String] :name The name of the index (it must be a concrete index name)
34
34
  # @option arguments [Boolean] :create Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one
35
35
  # @option arguments [String] :cause User defined reason for dry-run creating the new template for simulation purposes
36
- # @option arguments [Time] :master_timeout Specify timeout for connection to master
36
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
37
+ # @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
37
38
  # @option arguments [Hash] :headers Custom HTTP headers
38
39
  # @option arguments [Hash] :body New index template definition, which will be included in the simulation, as if it already exists in the system
39
40
  #
@@ -61,7 +62,8 @@ module OpenSearch
61
62
  ParamsRegistry.register(:simulate_index_template, [
62
63
  :create,
63
64
  :cause,
64
- :master_timeout
65
+ :master_timeout,
66
+ :cluster_manager_timeout
65
67
  ].freeze)
66
68
  end
67
69
  end
@@ -33,7 +33,8 @@ module OpenSearch
33
33
  # @option arguments [String] :name The name of the index template
34
34
  # @option arguments [Boolean] :create Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one
35
35
  # @option arguments [String] :cause User defined reason for dry-run creating the new template for simulation purposes
36
- # @option arguments [Time] :master_timeout Specify timeout for connection to master
36
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
37
+ # @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
37
38
  # @option arguments [Hash] :headers Custom HTTP headers
38
39
  # @option arguments [Hash] :body New index template definition to be simulated, if no index template name is specified
39
40
  #
@@ -63,7 +64,8 @@ module OpenSearch
63
64
  ParamsRegistry.register(:simulate_template, [
64
65
  :create,
65
66
  :cause,
66
- :master_timeout
67
+ :master_timeout,
68
+ :cluster_manager_timeout
67
69
  ].freeze)
68
70
  end
69
71
  end
@@ -34,7 +34,8 @@ module OpenSearch
34
34
  # @option arguments [String] :target The name of the target index to split into
35
35
  # @option arguments [Boolean] :copy_settings whether or not to copy settings from the source index (defaults to false)
36
36
  # @option arguments [Time] :timeout Explicit operation timeout
37
- # @option arguments [Time] :master_timeout Specify timeout for connection to master
37
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
38
+ # @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
38
39
  # @option arguments [String] :wait_for_active_shards Set the number of active shards to wait for on the shrunken index before the operation returns.
39
40
  # @option arguments [Hash] :headers Custom HTTP headers
40
41
  # @option arguments [Hash] :body The configuration for the target index (`settings` and `aliases`)
@@ -67,6 +68,7 @@ module OpenSearch
67
68
  :copy_settings,
68
69
  :timeout,
69
70
  :master_timeout,
71
+ :cluster_manager_timeout,
70
72
  :wait_for_active_shards
71
73
  ].freeze)
72
74
  end
@@ -31,7 +31,8 @@ module OpenSearch
31
31
  # Updates index aliases.
32
32
  #
33
33
  # @option arguments [Time] :timeout Request timeout
34
- # @option arguments [Time] :master_timeout Specify timeout for connection to master
34
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
35
+ # @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
35
36
  # @option arguments [Hash] :headers Custom HTTP headers
36
37
  # @option arguments [Hash] :body The definition of `actions` to perform (*Required*)
37
38
  #
@@ -56,7 +57,8 @@ module OpenSearch
56
57
  # @since 6.2.0
57
58
  ParamsRegistry.register(:update_aliases, [
58
59
  :timeout,
59
- :master_timeout
60
+ :master_timeout,
61
+ :cluster_manager_timeout
60
62
  ].freeze)
61
63
  end
62
64
  end
@@ -31,7 +31,6 @@ module OpenSearch
31
31
  # Allows a user to validate a potentially expensive query without executing it.
32
32
  #
33
33
  # @option arguments [List] :index A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
34
- # @option arguments [List] :type A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types *Deprecated*
35
34
  # @option arguments [Boolean] :explain Return detailed information about the error
36
35
  # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
37
36
  # @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)
@@ -60,17 +59,13 @@ module OpenSearch
60
59
 
61
60
  _index = arguments.delete(:index)
62
61
 
63
- _type = arguments.delete(:type)
64
-
65
62
  method = if arguments[:body]
66
63
  OpenSearch::API::HTTP_POST
67
64
  else
68
65
  OpenSearch::API::HTTP_GET
69
66
  end
70
67
 
71
- path = if _index && _type
72
- "#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/_validate/query"
73
- elsif _index
68
+ path = if _index
74
69
  "#{Utils.__listify(_index)}/_validate/query"
75
70
  else
76
71
  "_validate/query"
@@ -31,7 +31,8 @@ module OpenSearch
31
31
  # Deletes a pipeline.
32
32
  #
33
33
  # @option arguments [String] :id Pipeline ID
34
- # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
34
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
35
+ # @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
35
36
  # @option arguments [Time] :timeout Explicit operation timeout
36
37
  # @option arguments [Hash] :headers Custom HTTP headers
37
38
  #
@@ -58,6 +59,7 @@ module OpenSearch
58
59
  # @since 6.2.0
59
60
  ParamsRegistry.register(:delete_pipeline, [
60
61
  :master_timeout,
62
+ :cluster_manager_timeout,
61
63
  :timeout
62
64
  ].freeze)
63
65
  end
@@ -32,7 +32,8 @@ module OpenSearch
32
32
  #
33
33
  # @option arguments [String] :id Comma separated list of pipeline ids. Wildcards supported
34
34
  # @option arguments [Boolean] :summary Return pipelines without their definitions (default: false)
35
- # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
35
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
36
+ # @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
36
37
  # @option arguments [Hash] :headers Custom HTTP headers
37
38
  #
38
39
  #
@@ -60,7 +61,8 @@ module OpenSearch
60
61
  # @since 6.2.0
61
62
  ParamsRegistry.register(:get_pipeline, [
62
63
  :summary,
63
- :master_timeout
64
+ :master_timeout,
65
+ :cluster_manager_timeout
64
66
  ].freeze)
65
67
  end
66
68
  end
@@ -31,7 +31,8 @@ module OpenSearch
31
31
  # Creates or updates a pipeline.
32
32
  #
33
33
  # @option arguments [String] :id Pipeline ID
34
- # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
34
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
35
+ # @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
35
36
  # @option arguments [Time] :timeout Explicit operation timeout
36
37
  # @option arguments [Hash] :headers Custom HTTP headers
37
38
  # @option arguments [Hash] :body The ingest definition (*Required*)
@@ -60,6 +61,7 @@ module OpenSearch
60
61
  # @since 6.2.0
61
62
  ParamsRegistry.register(:put_pipeline, [
62
63
  :master_timeout,
64
+ :cluster_manager_timeout,
63
65
  :timeout
64
66
  ].freeze)
65
67
  end
@@ -30,7 +30,6 @@ module OpenSearch
30
30
  # Allows to get multiple documents in one request.
31
31
  #
32
32
  # @option arguments [String] :index The name of the index
33
- # @option arguments [String] :type The type of the document *Deprecated*
34
33
  # @option arguments [List] :stored_fields A comma-separated list of stored fields to return in the response
35
34
  # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
36
35
  # @option arguments [Boolean] :realtime Specify whether to perform the operation in realtime or search mode
@@ -40,7 +39,7 @@ module OpenSearch
40
39
  # @option arguments [List] :_source_excludes A list of fields to exclude from the returned _source field
41
40
  # @option arguments [List] :_source_includes A list of fields to extract and return from the _source field
42
41
  # @option arguments [Hash] :headers Custom HTTP headers
43
- # @option arguments [Hash] :body Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. (*Required*)
42
+ # @option arguments [Hash] :body Document identifiers; can be either `docs` (containing full document information) or `ids` (when index is provided in the URL. (*Required*)
44
43
  #
45
44
  # *Deprecation notice*:
46
45
  # Specifying types in urls has been deprecated
@@ -57,12 +56,8 @@ module OpenSearch
57
56
 
58
57
  _index = arguments.delete(:index)
59
58
 
60
- _type = arguments.delete(:type)
61
-
62
59
  method = OpenSearch::API::HTTP_POST
63
- path = if _index && _type
64
- "#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/_mget"
65
- elsif _index
60
+ path = if _index
66
61
  "#{Utils.__listify(_index)}/_mget"
67
62
  else
68
63
  "_mget"
@@ -30,7 +30,6 @@ module OpenSearch
30
30
  # Allows to execute several search operations in one request.
31
31
  #
32
32
  # @option arguments [List] :index A comma-separated list of index names to use as default
33
- # @option arguments [List] :type A comma-separated list of document types to use as default
34
33
  # @option arguments [String] :search_type Search operation type (options: query_then_fetch, dfs_query_then_fetch)
35
34
  # @option arguments [Number] :max_concurrent_searches Controls the maximum number of concurrent searches the multi search api will execute
36
35
  # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response
@@ -56,12 +55,8 @@ module OpenSearch
56
55
 
57
56
  _index = arguments.delete(:index)
58
57
 
59
- _type = arguments.delete(:type)
60
-
61
58
  method = OpenSearch::API::HTTP_POST
62
- path = if _index && _type
63
- "#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/_msearch"
64
- elsif _index
59
+ path = if _index
65
60
  "#{Utils.__listify(_index)}/_msearch"
66
61
  else
67
62
  "_msearch"
@@ -30,7 +30,6 @@ module OpenSearch
30
30
  # Allows to execute several search template operations in one request.
31
31
  #
32
32
  # @option arguments [List] :index A comma-separated list of index names to use as default
33
- # @option arguments [List] :type A comma-separated list of document types to use as default
34
33
  # @option arguments [String] :search_type Search operation type (options: query_then_fetch, dfs_query_then_fetch)
35
34
  # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response
36
35
  # @option arguments [Number] :max_concurrent_searches Controls the maximum number of concurrent searches the multi search api will execute
@@ -54,12 +53,8 @@ module OpenSearch
54
53
 
55
54
  _index = arguments.delete(:index)
56
55
 
57
- _type = arguments.delete(:type)
58
-
59
56
  method = OpenSearch::API::HTTP_POST
60
- path = if _index && _type
61
- "#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/_msearch/template"
62
- elsif _index
57
+ path = if _index
63
58
  "#{Utils.__listify(_index)}/_msearch/template"
64
59
  else
65
60
  "_msearch/template"
@@ -30,7 +30,6 @@ module OpenSearch
30
30
  # Returns multiple termvectors in one request.
31
31
  #
32
32
  # @option arguments [String] :index The index in which the document resides.
33
- # @option arguments [String] :type The type of the document.
34
33
  # @option arguments [List] :ids A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
35
34
  # @option arguments [Boolean] :term_statistics Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
36
35
  # @option arguments [Boolean] :field_statistics Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
@@ -60,17 +59,13 @@ module OpenSearch
60
59
 
61
60
  _index = arguments.delete(:index)
62
61
 
63
- _type = arguments.delete(:type)
64
-
65
62
  method = if arguments[:body]
66
63
  OpenSearch::API::HTTP_POST
67
64
  else
68
65
  OpenSearch::API::HTTP_GET
69
66
  end
70
67
 
71
- path = if _index && _type
72
- "#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/_mtermvectors"
73
- elsif _index
68
+ path = if _index
74
69
  "#{Utils.__listify(_index)}/_mtermvectors"
75
70
  else
76
71
  "_mtermvectors"
@@ -32,7 +32,8 @@ module OpenSearch
32
32
  # @option arguments [String] :id Script ID
33
33
  # @option arguments [String] :context Script context
34
34
  # @option arguments [Time] :timeout Explicit operation timeout
35
- # @option arguments [Time] :master_timeout Specify timeout for connection to master
35
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
36
+ # @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
36
37
  # @option arguments [Hash] :headers Custom HTTP headers
37
38
  # @option arguments [Hash] :body The document (*Required*)
38
39
  #
@@ -67,6 +68,7 @@ module OpenSearch
67
68
  ParamsRegistry.register(:put_script, [
68
69
  :timeout,
69
70
  :master_timeout,
71
+ :cluster_manager_timeout,
70
72
  :context
71
73
  ].freeze)
72
74
  end
@@ -30,7 +30,6 @@ module OpenSearch
30
30
  # Returns results matching a query.
31
31
  #
32
32
  # @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
33
- # @option arguments [List] :type A comma-separated list of document types to search; leave empty to perform the operation on all types
34
33
  # @option arguments [String] :analyzer The analyzer to use for the query string
35
34
  # @option arguments [Boolean] :analyze_wildcard Specify whether wildcard and prefix queries should be analyzed (default: false)
36
35
  # @option arguments [Boolean] :ccs_minimize_roundtrips Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
@@ -87,21 +86,16 @@ module OpenSearch
87
86
  headers = arguments.delete(:headers) || {}
88
87
 
89
88
  arguments = arguments.clone
90
- arguments[:index] = UNDERSCORE_ALL if !arguments[:index] && arguments[:type]
91
89
 
92
90
  _index = arguments.delete(:index)
93
91
 
94
- _type = arguments.delete(:type)
95
-
96
92
  method = if arguments[:body]
97
93
  OpenSearch::API::HTTP_POST
98
94
  else
99
95
  OpenSearch::API::HTTP_GET
100
96
  end
101
97
 
102
- path = if _index && _type
103
- "#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/_search"
104
- elsif _index
98
+ path = if _index
105
99
  "#{Utils.__listify(_index)}/_search"
106
100
  else
107
101
  "_search"
@@ -32,7 +32,7 @@ module OpenSearch
32
32
  # @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
33
33
  # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
34
34
  # @option arguments [String] :routing Specific routing value
35
- # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
35
+ # @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
36
36
  # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
37
37
  # @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)
38
38
  # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all)
@@ -30,7 +30,6 @@ module OpenSearch
30
30
  # Allows to use the Mustache language to pre-render a search definition.
31
31
  #
32
32
  # @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
33
- # @option arguments [List] :type A comma-separated list of document types to search; leave empty to perform the operation on all types
34
33
  # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
35
34
  # @option arguments [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indices should be ignored when throttled
36
35
  # @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)
@@ -62,12 +61,8 @@ module OpenSearch
62
61
 
63
62
  _index = arguments.delete(:index)
64
63
 
65
- _type = arguments.delete(:type)
66
-
67
64
  method = OpenSearch::API::HTTP_POST
68
- path = if _index && _type
69
- "#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/_search/template"
70
- elsif _index
65
+ path = if _index
71
66
  "#{Utils.__listify(_index)}/_search/template"
72
67
  else
73
68
  "_search/template"
@@ -31,7 +31,8 @@ module OpenSearch
31
31
  # Removes stale data from repository.
32
32
  #
33
33
  # @option arguments [String] :repository A repository name
34
- # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
34
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
35
+ # @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
35
36
  # @option arguments [Time] :timeout Explicit operation timeout
36
37
  # @option arguments [Hash] :headers Custom HTTP headers
37
38
  #
@@ -58,6 +59,7 @@ module OpenSearch
58
59
  # @since 6.2.0
59
60
  ParamsRegistry.register(:cleanup_repository, [
60
61
  :master_timeout,
62
+ :cluster_manager_timeout,
61
63
  :timeout
62
64
  ].freeze)
63
65
  end
@@ -33,7 +33,8 @@ module OpenSearch
33
33
  # @option arguments [String] :repository A repository name
34
34
  # @option arguments [String] :snapshot The name of the snapshot to clone from
35
35
  # @option arguments [String] :target_snapshot The name of the cloned snapshot to create
36
- # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
36
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
37
+ # @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
37
38
  # @option arguments [Hash] :headers Custom HTTP headers
38
39
  # @option arguments [Hash] :body The snapshot clone definition (*Required*)
39
40
  #
@@ -66,7 +67,8 @@ module OpenSearch
66
67
  #
67
68
  # @since 6.2.0
68
69
  ParamsRegistry.register(:clone, [
69
- :master_timeout
70
+ :master_timeout,
71
+ :cluster_manager_timeout
70
72
  ].freeze)
71
73
  end
72
74
  end