opensearch-api 1.0.0 → 2.1.0

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.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/Gemfile +2 -2
  4. data/README.md +3 -3
  5. data/Rakefile +3 -3
  6. data/lib/opensearch/api/actions/benchmark.rb +0 -1
  7. data/lib/opensearch/api/actions/bulk.rb +1 -7
  8. data/lib/opensearch/api/actions/cat/allocation.rb +4 -2
  9. data/lib/opensearch/api/actions/cat/cluster_manager.rb +54 -0
  10. data/lib/opensearch/api/actions/cat/indices.rb +4 -2
  11. data/lib/opensearch/api/actions/cat/master.rb +3 -1
  12. data/lib/opensearch/api/actions/cat/nodeattrs.rb +4 -2
  13. data/lib/opensearch/api/actions/cat/nodes.rb +4 -2
  14. data/lib/opensearch/api/actions/cat/pending_tasks.rb +4 -2
  15. data/lib/opensearch/api/actions/cat/plugins.rb +4 -2
  16. data/lib/opensearch/api/actions/cat/repositories.rb +4 -2
  17. data/lib/opensearch/api/actions/cat/shards.rb +4 -2
  18. data/lib/opensearch/api/actions/cat/snapshots.rb +3 -1
  19. data/lib/opensearch/api/actions/cat/templates.rb +4 -2
  20. data/lib/opensearch/api/actions/cat/thread_pool.rb +4 -2
  21. data/lib/opensearch/api/actions/cluster/delete_component_template.rb +4 -2
  22. data/lib/opensearch/api/actions/cluster/exists_component_template.rb +4 -2
  23. data/lib/opensearch/api/actions/cluster/get_component_template.rb +4 -2
  24. data/lib/opensearch/api/actions/cluster/get_settings.rb +3 -1
  25. data/lib/opensearch/api/actions/cluster/health.rb +4 -2
  26. data/lib/opensearch/api/actions/cluster/pending_tasks.rb +5 -3
  27. data/lib/opensearch/api/actions/cluster/put_component_template.rb +4 -2
  28. data/lib/opensearch/api/actions/cluster/put_settings.rb +3 -1
  29. data/lib/opensearch/api/actions/cluster/reroute.rb +4 -2
  30. data/lib/opensearch/api/actions/cluster/state.rb +4 -2
  31. data/lib/opensearch/api/actions/count.rb +1 -6
  32. data/lib/opensearch/api/actions/create.rb +0 -1
  33. data/lib/opensearch/api/actions/dangling_indices/delete_dangling_index.rb +4 -2
  34. data/lib/opensearch/api/actions/dangling_indices/import_dangling_index.rb +4 -2
  35. data/lib/opensearch/api/actions/delete.rb +1 -8
  36. data/lib/opensearch/api/actions/delete_by_query.rb +1 -8
  37. data/lib/opensearch/api/actions/delete_script.rb +4 -2
  38. data/lib/opensearch/api/actions/exists.rb +1 -8
  39. data/lib/opensearch/api/actions/exists_source.rb +1 -8
  40. data/lib/opensearch/api/actions/explain.rb +1 -8
  41. data/lib/opensearch/api/actions/features/get_features.rb +4 -2
  42. data/lib/opensearch/api/actions/get.rb +1 -8
  43. data/lib/opensearch/api/actions/get_script.rb +4 -2
  44. data/lib/opensearch/api/actions/get_source.rb +1 -8
  45. data/lib/opensearch/api/actions/index.rb +1 -8
  46. data/lib/opensearch/api/actions/indices/add_block.rb +3 -1
  47. data/lib/opensearch/api/actions/indices/clone.rb +3 -1
  48. data/lib/opensearch/api/actions/indices/close.rb +3 -1
  49. data/lib/opensearch/api/actions/indices/create.rb +4 -4
  50. data/lib/opensearch/api/actions/indices/delete.rb +3 -1
  51. data/lib/opensearch/api/actions/indices/delete_alias.rb +4 -2
  52. data/lib/opensearch/api/actions/indices/delete_index_template.rb +4 -2
  53. data/lib/opensearch/api/actions/indices/delete_template.rb +4 -2
  54. data/lib/opensearch/api/actions/indices/exists_index_template.rb +4 -2
  55. data/lib/opensearch/api/actions/indices/exists_template.rb +4 -2
  56. data/lib/opensearch/api/actions/indices/get.rb +4 -4
  57. data/lib/opensearch/api/actions/indices/get_field_mapping.rb +1 -10
  58. data/lib/opensearch/api/actions/indices/get_index_template.rb +4 -2
  59. data/lib/opensearch/api/actions/indices/get_mapping.rb +5 -12
  60. data/lib/opensearch/api/actions/indices/get_settings.rb +3 -1
  61. data/lib/opensearch/api/actions/indices/get_template.rb +4 -4
  62. data/lib/opensearch/api/actions/indices/open.rb +3 -1
  63. data/lib/opensearch/api/actions/indices/put_alias.rb +4 -2
  64. data/lib/opensearch/api/actions/indices/put_index_template.rb +4 -2
  65. data/lib/opensearch/api/actions/indices/put_mapping.rb +4 -13
  66. data/lib/opensearch/api/actions/indices/put_settings.rb +3 -1
  67. data/lib/opensearch/api/actions/indices/put_template.rb +4 -4
  68. data/lib/opensearch/api/actions/indices/rollover.rb +3 -3
  69. data/lib/opensearch/api/actions/indices/shrink.rb +3 -1
  70. data/lib/opensearch/api/actions/indices/simulate_index_template.rb +4 -2
  71. data/lib/opensearch/api/actions/indices/simulate_template.rb +4 -2
  72. data/lib/opensearch/api/actions/indices/split.rb +3 -1
  73. data/lib/opensearch/api/actions/indices/update_aliases.rb +4 -2
  74. data/lib/opensearch/api/actions/indices/validate_query.rb +1 -6
  75. data/lib/opensearch/api/actions/ingest/delete_pipeline.rb +3 -1
  76. data/lib/opensearch/api/actions/ingest/get_pipeline.rb +4 -2
  77. data/lib/opensearch/api/actions/ingest/put_pipeline.rb +3 -1
  78. data/lib/opensearch/api/actions/mget.rb +2 -7
  79. data/lib/opensearch/api/actions/msearch.rb +1 -6
  80. data/lib/opensearch/api/actions/msearch_template.rb +1 -6
  81. data/lib/opensearch/api/actions/mtermvectors.rb +1 -6
  82. data/lib/opensearch/api/actions/put_script.rb +3 -1
  83. data/lib/opensearch/api/actions/search.rb +1 -7
  84. data/lib/opensearch/api/actions/search_shards.rb +1 -1
  85. data/lib/opensearch/api/actions/search_template.rb +1 -6
  86. data/lib/opensearch/api/actions/snapshot/cleanup_repository.rb +3 -1
  87. data/lib/opensearch/api/actions/snapshot/clone.rb +4 -2
  88. data/lib/opensearch/api/actions/snapshot/create.rb +3 -1
  89. data/lib/opensearch/api/actions/snapshot/create_repository.rb +3 -1
  90. data/lib/opensearch/api/actions/snapshot/delete.rb +4 -2
  91. data/lib/opensearch/api/actions/snapshot/delete_repository.rb +3 -1
  92. data/lib/opensearch/api/actions/snapshot/get.rb +3 -1
  93. data/lib/opensearch/api/actions/snapshot/get_features.rb +4 -2
  94. data/lib/opensearch/api/actions/snapshot/get_repository.rb +3 -2
  95. data/lib/opensearch/api/actions/snapshot/restore.rb +3 -1
  96. data/lib/opensearch/api/actions/snapshot/status.rb +3 -1
  97. data/lib/opensearch/api/actions/snapshot/verify_repository.rb +3 -1
  98. data/lib/opensearch/api/actions/termvectors.rb +1 -8
  99. data/lib/opensearch/api/actions/update.rb +1 -8
  100. data/lib/opensearch/api/actions/update_by_query.rb +1 -8
  101. data/lib/opensearch/api/utils.rb +5 -5
  102. data/lib/opensearch/api/version.rb +1 -1
  103. data/lib/opensearch/api.rb +1 -1
  104. data/opensearch-api.gemspec +0 -1
  105. data/spec/opensearch/api/actions/bulk_spec.rb +10 -21
  106. data/spec/opensearch/api/actions/cat/allocation_spec.rb +6 -7
  107. data/spec/opensearch/api/actions/cat/cluster_manager_spec.rb +26 -0
  108. data/spec/opensearch/api/actions/count_spec.rb +3 -3
  109. data/spec/opensearch/api/actions/create_document_spec.rb +8 -8
  110. data/spec/opensearch/api/actions/delete_by_query_spec.rb +0 -17
  111. data/spec/opensearch/api/actions/delete_document_spec.rb +10 -10
  112. data/spec/opensearch/api/actions/exists_document_spec.rb +10 -10
  113. data/spec/opensearch/api/actions/explain_document_spec.rb +8 -8
  114. data/spec/opensearch/api/actions/get_document_source_spec.rb +6 -6
  115. data/spec/opensearch/api/actions/get_document_spec.rb +8 -8
  116. data/spec/opensearch/api/actions/get_script_spec.rb +2 -2
  117. data/spec/opensearch/api/actions/hashie_spec.rb +0 -2
  118. data/spec/opensearch/api/actions/index_document_spec.rb +12 -12
  119. data/spec/opensearch/api/actions/indices/clone_spec.rb +2 -2
  120. data/spec/opensearch/api/actions/indices/get_field_mapping_spec.rb +0 -11
  121. data/spec/opensearch/api/actions/indices/get_mapping_spec.rb +5 -16
  122. data/spec/opensearch/api/actions/indices/put_mapping_spec.rb +8 -21
  123. data/spec/opensearch/api/actions/indices/validate_query_spec.rb +0 -10
  124. data/spec/opensearch/api/actions/mget_spec.rb +2 -17
  125. data/spec/opensearch/api/actions/mtermvectors_spec.rb +3 -3
  126. data/spec/opensearch/api/actions/search_spec.rb +5 -16
  127. data/spec/opensearch/api/actions/termvectors_spec.rb +5 -5
  128. data/spec/opensearch/api/actions/update_document_spec.rb +11 -11
  129. data/spec/opensearch/api/utils_spec.rb +7 -14
  130. data.tar.gz.sig +0 -0
  131. metadata +14 -31
  132. metadata.gz.sig +0 -0
  133. data/lib/opensearch/api/actions/indices/exists_type.rb +0 -79
  134. data/lib/opensearch/api/actions/indices/flush_synced.rb +0 -79
  135. data/spec/opensearch/api/actions/indices/exists_type_spec.rb +0 -117
  136. data/spec/opensearch/api/actions/indices/flush_synced_spec.rb +0 -99
@@ -30,7 +30,6 @@ module OpenSearch
30
30
  # Returns number of documents matching a query.
31
31
  #
32
32
  # @option arguments [List] :index A comma-separated list of indices to restrict the results
33
- # @option arguments [List] :type A comma-separated list of types to restrict the results
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)
@@ -61,12 +60,8 @@ module OpenSearch
61
60
 
62
61
  _index = arguments.delete(:index)
63
62
 
64
- _type = arguments.delete(:type)
65
-
66
63
  method = OpenSearch::API::HTTP_POST
67
- path = if _index && _type
68
- "#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/_count"
69
- elsif _index
64
+ path = if _index
70
65
  "#{Utils.__listify(_index)}/_count"
71
66
  else
72
67
  "_count"
@@ -33,7 +33,6 @@ module OpenSearch
33
33
  #
34
34
  # @option arguments [String] :id Document ID
35
35
  # @option arguments [String] :index The name of the index
36
- # @option arguments [String] :type The type of the document *Deprecated*
37
36
  # @option arguments [String] :wait_for_active_shards Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
38
37
  # @option arguments [String] :refresh If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (options: true, false, wait_for)
39
38
  # @option arguments [String] :routing Specific routing value
@@ -33,7 +33,8 @@ module OpenSearch
33
33
  # @option arguments [String] :index_uuid The UUID of the dangling index
34
34
  # @option arguments [Boolean] :accept_data_loss Must be set to true in order to delete the dangling index
35
35
  # @option arguments [Time] :timeout Explicit operation timeout
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
  #
39
40
  #
@@ -60,7 +61,8 @@ module OpenSearch
60
61
  ParamsRegistry.register(:delete_dangling_index, [
61
62
  :accept_data_loss,
62
63
  :timeout,
63
- :master_timeout
64
+ :master_timeout,
65
+ :cluster_manager_timeout
64
66
  ].freeze)
65
67
  end
66
68
  end
@@ -33,7 +33,8 @@ module OpenSearch
33
33
  # @option arguments [String] :index_uuid The UUID of the dangling index
34
34
  # @option arguments [Boolean] :accept_data_loss Must be set to true in order to import the dangling index
35
35
  # @option arguments [Time] :timeout Explicit operation timeout
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
  #
39
40
  def import_dangling_index(arguments = {})
@@ -59,7 +60,8 @@ module OpenSearch
59
60
  ParamsRegistry.register(:import_dangling_index, [
60
61
  :accept_data_loss,
61
62
  :timeout,
62
- :master_timeout
63
+ :master_timeout,
64
+ :cluster_manager_timeout
63
65
  ].freeze)
64
66
  end
65
67
  end
@@ -31,7 +31,6 @@ module OpenSearch
31
31
  #
32
32
  # @option arguments [String] :id The document ID
33
33
  # @option arguments [String] :index The name of the index
34
- # @option arguments [String] :type The type of the document *Deprecated*
35
34
  # @option arguments [String] :wait_for_active_shards Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
36
35
  # @option arguments [String] :refresh If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (options: true, false, wait_for)
37
36
  # @option arguments [String] :routing Specific routing value
@@ -60,14 +59,8 @@ module OpenSearch
60
59
 
61
60
  _index = arguments.delete(:index)
62
61
 
63
- _type = arguments.delete(:type)
64
-
65
62
  method = OpenSearch::API::HTTP_DELETE
66
- path = if _index && _type && _id
67
- "#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/#{Utils.__listify(_id)}"
68
- else
69
- "#{Utils.__listify(_index)}/_doc/#{Utils.__listify(_id)}"
70
- end
63
+ path = "#{Utils.__listify(_index)}/_doc/#{Utils.__listify(_id)}"
71
64
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
72
65
 
73
66
  body = nil
@@ -30,7 +30,6 @@ module OpenSearch
30
30
  # Deletes documents matching the provided 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 (*Required*)
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 [String] :default_operator The default operator for query string query (AND or OR) (options: AND, OR)
@@ -83,14 +82,8 @@ module OpenSearch
83
82
 
84
83
  _index = arguments.delete(:index)
85
84
 
86
- _type = arguments.delete(:type)
87
-
88
85
  method = OpenSearch::API::HTTP_POST
89
- path = if _index && _type
90
- "#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/_delete_by_query"
91
- else
92
- "#{Utils.__listify(_index)}/_delete_by_query"
93
- end
86
+ path = "#{Utils.__listify(_index)}/_delete_by_query"
94
87
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
95
88
 
96
89
  body = arguments[:body]
@@ -31,7 +31,8 @@ module OpenSearch
31
31
  #
32
32
  # @option arguments [String] :id Script ID
33
33
  # @option arguments [Time] :timeout Explicit operation 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
  #
37
38
  #
@@ -57,7 +58,8 @@ module OpenSearch
57
58
  # @since 6.2.0
58
59
  ParamsRegistry.register(:delete_script, [
59
60
  :timeout,
60
- :master_timeout
61
+ :master_timeout,
62
+ :cluster_manager_timeout
61
63
  ].freeze)
62
64
  end
63
65
  end
@@ -31,7 +31,6 @@ module OpenSearch
31
31
  #
32
32
  # @option arguments [String] :id The document ID
33
33
  # @option arguments [String] :index The name of the index
34
- # @option arguments [String] :type The type of the document (use `_all` to fetch the first document matching the ID across all types) *Deprecated*
35
34
  # @option arguments [List] :stored_fields A comma-separated list of stored fields to return in the response
36
35
  # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
37
36
  # @option arguments [Boolean] :realtime Specify whether to perform the operation in realtime or search mode
@@ -62,14 +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_HEAD
68
- path = if _index && _type && _id
69
- "#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/#{Utils.__listify(_id)}"
70
- else
71
- "#{Utils.__listify(_index)}/_doc/#{Utils.__listify(_id)}"
72
- end
65
+ path = "#{Utils.__listify(_index)}/_doc/#{Utils.__listify(_id)}"
73
66
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
74
67
 
75
68
  body = nil
@@ -31,7 +31,6 @@ module OpenSearch
31
31
  #
32
32
  # @option arguments [String] :id The document ID
33
33
  # @option arguments [String] :index The name of the index
34
- # @option arguments [String] :type The type of the document; deprecated and optional starting with 7.0 *Deprecated*
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
37
36
  # @option arguments [Boolean] :refresh Refresh the shard containing the document before performing the operation
@@ -61,14 +60,8 @@ module OpenSearch
61
60
 
62
61
  _index = arguments.delete(:index)
63
62
 
64
- _type = arguments.delete(:type)
65
-
66
63
  method = OpenSearch::API::HTTP_HEAD
67
- path = if _index && _type && _id
68
- "#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/#{Utils.__listify(_id)}/_source"
69
- else
70
- "#{Utils.__listify(_index)}/_source/#{Utils.__listify(_id)}"
71
- end
64
+ path = "#{Utils.__listify(_index)}/_source/#{Utils.__listify(_id)}"
72
65
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
73
66
 
74
67
  body = nil
@@ -31,7 +31,6 @@ module OpenSearch
31
31
  #
32
32
  # @option arguments [String] :id The document ID
33
33
  # @option arguments [String] :index The name of the index
34
- # @option arguments [String] :type The type of the document *Deprecated*
35
34
  # @option arguments [Boolean] :analyze_wildcard Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
36
35
  # @option arguments [String] :analyzer The analyzer for the query string query
37
36
  # @option arguments [String] :default_operator The default operator for query string query (AND or OR) (options: AND, OR)
@@ -65,19 +64,13 @@ module OpenSearch
65
64
 
66
65
  _index = arguments.delete(:index)
67
66
 
68
- _type = arguments.delete(:type)
69
-
70
67
  method = if arguments[:body]
71
68
  OpenSearch::API::HTTP_POST
72
69
  else
73
70
  OpenSearch::API::HTTP_GET
74
71
  end
75
72
 
76
- path = if _index && _type && _id
77
- "#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/#{Utils.__listify(_id)}/_explain"
78
- else
79
- "#{Utils.__listify(_index)}/_explain/#{Utils.__listify(_id)}"
80
- end
73
+ path = "#{Utils.__listify(_index)}/_explain/#{Utils.__listify(_id)}"
81
74
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
82
75
 
83
76
  body = arguments[:body]
@@ -30,7 +30,8 @@ module OpenSearch
30
30
  module Actions
31
31
  # Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot
32
32
  #
33
- # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
33
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
34
+ # @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
34
35
  # @option arguments [Hash] :headers Custom HTTP headers
35
36
  #
36
37
  #
@@ -51,7 +52,8 @@ module OpenSearch
51
52
  #
52
53
  # @since 6.2.0
53
54
  ParamsRegistry.register(:get_features, [
54
- :master_timeout
55
+ :master_timeout,
56
+ :cluster_manager_timeout
55
57
  ].freeze)
56
58
  end
57
59
  end
@@ -31,7 +31,6 @@ module OpenSearch
31
31
  #
32
32
  # @option arguments [String] :id The document ID
33
33
  # @option arguments [String] :index The name of the index
34
- # @option arguments [String] :type The type of the document (use `_all` to fetch the first document matching the ID across all types) *Deprecated*
35
34
  # @option arguments [List] :stored_fields A comma-separated list of stored fields to return in the response
36
35
  # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
37
36
  # @option arguments [Boolean] :realtime Specify whether to perform the operation in realtime or search mode
@@ -62,14 +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_GET
68
- path = if _index && _type && _id
69
- "#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/#{Utils.__listify(_id)}"
70
- else
71
- "#{Utils.__listify(_index)}/_doc/#{Utils.__listify(_id)}"
72
- end
65
+ path = "#{Utils.__listify(_index)}/_doc/#{Utils.__listify(_id)}"
73
66
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
74
67
 
75
68
  body = nil
@@ -30,7 +30,8 @@ module OpenSearch
30
30
  # Returns a script.
31
31
  #
32
32
  # @option arguments [String] :id Script ID
33
- # @option arguments [Time] :master_timeout Specify timeout for connection to master
33
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
34
+ # @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
34
35
  # @option arguments [Hash] :headers Custom HTTP headers
35
36
  #
36
37
  #
@@ -55,7 +56,8 @@ module OpenSearch
55
56
  #
56
57
  # @since 6.2.0
57
58
  ParamsRegistry.register(:get_script, [
58
- :master_timeout
59
+ :master_timeout,
60
+ :cluster_manager_timeout
59
61
  ].freeze)
60
62
  end
61
63
  end
@@ -31,7 +31,6 @@ module OpenSearch
31
31
  #
32
32
  # @option arguments [String] :id The document ID
33
33
  # @option arguments [String] :index The name of the index
34
- # @option arguments [String] :type The type of the document; deprecated and optional starting with 7.0 *Deprecated*
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
37
36
  # @option arguments [Boolean] :refresh Refresh the shard containing the document before performing the operation
@@ -61,14 +60,8 @@ module OpenSearch
61
60
 
62
61
  _index = arguments.delete(:index)
63
62
 
64
- _type = arguments.delete(:type)
65
-
66
63
  method = OpenSearch::API::HTTP_GET
67
- path = if _index && _type && _id
68
- "#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/#{Utils.__listify(_id)}/_source"
69
- else
70
- "#{Utils.__listify(_index)}/_source/#{Utils.__listify(_id)}"
71
- end
64
+ path = "#{Utils.__listify(_index)}/_source/#{Utils.__listify(_id)}"
72
65
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
73
66
 
74
67
  body = nil
@@ -31,7 +31,6 @@ module OpenSearch
31
31
  #
32
32
  # @option arguments [String] :id Document ID
33
33
  # @option arguments [String] :index The name of the index
34
- # @option arguments [String] :type The type of the document *Deprecated*
35
34
  # @option arguments [String] :wait_for_active_shards Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
36
35
  # @option arguments [String] :op_type Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create`for requests without an explicit document ID (options: index, create)
37
36
  # @option arguments [String] :refresh If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (options: true, false, wait_for)
@@ -64,15 +63,9 @@ module OpenSearch
64
63
 
65
64
  _index = arguments.delete(:index)
66
65
 
67
- _type = arguments.delete(:type)
68
-
69
66
  method = _id ? OpenSearch::API::HTTP_PUT : OpenSearch::API::HTTP_POST
70
- path = if _index && _type && _id
71
- "#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/#{Utils.__listify(_id)}"
72
- elsif _index && _id
67
+ path = if _index && _id
73
68
  "#{Utils.__listify(_index)}/_doc/#{Utils.__listify(_id)}"
74
- elsif _index && _type
75
- "#{Utils.__listify(_index)}/#{Utils.__listify(_type)}"
76
69
  else
77
70
  "#{Utils.__listify(_index)}/_doc"
78
71
  end
@@ -33,7 +33,8 @@ module OpenSearch
33
33
  # @option arguments [List] :index A comma separated list of indices to add a block to
34
34
  # @option arguments [String] :block The block to add (one of read, write, read_only or metadata)
35
35
  # @option arguments [Time] :timeout Explicit operation timeout
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 [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
38
39
  # @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)
39
40
  # @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)
@@ -66,6 +67,7 @@ module OpenSearch
66
67
  ParamsRegistry.register(:add_block, [
67
68
  :timeout,
68
69
  :master_timeout,
70
+ :cluster_manager_timeout,
69
71
  :ignore_unavailable,
70
72
  :allow_no_indices,
71
73
  :expand_wildcards
@@ -33,7 +33,8 @@ module OpenSearch
33
33
  # @option arguments [String] :index The name of the source index to clone
34
34
  # @option arguments [String] :target The name of the target index to clone into
35
35
  # @option arguments [Time] :timeout Explicit operation timeout
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 [String] :wait_for_active_shards Set the number of active shards to wait for on the cloned index before the operation returns.
38
39
  # @option arguments [Hash] :headers Custom HTTP headers
39
40
  # @option arguments [Hash] :body The configuration for the target index (`settings` and `aliases`)
@@ -65,6 +66,7 @@ module OpenSearch
65
66
  ParamsRegistry.register(:clone, [
66
67
  :timeout,
67
68
  :master_timeout,
69
+ :cluster_manager_timeout,
68
70
  :wait_for_active_shards
69
71
  ].freeze)
70
72
  end
@@ -32,7 +32,8 @@ module OpenSearch
32
32
  #
33
33
  # @option arguments [List] :index A comma separated list of indices to close
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 [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(:close, [
64
65
  :timeout,
65
66
  :master_timeout,
67
+ :cluster_manager_timeout,
66
68
  :ignore_unavailable,
67
69
  :allow_no_indices,
68
70
  :expand_wildcards,
@@ -31,10 +31,10 @@ module OpenSearch
31
31
  # Creates an index with optional settings and mappings.
32
32
  #
33
33
  # @option arguments [String] :index The name of the index
34
- # @option arguments [Boolean] :include_type_name Whether a type should be expected in the body of the mappings.
35
34
  # @option arguments [String] :wait_for_active_shards Set the number of active shards to wait for before the operation returns.
36
35
  # @option arguments [Time] :timeout Explicit operation timeout
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 configuration for the index (`settings` and `mappings`)
40
40
  #
@@ -60,10 +60,10 @@ module OpenSearch
60
60
  #
61
61
  # @since 6.2.0
62
62
  ParamsRegistry.register(:create, [
63
- :include_type_name,
64
63
  :wait_for_active_shards,
65
64
  :timeout,
66
- :master_timeout
65
+ :master_timeout,
66
+ :cluster_manager_timeout
67
67
  ].freeze)
68
68
  end
69
69
  end
@@ -32,7 +32,8 @@ module OpenSearch
32
32
  #
33
33
  # @option arguments [List] :index A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
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 [Boolean] :ignore_unavailable Ignore unavailable indexes (default: false)
37
38
  # @option arguments [Boolean] :allow_no_indices Ignore if a wildcard expression resolves to no concrete indices (default: false)
38
39
  # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all)
@@ -66,6 +67,7 @@ module OpenSearch
66
67
  ParamsRegistry.register(:delete, [
67
68
  :timeout,
68
69
  :master_timeout,
70
+ :cluster_manager_timeout,
69
71
  :ignore_unavailable,
70
72
  :allow_no_indices,
71
73
  :expand_wildcards
@@ -33,7 +33,8 @@ module OpenSearch
33
33
  # @option arguments [List] :index A comma-separated list of index names (supports wildcards); use `_all` for all indices
34
34
  # @option arguments [List] :name A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
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
  #
39
40
  #
@@ -64,7 +65,8 @@ module OpenSearch
64
65
  # @since 6.2.0
65
66
  ParamsRegistry.register(:delete_alias, [
66
67
  :timeout,
67
- :master_timeout
68
+ :master_timeout,
69
+ :cluster_manager_timeout
68
70
  ].freeze)
69
71
  end
70
72
  end
@@ -32,7 +32,8 @@ module OpenSearch
32
32
  #
33
33
  # @option arguments [String] :name The name of the template
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
  #
38
39
  #
@@ -58,7 +59,8 @@ module OpenSearch
58
59
  # @since 6.2.0
59
60
  ParamsRegistry.register(:delete_index_template, [
60
61
  :timeout,
61
- :master_timeout
62
+ :master_timeout,
63
+ :cluster_manager_timeout
62
64
  ].freeze)
63
65
  end
64
66
  end
@@ -32,7 +32,8 @@ module OpenSearch
32
32
  #
33
33
  # @option arguments [String] :name The name of the template
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
  #
38
39
  #
@@ -62,7 +63,8 @@ module OpenSearch
62
63
  # @since 6.2.0
63
64
  ParamsRegistry.register(:delete_template, [
64
65
  :timeout,
65
- :master_timeout
66
+ :master_timeout,
67
+ :cluster_manager_timeout
66
68
  ].freeze)
67
69
  end
68
70
  end
@@ -32,8 +32,9 @@ module OpenSearch
32
32
  #
33
33
  # @option arguments [String] :name The name of the template
34
34
  # @option arguments [Boolean] :flat_settings Return settings in flat format (default: false)
35
- # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
36
- # @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)
37
38
  # @option arguments [Hash] :headers Custom HTTP headers
38
39
  #
39
40
  #
@@ -62,6 +63,7 @@ module OpenSearch
62
63
  ParamsRegistry.register(:exists_index_template, [
63
64
  :flat_settings,
64
65
  :master_timeout,
66
+ :cluster_manager_timeout,
65
67
  :local
66
68
  ].freeze)
67
69
  end
@@ -32,8 +32,9 @@ module OpenSearch
32
32
  #
33
33
  # @option arguments [List] :name The comma separated names of the index templates
34
34
  # @option arguments [Boolean] :flat_settings Return settings in flat format (default: false)
35
- # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
36
- # @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)
37
38
  # @option arguments [Hash] :headers Custom HTTP headers
38
39
  #
39
40
  #
@@ -65,6 +66,7 @@ module OpenSearch
65
66
  ParamsRegistry.register(:exists_template, [
66
67
  :flat_settings,
67
68
  :master_timeout,
69
+ :cluster_manager_timeout,
68
70
  :local
69
71
  ].freeze)
70
72
  end
@@ -31,14 +31,14 @@ module OpenSearch
31
31
  # Returns information about one or more indices.
32
32
  #
33
33
  # @option arguments [List] :index A comma-separated list of index names
34
- # @option arguments [Boolean] :include_type_name Whether to add the type name to the response (default: false)
35
34
  # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
36
35
  # @option arguments [Boolean] :ignore_unavailable Ignore unavailable indexes (default: false)
37
36
  # @option arguments [Boolean] :allow_no_indices Ignore if a wildcard expression resolves to no concrete indices (default: false)
38
37
  # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all)
39
38
  # @option arguments [Boolean] :flat_settings Return settings in flat format (default: false)
40
39
  # @option arguments [Boolean] :include_defaults Whether to return all default setting for each of the indices.
41
- # @option arguments [Time] :master_timeout Specify timeout for connection to master
40
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
41
+ # @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
42
42
  # @option arguments [Hash] :headers Custom HTTP headers
43
43
  #
44
44
  #
@@ -63,14 +63,14 @@ module OpenSearch
63
63
  #
64
64
  # @since 6.2.0
65
65
  ParamsRegistry.register(:get, [
66
- :include_type_name,
67
66
  :local,
68
67
  :ignore_unavailable,
69
68
  :allow_no_indices,
70
69
  :expand_wildcards,
71
70
  :flat_settings,
72
71
  :include_defaults,
73
- :master_timeout
72
+ :master_timeout,
73
+ :cluster_manager_timeout
74
74
  ].freeze)
75
75
  end
76
76
  end
@@ -32,8 +32,6 @@ module OpenSearch
32
32
  #
33
33
  # @option arguments [List] :fields A comma-separated list of fields
34
34
  # @option arguments [List] :index A comma-separated list of index names
35
- # @option arguments [List] :type A comma-separated list of document types *Deprecated*
36
- # @option arguments [Boolean] :include_type_name Whether a type should be returned in the body of the mappings.
37
35
  # @option arguments [Boolean] :include_defaults Whether the default mapping values should be returned as well
38
36
  # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
39
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)
@@ -57,15 +55,9 @@ module OpenSearch
57
55
 
58
56
  _index = arguments.delete(:index)
59
57
 
60
- _type = arguments.delete(:type)
61
-
62
58
  method = OpenSearch::API::HTTP_GET
63
- path = if _index && _type && _fields
64
- "#{Utils.__listify(_index)}/_mapping/#{Utils.__listify(_type)}/field/#{Utils.__listify(_fields)}"
65
- elsif _index && _fields
59
+ path = if _index && _fields
66
60
  "#{Utils.__listify(_index)}/_mapping/field/#{Utils.__listify(_fields)}"
67
- elsif _type && _fields
68
- "_mapping/#{Utils.__listify(_type)}/field/#{Utils.__listify(_fields)}"
69
61
  else
70
62
  "_mapping/field/#{Utils.__listify(_fields)}"
71
63
  end
@@ -79,7 +71,6 @@ module OpenSearch
79
71
  #
80
72
  # @since 6.2.0
81
73
  ParamsRegistry.register(:get_field_mapping, [
82
- :include_type_name,
83
74
  :include_defaults,
84
75
  :ignore_unavailable,
85
76
  :allow_no_indices,
@@ -32,8 +32,9 @@ module OpenSearch
32
32
  #
33
33
  # @option arguments [List] :name The comma separated names of the index templates
34
34
  # @option arguments [Boolean] :flat_settings Return settings in flat format (default: false)
35
- # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
36
- # @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)
37
38
  # @option arguments [Hash] :headers Custom HTTP headers
38
39
  #
39
40
  #
@@ -62,6 +63,7 @@ module OpenSearch
62
63
  ParamsRegistry.register(:get_index_template, [
63
64
  :flat_settings,
64
65
  :master_timeout,
66
+ :cluster_manager_timeout,
65
67
  :local
66
68
  ].freeze)
67
69
  end