elasticsearch-api 9.1.2 → 9.2.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 (140) hide show
  1. checksums.yaml +4 -4
  2. data/lib/elasticsearch/api/actions/async_search/submit.rb +12 -4
  3. data/lib/elasticsearch/api/actions/cat/aliases.rb +9 -0
  4. data/lib/elasticsearch/api/actions/cat/allocation.rb +9 -1
  5. data/lib/elasticsearch/api/actions/cat/component_templates.rb +9 -0
  6. data/lib/elasticsearch/api/actions/cat/count.rb +17 -0
  7. data/lib/elasticsearch/api/actions/cat/fielddata.rb +9 -1
  8. data/lib/elasticsearch/api/actions/cat/health.rb +10 -2
  9. data/lib/elasticsearch/api/actions/cat/indices.rb +10 -3
  10. data/lib/elasticsearch/api/actions/cat/master.rb +10 -1
  11. data/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb +11 -3
  12. data/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb +9 -1
  13. data/lib/elasticsearch/api/actions/cat/ml_jobs.rb +9 -2
  14. data/lib/elasticsearch/api/actions/cat/ml_trained_models.rb +11 -4
  15. data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +10 -1
  16. data/lib/elasticsearch/api/actions/cat/nodes.rb +10 -3
  17. data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +10 -2
  18. data/lib/elasticsearch/api/actions/cat/plugins.rb +10 -1
  19. data/lib/elasticsearch/api/actions/cat/recovery.rb +9 -2
  20. data/lib/elasticsearch/api/actions/cat/repositories.rb +9 -0
  21. data/lib/elasticsearch/api/actions/cat/segments.rb +9 -1
  22. data/lib/elasticsearch/api/actions/cat/shards.rb +9 -2
  23. data/lib/elasticsearch/api/actions/cat/snapshots.rb +9 -1
  24. data/lib/elasticsearch/api/actions/cat/tasks.rb +10 -2
  25. data/lib/elasticsearch/api/actions/cat/templates.rb +10 -1
  26. data/lib/elasticsearch/api/actions/cat/thread_pool.rb +9 -1
  27. data/lib/elasticsearch/api/actions/cat/transforms.rb +9 -1
  28. data/lib/elasticsearch/api/actions/close_point_in_time.rb +2 -0
  29. data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +5 -0
  30. data/lib/elasticsearch/api/actions/cluster/state.rb +1 -1
  31. data/lib/elasticsearch/api/actions/connector/delete.rb +1 -1
  32. data/lib/elasticsearch/api/actions/connector/list.rb +2 -2
  33. data/lib/elasticsearch/api/actions/connector/sync_job_list.rb +2 -2
  34. data/lib/elasticsearch/api/actions/count.rb +10 -2
  35. data/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb +1 -1
  36. data/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb +1 -1
  37. data/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb +1 -1
  38. data/lib/elasticsearch/api/actions/delete_by_query.rb +2 -2
  39. data/lib/elasticsearch/api/actions/eql/get.rb +1 -1
  40. data/lib/elasticsearch/api/actions/eql/search.rb +8 -0
  41. data/lib/elasticsearch/api/actions/esql/async_query.rb +1 -1
  42. data/lib/elasticsearch/api/actions/esql/query.rb +1 -1
  43. data/lib/elasticsearch/api/actions/explain.rb +2 -2
  44. data/lib/elasticsearch/api/actions/field_caps.rb +8 -0
  45. data/lib/elasticsearch/api/actions/fleet/search.rb +2 -6
  46. data/lib/elasticsearch/api/actions/get.rb +1 -0
  47. data/lib/elasticsearch/api/actions/get_script.rb +1 -1
  48. data/lib/elasticsearch/api/actions/graph/explore.rb +2 -6
  49. data/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb +1 -0
  50. data/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb +1 -0
  51. data/lib/elasticsearch/api/actions/indices/analyze.rb +3 -6
  52. data/lib/elasticsearch/api/actions/indices/create_from.rb +0 -1
  53. data/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb +1 -1
  54. data/lib/elasticsearch/api/actions/indices/delete_data_stream_options.rb +1 -1
  55. data/lib/elasticsearch/api/actions/indices/disk_usage.rb +1 -0
  56. data/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb +1 -1
  57. data/lib/elasticsearch/api/actions/indices/forcemerge.rb +1 -1
  58. data/lib/elasticsearch/api/actions/indices/get_data_stream_mappings.rb +75 -0
  59. data/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb +1 -0
  60. data/lib/elasticsearch/api/actions/indices/put_data_stream_mappings.rb +84 -0
  61. data/lib/elasticsearch/api/actions/indices/put_data_stream_options.rb +1 -0
  62. data/lib/elasticsearch/api/actions/indices/put_index_template.rb +1 -1
  63. data/lib/elasticsearch/api/actions/indices/put_template.rb +1 -1
  64. data/lib/elasticsearch/api/actions/indices/refresh.rb +1 -0
  65. data/lib/elasticsearch/api/actions/indices/resolve_index.rb +9 -0
  66. data/lib/elasticsearch/api/actions/indices/rollover.rb +1 -1
  67. data/lib/elasticsearch/api/actions/indices/shrink.rb +1 -0
  68. data/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +2 -1
  69. data/lib/elasticsearch/api/actions/indices/simulate_template.rb +1 -1
  70. data/lib/elasticsearch/api/actions/indices/split.rb +1 -0
  71. data/lib/elasticsearch/api/actions/indices/stats.rb +1 -1
  72. data/lib/elasticsearch/api/actions/indices/validate_query.rb +1 -1
  73. data/lib/elasticsearch/api/actions/inference/completion.rb +1 -0
  74. data/lib/elasticsearch/api/actions/inference/inference.rb +1 -0
  75. data/lib/elasticsearch/api/actions/inference/put.rb +2 -1
  76. data/lib/elasticsearch/api/actions/inference/put_ai21.rb +79 -0
  77. data/lib/elasticsearch/api/actions/inference/put_alibabacloud.rb +1 -0
  78. data/lib/elasticsearch/api/actions/inference/put_amazonbedrock.rb +1 -0
  79. data/lib/elasticsearch/api/actions/inference/put_amazonsagemaker.rb +1 -0
  80. data/lib/elasticsearch/api/actions/inference/put_anthropic.rb +1 -0
  81. data/lib/elasticsearch/api/actions/inference/put_azureaistudio.rb +1 -0
  82. data/lib/elasticsearch/api/actions/inference/put_azureopenai.rb +1 -0
  83. data/lib/elasticsearch/api/actions/inference/put_cohere.rb +1 -0
  84. data/lib/elasticsearch/api/actions/inference/put_contextualai.rb +84 -0
  85. data/lib/elasticsearch/api/actions/inference/put_custom.rb +1 -0
  86. data/lib/elasticsearch/api/actions/inference/put_deepseek.rb +1 -0
  87. data/lib/elasticsearch/api/actions/inference/put_elasticsearch.rb +1 -0
  88. data/lib/elasticsearch/api/actions/inference/put_elser.rb +1 -0
  89. data/lib/elasticsearch/api/actions/inference/put_googleaistudio.rb +1 -0
  90. data/lib/elasticsearch/api/actions/inference/put_googlevertexai.rb +1 -0
  91. data/lib/elasticsearch/api/actions/inference/put_hugging_face.rb +1 -0
  92. data/lib/elasticsearch/api/actions/inference/put_jinaai.rb +1 -0
  93. data/lib/elasticsearch/api/actions/inference/put_llama.rb +79 -0
  94. data/lib/elasticsearch/api/actions/inference/put_mistral.rb +1 -0
  95. data/lib/elasticsearch/api/actions/inference/put_openai.rb +1 -0
  96. data/lib/elasticsearch/api/actions/inference/put_voyageai.rb +1 -0
  97. data/lib/elasticsearch/api/actions/inference/put_watsonx.rb +1 -0
  98. data/lib/elasticsearch/api/actions/inference/rerank.rb +1 -0
  99. data/lib/elasticsearch/api/actions/inference/sparse_embedding.rb +1 -0
  100. data/lib/elasticsearch/api/actions/inference/stream_completion.rb +1 -0
  101. data/lib/elasticsearch/api/actions/inference/text_embedding.rb +1 -0
  102. data/lib/elasticsearch/api/actions/license/get.rb +3 -1
  103. data/lib/elasticsearch/api/actions/logstash/put_pipeline.rb +2 -1
  104. data/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb +1 -1
  105. data/lib/elasticsearch/api/actions/msearch.rb +7 -0
  106. data/lib/elasticsearch/api/actions/msearch_template.rb +8 -0
  107. data/lib/elasticsearch/api/actions/nodes/stats.rb +1 -1
  108. data/lib/elasticsearch/api/actions/open_point_in_time.rb +8 -0
  109. data/lib/elasticsearch/api/actions/project/tags.rb +65 -0
  110. data/lib/elasticsearch/api/actions/query_rules/list_rulesets.rb +1 -1
  111. data/lib/elasticsearch/api/actions/reindex.rb +1 -1
  112. data/lib/elasticsearch/api/actions/render_search_template.rb +3 -6
  113. data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +3 -6
  114. data/lib/elasticsearch/api/actions/search.rb +11 -2
  115. data/lib/elasticsearch/api/actions/search_mvt.rb +9 -1
  116. data/lib/elasticsearch/api/actions/search_template.rb +8 -0
  117. data/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb +1 -1
  118. data/lib/elasticsearch/api/actions/security/get_settings.rb +1 -1
  119. data/lib/elasticsearch/api/actions/security/get_stats.rb +62 -0
  120. data/lib/elasticsearch/api/actions/security/update_settings.rb +1 -1
  121. data/lib/elasticsearch/api/actions/simulate/ingest.rb +4 -0
  122. data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +1 -1
  123. data/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb +17 -10
  124. data/lib/elasticsearch/api/actions/snapshot/status.rb +5 -0
  125. data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb +1 -0
  126. data/lib/elasticsearch/api/actions/sql/get_async.rb +1 -1
  127. data/lib/elasticsearch/api/actions/sql/query.rb +8 -0
  128. data/lib/elasticsearch/api/actions/streams/logs_disable.rb +23 -3
  129. data/lib/elasticsearch/api/actions/streams/logs_enable.rb +26 -3
  130. data/lib/elasticsearch/api/actions/streams/status.rb +20 -3
  131. data/lib/elasticsearch/api/actions/tasks/list.rb +1 -1
  132. data/lib/elasticsearch/api/actions/terms_enum.rb +2 -6
  133. data/lib/elasticsearch/api/actions/transform/get_node_stats.rb +1 -1
  134. data/lib/elasticsearch/api/actions/update_by_query.rb +2 -2
  135. data/lib/elasticsearch/api/actions/watcher/get_settings.rb +1 -1
  136. data/lib/elasticsearch/api/actions/watcher/put_watch.rb +1 -0
  137. data/lib/elasticsearch/api/actions/watcher/update_settings.rb +1 -1
  138. data/lib/elasticsearch/api/version.rb +2 -2
  139. data/lib/elasticsearch/api.rb +1 -0
  140. metadata +9 -2
@@ -54,6 +54,7 @@ module Elasticsearch
54
54
  end
55
55
  request_opts[:defined_params] = defined_params unless defined_params.empty?
56
56
 
57
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
57
58
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
58
59
 
59
60
  unless arguments[:jinaai_inference_id]
@@ -0,0 +1,79 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+ #
18
+ # This code was automatically generated from the Elasticsearch Specification
19
+ # See https://github.com/elastic/elasticsearch-specification
20
+ # See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
21
+ module Elasticsearch
22
+ module API
23
+ module Inference
24
+ module Actions
25
+ # Create a Llama inference endpoint.
26
+ # Create an inference endpoint to perform an inference task with the `llama` service.
27
+ #
28
+ # @option arguments [String] :task_type The type of the inference task that the model will perform. (*Required*)
29
+ # @option arguments [String] :llama_inference_id The unique identifier of the inference endpoint. (*Required*)
30
+ # @option arguments [Time] :timeout Specifies the amount of time to wait for the inference endpoint to be created. Server default: 30s.
31
+ # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
32
+ # when they occur.
33
+ # @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
34
+ # returned by Elasticsearch.
35
+ # @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
36
+ # For example `"exists_time": "1h"` for humans and
37
+ # `"exists_time_in_millis": 3600000` for computers. When disabled the human
38
+ # readable values will be omitted. This makes sense for responses being consumed
39
+ # only by machines.
40
+ # @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
41
+ # this option for debugging only.
42
+ # @option arguments [Hash] :headers Custom HTTP headers
43
+ # @option arguments [Hash] :body request body
44
+ #
45
+ # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-llama
46
+ #
47
+ def put_llama(arguments = {})
48
+ request_opts = { endpoint: arguments[:endpoint] || 'inference.put_llama' }
49
+
50
+ defined_params = [:task_type, :llama_inference_id].each_with_object({}) do |variable, set_variables|
51
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
52
+ end
53
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
54
+
55
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
56
+ raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
57
+ raise ArgumentError, "Required argument 'llama_inference_id' missing" unless arguments[:llama_inference_id]
58
+
59
+ arguments = arguments.clone
60
+ headers = arguments.delete(:headers) || {}
61
+
62
+ body = arguments.delete(:body)
63
+
64
+ _task_type = arguments.delete(:task_type)
65
+
66
+ _llama_inference_id = arguments.delete(:llama_inference_id)
67
+
68
+ method = Elasticsearch::API::HTTP_PUT
69
+ path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_llama_inference_id)}"
70
+ params = Utils.process_params(arguments)
71
+
72
+ Elasticsearch::API::Response.new(
73
+ perform_request(method, path, params, body, headers, request_opts)
74
+ )
75
+ end
76
+ end
77
+ end
78
+ end
79
+ end
@@ -52,6 +52,7 @@ module Elasticsearch
52
52
  end
53
53
  request_opts[:defined_params] = defined_params unless defined_params.empty?
54
54
 
55
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
55
56
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
56
57
 
57
58
  unless arguments[:mistral_inference_id]
@@ -53,6 +53,7 @@ module Elasticsearch
53
53
  end
54
54
  request_opts[:defined_params] = defined_params unless defined_params.empty?
55
55
 
56
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
56
57
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
57
58
 
58
59
  unless arguments[:openai_inference_id]
@@ -53,6 +53,7 @@ module Elasticsearch
53
53
  end
54
54
  request_opts[:defined_params] = defined_params unless defined_params.empty?
55
55
 
56
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
56
57
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
57
58
 
58
59
  unless arguments[:voyageai_inference_id]
@@ -54,6 +54,7 @@ module Elasticsearch
54
54
  end
55
55
  request_opts[:defined_params] = defined_params unless defined_params.empty?
56
56
 
57
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
57
58
  raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
58
59
 
59
60
  unless arguments[:watsonx_inference_id]
@@ -50,6 +50,7 @@ module Elasticsearch
50
50
  end
51
51
  request_opts[:defined_params] = defined_params unless defined_params.empty?
52
52
 
53
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
53
54
  raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id]
54
55
 
55
56
  arguments = arguments.clone
@@ -50,6 +50,7 @@ module Elasticsearch
50
50
  end
51
51
  request_opts[:defined_params] = defined_params unless defined_params.empty?
52
52
 
53
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
53
54
  raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id]
54
55
 
55
56
  arguments = arguments.clone
@@ -54,6 +54,7 @@ module Elasticsearch
54
54
  end
55
55
  request_opts[:defined_params] = defined_params unless defined_params.empty?
56
56
 
57
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
57
58
  raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id]
58
59
 
59
60
  arguments = arguments.clone
@@ -50,6 +50,7 @@ module Elasticsearch
50
50
  end
51
51
  request_opts[:defined_params] = defined_params unless defined_params.empty?
52
52
 
53
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
53
54
  raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id]
54
55
 
55
56
  arguments = arguments.clone
@@ -27,7 +27,9 @@ module Elasticsearch
27
27
  #
28
28
  # @option arguments [Boolean] :accept_enterprise If `true`, this parameter returns enterprise for Enterprise license types. If `false`, this parameter returns platinum for both platinum and enterprise license types. This behavior is maintained for backwards compatibility.
29
29
  # This parameter is deprecated and will always be set to true in 8.x. Server default: true.
30
- # @option arguments [Boolean] :local Specifies whether to retrieve local information. The default value is `false`, which means the information is retrieved from the master node.
30
+ # @option arguments [Boolean] :local Specifies whether to retrieve local information.
31
+ # From 9.2 onwards the default value is `true`, which means the information is retrieved from the responding node.
32
+ # In earlier versions the default is `false`, which means the information is retrieved from the elected master node. Server default: true.
31
33
  # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
32
34
  # when they occur.
33
35
  # @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
@@ -26,7 +26,8 @@ module Elasticsearch
26
26
  # Create a pipeline that is used for Logstash Central Management.
27
27
  # If the specified pipeline exists, it is replaced.
28
28
  #
29
- # @option arguments [String] :id An identifier for the pipeline. (*Required*)
29
+ # @option arguments [String] :id An identifier for the pipeline.
30
+ # Pipeline IDs must begin with a letter or underscore and contain only letters, underscores, dashes, hyphens and numbers. (*Required*)
30
31
  # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
31
32
  # when they occur.
32
33
  # @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
@@ -59,7 +59,7 @@ module Elasticsearch
59
59
  # the optional `bucket_span` parameter.
60
60
  # @option arguments [String, Time] :end Returns overall buckets with timestamps earlier than this time.
61
61
  # @option arguments [Boolean] :exclude_interim If `true`, the output excludes interim results.
62
- # @option arguments [Float, String] :overall_score Returns overall buckets with overall scores greater than or equal to this
62
+ # @option arguments [Float] :overall_score Returns overall buckets with overall scores greater than or equal to this
63
63
  # value.
64
64
  # @option arguments [String, Time] :start Returns overall buckets with timestamps after this time.
65
65
  # @option arguments [Integer] :top_n The number of top anomaly detection job bucket scores to be used in the
@@ -57,6 +57,13 @@ module Elasticsearch
57
57
  # Defaults to `max(1, (# of data nodes * min(search thread pool size, 10)))`.
58
58
  # @option arguments [Integer] :max_concurrent_shard_requests Maximum number of concurrent shard requests that each sub-search request executes per node. Server default: 5.
59
59
  # @option arguments [Integer] :pre_filter_shard_size Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint.
60
+ # @option arguments [String] :project_routing Specifies a subset of projects to target for a search using project metadata
61
+ # tags in a subset Lucene syntax. Allowed Lucene queries: the _alias tag
62
+ # and a single value (possible wildcarded). Examples:
63
+ # _alias:my-project
64
+ # _alias:_origin
65
+ # _alias:*pr*
66
+ # Supported in serverless only.
60
67
  # @option arguments [Boolean] :rest_total_hits_as_int If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object.
61
68
  # @option arguments [String] :routing Custom routing value used to route search operations to a specific shard.
62
69
  # @option arguments [String] :search_type Indicates whether global term and document frequencies should be used when scoring returned documents.
@@ -40,6 +40,14 @@ module Elasticsearch
40
40
  # To search all data streams and indices, omit this parameter or use `*`.
41
41
  # @option arguments [Boolean] :ccs_minimize_roundtrips If `true`, network round-trips are minimized for cross-cluster search requests. Server default: true.
42
42
  # @option arguments [Integer] :max_concurrent_searches The maximum number of concurrent searches the API can run.
43
+ # @option arguments [String] :project_routing Specifies a subset of projects to target for the search using project
44
+ # metadata tags in a subset of Lucene query syntax.
45
+ # Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded).
46
+ # Examples:
47
+ # _alias:my-project
48
+ # _alias:_origin
49
+ # _alias:*pr*
50
+ # Supported in serverless only.
43
51
  # @option arguments [String] :search_type The type of the search operation.
44
52
  # @option arguments [Boolean] :rest_total_hits_as_int If `true`, the response returns `hits.total` as an integer.
45
53
  # If `false`, it returns `hits.total` as an object.
@@ -34,7 +34,7 @@ module Elasticsearch
34
34
  # @option arguments [String, Array<String>] :fields Comma-separated list or wildcard expressions of fields to include in the statistics.
35
35
  # @option arguments [Boolean] :groups Comma-separated list of search groups to include in the search statistics.
36
36
  # @option arguments [Boolean] :include_segment_file_sizes If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested).
37
- # @option arguments [String] :level Indicates whether statistics are aggregated at the cluster, index, or shard level.
37
+ # @option arguments [String] :level Indicates whether statistics are aggregated at the node, indices, or shards level. Server default: node.
38
38
  # @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
39
39
  # @option arguments [Array<String>] :types A comma-separated list of document types for the indexing index metric.
40
40
  # @option arguments [Boolean] :include_unloaded_segments If `true`, the response includes information from segments that are not loaded into memory.
@@ -53,6 +53,14 @@ module Elasticsearch
53
53
  # @option arguments [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index.
54
54
  # @option arguments [String] :preference The node or shard the operation should be performed on.
55
55
  # By default, it is random.
56
+ # @option arguments [String] :project_routing Specifies a subset of projects to target for the PIT request using project
57
+ # metadata tags in a subset of Lucene query syntax.
58
+ # Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded).
59
+ # Examples:
60
+ # _alias:my-project
61
+ # _alias:_origin
62
+ # _alias:*pr*
63
+ # Supported in serverless only.
56
64
  # @option arguments [String] :routing A custom value that is used to route operations to a specific shard.
57
65
  # @option arguments [String, Array<String>] :expand_wildcards The type of index that wildcard patterns can match.
58
66
  # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
@@ -0,0 +1,65 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+ #
18
+ # This code was automatically generated from the Elasticsearch Specification
19
+ # See https://github.com/elastic/elasticsearch-specification
20
+ # See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
21
+ module Elasticsearch
22
+ module API
23
+ module Project
24
+ module Actions
25
+ # Return tags defined for the project
26
+ # This functionality is Experimental and may be changed or removed
27
+ # completely in a future release. Elastic will take a best effort approach
28
+ # to fix any issues, but experimental features are not subject to the
29
+ # support SLA of official GA features.
30
+ #
31
+ # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
32
+ # when they occur.
33
+ # @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
34
+ # returned by Elasticsearch.
35
+ # @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
36
+ # For example `"exists_time": "1h"` for humans and
37
+ # `"exists_time_in_millis": 3600000` for computers. When disabled the human
38
+ # readable values will be omitted. This makes sense for responses being consumed
39
+ # only by machines.
40
+ # @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
41
+ # this option for debugging only.
42
+ # @option arguments [Hash] :headers Custom HTTP headers
43
+ #
44
+ # @see
45
+ #
46
+ def tags(arguments = {})
47
+ request_opts = { endpoint: arguments[:endpoint] || 'project.tags' }
48
+
49
+ arguments = arguments.clone
50
+ headers = arguments.delete(:headers) || {}
51
+
52
+ body = nil
53
+
54
+ method = Elasticsearch::API::HTTP_GET
55
+ path = '_project/tags'
56
+ params = Utils.process_params(arguments)
57
+
58
+ Elasticsearch::API::Response.new(
59
+ perform_request(method, path, params, body, headers, request_opts)
60
+ )
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
@@ -26,7 +26,7 @@ module Elasticsearch
26
26
  # Get summarized information about the query rulesets.
27
27
  #
28
28
  # @option arguments [Integer] :from The offset from the first result to fetch. Server default: 0.
29
- # @option arguments [Integer] :size The maximum number of results to retrieve.
29
+ # @option arguments [Integer] :size The maximum number of results to retrieve. Server default: 100.
30
30
  # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
31
31
  # when they occur.
32
32
  # @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
@@ -61,7 +61,7 @@ module Elasticsearch
61
61
  # @option arguments [Boolean] :refresh If `true`, the request refreshes affected shards to make this operation visible to search.
62
62
  # @option arguments [Float] :requests_per_second The throttle for this request in sub-requests per second.
63
63
  # By default, there is no throttle. Server default: -1.
64
- # @option arguments [Time] :scroll The period of time that a consistent view of the index should be maintained for scrolled search.
64
+ # @option arguments [Time] :scroll The period of time that a consistent view of the index should be maintained for scrolled search. Server default: 5m.
65
65
  # @option arguments [Integer, String] :slices The number of slices this task should be divided into.
66
66
  # It defaults to one slice, which means the task isn't sliced into subtasks.Reindex supports sliced scroll to parallelize the reindexing process.
67
67
  # This parallelization can improve efficiency and provide a convenient way to break the request down into smaller parts.NOTE: Reindexing from remote clusters does not support manual or automatic slicing.If set to `auto`, Elasticsearch chooses the number of slices to use.
@@ -50,6 +50,8 @@ module Elasticsearch
50
50
  end
51
51
  request_opts[:defined_params] = defined_params unless defined_params.empty?
52
52
 
53
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
54
+
53
55
  arguments = arguments.clone
54
56
  headers = arguments.delete(:headers) || {}
55
57
 
@@ -57,12 +59,7 @@ module Elasticsearch
57
59
 
58
60
  _id = arguments.delete(:id)
59
61
 
60
- method = if body
61
- Elasticsearch::API::HTTP_POST
62
- else
63
- Elasticsearch::API::HTTP_GET
64
- end
65
-
62
+ method = Elasticsearch::API::HTTP_POST
66
63
  path = if _id
67
64
  "_render/template/#{Utils.listify(_id)}"
68
65
  else
@@ -51,17 +51,14 @@ module Elasticsearch
51
51
  def scripts_painless_execute(arguments = {})
52
52
  request_opts = { endpoint: arguments[:endpoint] || 'scripts_painless_execute' }
53
53
 
54
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
55
+
54
56
  arguments = arguments.clone
55
57
  headers = arguments.delete(:headers) || {}
56
58
 
57
59
  body = arguments.delete(:body)
58
60
 
59
- method = if body
60
- Elasticsearch::API::HTTP_POST
61
- else
62
- Elasticsearch::API::HTTP_GET
63
- end
64
-
61
+ method = Elasticsearch::API::HTTP_POST
65
62
  path = '_scripts/painless/_execute'
66
63
  params = Utils.process_params(arguments)
67
64
 
@@ -51,8 +51,8 @@ module Elasticsearch
51
51
  # @option arguments [Integer] :batched_reduce_size The number of shard results that should be reduced at once on the coordinating node.
52
52
  # If the potential number of shards in the request can be large, this value should be used as a protection mechanism to reduce the memory overhead per search request. Server default: 512.
53
53
  # @option arguments [Boolean] :ccs_minimize_roundtrips If `true`, network round-trips between the coordinating node and the remote clusters are minimized when running cross-cluster search (CCS) requests. Server default: true.
54
- # @option arguments [String] :default_operator The default operator for the query string query: `AND` or `OR`.
55
- # This parameter can be used only when the `q` query string parameter is specified. Server default: OR.
54
+ # @option arguments [String] :default_operator The default operator for the query string query: `and` or `or`.
55
+ # This parameter can be used only when the `q` query string parameter is specified. Server default: or.
56
56
  # @option arguments [String] :df The field to use as a default when no field prefix is given in the query string.
57
57
  # This parameter can be used only when the `q` query string parameter is specified.
58
58
  # @option arguments [String, Array<String>] :docvalue_fields A comma-separated list of fields to return as the docvalue representation of a field for each hit.
@@ -84,6 +84,14 @@ module Elasticsearch
84
84
  # - The request targets more than 128 shards.
85
85
  # - The request targets one or more read-only index.
86
86
  # - The primary sort of the query targets an indexed field.
87
+ # @option arguments [String] :project_routing Specifies a subset of projects to target for the search using project
88
+ # metadata tags in a subset of Lucene query syntax.
89
+ # Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded).
90
+ # Examples:
91
+ # _alias:my-project
92
+ # _alias:_origin
93
+ # _alias:*pr*
94
+ # Supported in serverless only.
87
95
  # @option arguments [Boolean] :request_cache If `true`, the caching of search results is enabled for requests where `size` is `0`.
88
96
  # It defaults to index level settings.
89
97
  # @option arguments [String] :routing A custom value that is used to route operations to a specific shard.
@@ -129,6 +137,7 @@ module Elasticsearch
129
137
  # @option arguments [String, Array<String>] :_source_excludes A comma-separated list of source fields to exclude from the response.
130
138
  # You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.
131
139
  # If the `_source` parameter is `false`, this parameter is ignored.
140
+ # @option arguments [Boolean] :_source_exclude_vectors Whether vectors should be excluded from _source
132
141
  # @option arguments [String, Array<String>] :_source_includes A comma-separated list of source fields to include in the response.
133
142
  # If this parameter is specified, only these source fields are returned.
134
143
  # You can exclude fields from this subset using the `_source_excludes` query parameter.
@@ -107,7 +107,7 @@ module Elasticsearch
107
107
  # the <zoom>/<x>/<y> tile with wrap_longitude set to false. The resulting
108
108
  # bounding box may be larger than the vector tile.
109
109
  # @option arguments [Integer] :extent The size, in pixels, of a side of the tile. Vector tiles are square with equal sides. Server default: 4096.
110
- # @option arguments [String] :grid_agg Aggregation used to create a grid for `field`.
110
+ # @option arguments [String] :grid_agg Aggregation used to create a grid for `field`. Server default: geotile.
111
111
  # @option arguments [Integer] :grid_precision Additional zoom levels available through the aggs layer. For example, if <zoom> is 7
112
112
  # and grid_precision is 8, you can zoom in up to level 15. Accepts 0-8. If 0, results
113
113
  # don't include the aggs layer. Server default: 8.
@@ -115,6 +115,14 @@ module Elasticsearch
115
115
  # each feature represents a geotile_grid cell. If 'grid' each feature is a Polygon
116
116
  # of the cells bounding box. If 'point' each feature is a Point that is the centroid
117
117
  # of the cell. Server default: grid.
118
+ # @option arguments [String] :project_routing Specifies a subset of projects to target for the search using project
119
+ # metadata tags in a subset of Lucene query syntax.
120
+ # Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded).
121
+ # Examples:
122
+ # _alias:my-project
123
+ # _alias:_origin
124
+ # _alias:*pr*
125
+ # Supported in serverless only.
118
126
  # @option arguments [Integer] :size Maximum number of features to return in the hits layer. Accepts 0-10000.
119
127
  # If 0, results don't include the hits layer. Server default: 10000.
120
128
  # @option arguments [Boolean, Integer] :track_total_hits The number of hits matching the query to count accurately.
@@ -38,6 +38,14 @@ module Elasticsearch
38
38
  # @option arguments [String] :preference The node or shard the operation should be performed on.
39
39
  # It is random by default.
40
40
  # @option arguments [Boolean] :profile If `true`, the query execution is profiled.
41
+ # @option arguments [String] :project_routing Specifies a subset of projects to target for the search using project
42
+ # metadata tags in a subset of Lucene query syntax.
43
+ # Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded).
44
+ # Examples:
45
+ # _alias:my-project
46
+ # _alias:_origin
47
+ # _alias:*pr*
48
+ # Supported in serverless only.
41
49
  # @option arguments [String] :routing A custom value used to route operations to a specific shard.
42
50
  # @option arguments [Time] :scroll Specifies how long a consistent view of the index
43
51
  # should be maintained for scrolled search.
@@ -25,7 +25,7 @@ module Elasticsearch
25
25
  # Get searchable snapshot statistics.
26
26
  #
27
27
  # @option arguments [String, Array] :index A comma-separated list of data streams and indices to retrieve statistics for.
28
- # @option arguments [String] :level Return stats aggregated at cluster, index or shard level
28
+ # @option arguments [String] :level Return stats aggregated at cluster, index or shard level Server default: indices.
29
29
  # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
30
30
  # when they occur.
31
31
  # @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
@@ -30,7 +30,7 @@ module Elasticsearch
30
30
  # * `index.number_of_replicas`
31
31
  #
32
32
  # @option arguments [Time] :master_timeout Period to wait for a connection to the master node.
33
- # If no response is received before the timeout expires, the request fails and returns an error.
33
+ # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
34
34
  # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
35
35
  # when they occur.
36
36
  # @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
@@ -0,0 +1,62 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+ #
18
+ # This code was automatically generated from the Elasticsearch Specification
19
+ # See https://github.com/elastic/elasticsearch-specification
20
+ # See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
21
+ module Elasticsearch
22
+ module API
23
+ module Security
24
+ module Actions
25
+ # Get security stats.
26
+ # Gather security usage statistics from all node(s) within the cluster.
27
+ #
28
+ # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
29
+ # when they occur.
30
+ # @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
31
+ # returned by Elasticsearch.
32
+ # @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
33
+ # For example `"exists_time": "1h"` for humans and
34
+ # `"exists_time_in_millis": 3600000` for computers. When disabled the human
35
+ # readable values will be omitted. This makes sense for responses being consumed
36
+ # only by machines.
37
+ # @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
38
+ # this option for debugging only.
39
+ # @option arguments [Hash] :headers Custom HTTP headers
40
+ #
41
+ # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-stats
42
+ #
43
+ def get_stats(arguments = {})
44
+ request_opts = { endpoint: arguments[:endpoint] || 'security.get_stats' }
45
+
46
+ arguments = arguments.clone
47
+ headers = arguments.delete(:headers) || {}
48
+
49
+ body = nil
50
+
51
+ method = Elasticsearch::API::HTTP_GET
52
+ path = '_security/stats'
53
+ params = Utils.process_params(arguments)
54
+
55
+ Elasticsearch::API::Response.new(
56
+ perform_request(method, path, params, body, headers, request_opts)
57
+ )
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
@@ -29,7 +29,7 @@ module Elasticsearch
29
29
  # This API does not yet support configuring the settings for indices before they are in use.
30
30
  #
31
31
  # @option arguments [Time] :master_timeout The period to wait for a connection to the master node.
32
- # If no response is received before the timeout expires, the request fails and returns an error.
32
+ # If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
33
33
  # @option arguments [Time] :timeout The period to wait for a response.
34
34
  # If no response is received before the timeout expires, the request fails and returns an error.
35
35
  # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
@@ -45,6 +45,10 @@ module Elasticsearch
45
45
  # If you specify this parameter in the request path, it is used for any documents that do not explicitly specify an index argument.
46
46
  # @option arguments [String] :pipeline The pipeline to use as the default pipeline.
47
47
  # This value can be used to override the default pipeline of the index.
48
+ # @option arguments [String] :merge_type The mapping merge type if mapping overrides are being provided in mapping_addition.
49
+ # The allowed values are one of index or template.
50
+ # The index option merges mappings the way they would be merged into an existing index.
51
+ # The template option merges mappings the way they would be merged into a template. Server default: index.
48
52
  # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
49
53
  # when they occur.
50
54
  # @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
@@ -30,7 +30,7 @@ module Elasticsearch
30
30
  # If `false`, the request gets information from the master node.
31
31
  # @option arguments [Time] :master_timeout The period to wait for the master node.
32
32
  # If the master node is not available before the timeout expires, the request fails and returns an error.
33
- # To indicate that the request should never timeout, set it to `-1`. Server default: to 30s.
33
+ # To indicate that the request should never timeout, set it to `-1`. Server default: 30s.
34
34
  # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
35
35
  # when they occur.
36
36
  # @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response