elasticsearch-serverless 0.0.8.20231031.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (211) hide show
  1. checksums.yaml +7 -0
  2. data/lib/elasticsearch-serverless/api/async_search/delete.rb +53 -0
  3. data/lib/elasticsearch-serverless/api/async_search/get.rb +56 -0
  4. data/lib/elasticsearch-serverless/api/async_search/status.rb +53 -0
  5. data/lib/elasticsearch-serverless/api/async_search/submit.rb +102 -0
  6. data/lib/elasticsearch-serverless/api/bulk.rb +72 -0
  7. data/lib/elasticsearch-serverless/api/cat/aliases.rb +64 -0
  8. data/lib/elasticsearch-serverless/api/cat/component_templates.rb +62 -0
  9. data/lib/elasticsearch-serverless/api/cat/count.rb +63 -0
  10. data/lib/elasticsearch-serverless/api/cat/help.rb +55 -0
  11. data/lib/elasticsearch-serverless/api/cat/indices.rb +69 -0
  12. data/lib/elasticsearch-serverless/api/cat/ml_data_frame_analytics.rb +67 -0
  13. data/lib/elasticsearch-serverless/api/cat/ml_datafeeds.rb +66 -0
  14. data/lib/elasticsearch-serverless/api/cat/ml_jobs.rb +67 -0
  15. data/lib/elasticsearch-serverless/api/cat/ml_trained_models.rb +68 -0
  16. data/lib/elasticsearch-serverless/api/cat/transforms.rb +68 -0
  17. data/lib/elasticsearch-serverless/api/clear_scroll.rb +67 -0
  18. data/lib/elasticsearch-serverless/api/close_point_in_time.rb +47 -0
  19. data/lib/elasticsearch-serverless/api/cluster/delete_component_template.rb +55 -0
  20. data/lib/elasticsearch-serverless/api/cluster/exists_component_template.rb +57 -0
  21. data/lib/elasticsearch-serverless/api/cluster/get_component_template.rb +59 -0
  22. data/lib/elasticsearch-serverless/api/cluster/info.rb +53 -0
  23. data/lib/elasticsearch-serverless/api/cluster/put_component_template.rb +57 -0
  24. data/lib/elasticsearch-serverless/api/count.rb +73 -0
  25. data/lib/elasticsearch-serverless/api/create.rb +51 -0
  26. data/lib/elasticsearch-serverless/api/delete.rb +71 -0
  27. data/lib/elasticsearch-serverless/api/delete_by_query.rb +82 -0
  28. data/lib/elasticsearch-serverless/api/delete_script.rb +53 -0
  29. data/lib/elasticsearch-serverless/api/enrich/delete_policy.rb +53 -0
  30. data/lib/elasticsearch-serverless/api/enrich/execute_policy.rb +54 -0
  31. data/lib/elasticsearch-serverless/api/enrich/get_policy.rb +55 -0
  32. data/lib/elasticsearch-serverless/api/enrich/put_policy.rb +55 -0
  33. data/lib/elasticsearch-serverless/api/enrich/stats.rb +48 -0
  34. data/lib/elasticsearch-serverless/api/eql/delete.rb +53 -0
  35. data/lib/elasticsearch-serverless/api/eql/get.rb +55 -0
  36. data/lib/elasticsearch-serverless/api/eql/get_status.rb +53 -0
  37. data/lib/elasticsearch-serverless/api/eql/search.rb +61 -0
  38. data/lib/elasticsearch-serverless/api/exists.rb +67 -0
  39. data/lib/elasticsearch-serverless/api/exists_source.rb +66 -0
  40. data/lib/elasticsearch-serverless/api/explain.rb +73 -0
  41. data/lib/elasticsearch-serverless/api/field_caps.rb +66 -0
  42. data/lib/elasticsearch-serverless/api/get.rb +73 -0
  43. data/lib/elasticsearch-serverless/api/get_script.rb +52 -0
  44. data/lib/elasticsearch-serverless/api/get_source.rb +65 -0
  45. data/lib/elasticsearch-serverless/api/graph/explore.rb +61 -0
  46. data/lib/elasticsearch-serverless/api/index.rb +71 -0
  47. data/lib/elasticsearch-serverless/api/indices/add_block.rb +62 -0
  48. data/lib/elasticsearch-serverless/api/indices/analyze.rb +61 -0
  49. data/lib/elasticsearch-serverless/api/indices/create.rb +57 -0
  50. data/lib/elasticsearch-serverless/api/indices/create_data_stream.rb +53 -0
  51. data/lib/elasticsearch-serverless/api/indices/data_streams_stats.rb +56 -0
  52. data/lib/elasticsearch-serverless/api/indices/delete.rb +66 -0
  53. data/lib/elasticsearch-serverless/api/indices/delete_alias.rb +61 -0
  54. data/lib/elasticsearch-serverless/api/indices/delete_data_lifecycle.rb +56 -0
  55. data/lib/elasticsearch-serverless/api/indices/delete_data_stream.rb +54 -0
  56. data/lib/elasticsearch-serverless/api/indices/delete_index_template.rb +55 -0
  57. data/lib/elasticsearch-serverless/api/indices/exists.rb +61 -0
  58. data/lib/elasticsearch-serverless/api/indices/exists_alias.rb +66 -0
  59. data/lib/elasticsearch-serverless/api/indices/exists_index_template.rb +56 -0
  60. data/lib/elasticsearch-serverless/api/indices/explain_data_lifecycle.rb +55 -0
  61. data/lib/elasticsearch-serverless/api/indices/get.rb +61 -0
  62. data/lib/elasticsearch-serverless/api/indices/get_alias.rb +66 -0
  63. data/lib/elasticsearch-serverless/api/indices/get_data_lifecycle.rb +55 -0
  64. data/lib/elasticsearch-serverless/api/indices/get_data_stream.rb +57 -0
  65. data/lib/elasticsearch-serverless/api/indices/get_index_template.rb +59 -0
  66. data/lib/elasticsearch-serverless/api/indices/get_mapping.rb +60 -0
  67. data/lib/elasticsearch-serverless/api/indices/get_settings.rb +69 -0
  68. data/lib/elasticsearch-serverless/api/indices/migrate_to_data_stream.rb +53 -0
  69. data/lib/elasticsearch-serverless/api/indices/modify_data_stream.rb +51 -0
  70. data/lib/elasticsearch-serverless/api/indices/put_alias.rb +62 -0
  71. data/lib/elasticsearch-serverless/api/indices/put_data_lifecycle.rb +57 -0
  72. data/lib/elasticsearch-serverless/api/indices/put_index_template.rb +56 -0
  73. data/lib/elasticsearch-serverless/api/indices/put_mapping.rb +61 -0
  74. data/lib/elasticsearch-serverless/api/indices/put_settings.rb +65 -0
  75. data/lib/elasticsearch-serverless/api/indices/put_template.rb +60 -0
  76. data/lib/elasticsearch-serverless/api/indices/refresh.rb +58 -0
  77. data/lib/elasticsearch-serverless/api/indices/resolve_index.rb +54 -0
  78. data/lib/elasticsearch-serverless/api/indices/rollover.rb +66 -0
  79. data/lib/elasticsearch-serverless/api/indices/simulate_index_template.rb +57 -0
  80. data/lib/elasticsearch-serverless/api/indices/simulate_template.rb +59 -0
  81. data/lib/elasticsearch-serverless/api/indices/update_aliases.rb +53 -0
  82. data/lib/elasticsearch-serverless/api/indices/validate_query.rb +73 -0
  83. data/lib/elasticsearch-serverless/api/info.rb +46 -0
  84. data/lib/elasticsearch-serverless/api/ingest/delete_pipeline.rb +55 -0
  85. data/lib/elasticsearch-serverless/api/ingest/get_pipeline.rb +57 -0
  86. data/lib/elasticsearch-serverless/api/ingest/processor_grok.rb +48 -0
  87. data/lib/elasticsearch-serverless/api/ingest/put_pipeline.rb +58 -0
  88. data/lib/elasticsearch-serverless/api/ingest/simulate.rb +59 -0
  89. data/lib/elasticsearch-serverless/api/license/get.rb +50 -0
  90. data/lib/elasticsearch-serverless/api/logstash/delete_pipeline.rb +53 -0
  91. data/lib/elasticsearch-serverless/api/logstash/get_pipeline.rb +55 -0
  92. data/lib/elasticsearch-serverless/api/logstash/put_pipeline.rb +55 -0
  93. data/lib/elasticsearch-serverless/api/machine_learning/close_job.rb +57 -0
  94. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar.rb +53 -0
  95. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_event.rb +57 -0
  96. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_job.rb +57 -0
  97. data/lib/elasticsearch-serverless/api/machine_learning/delete_data_frame_analytics.rb +55 -0
  98. data/lib/elasticsearch-serverless/api/machine_learning/delete_datafeed.rb +54 -0
  99. data/lib/elasticsearch-serverless/api/machine_learning/delete_filter.rb +53 -0
  100. data/lib/elasticsearch-serverless/api/machine_learning/delete_job.rb +56 -0
  101. data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model.rb +54 -0
  102. data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model_alias.rb +57 -0
  103. data/lib/elasticsearch-serverless/api/machine_learning/estimate_model_memory.rb +51 -0
  104. data/lib/elasticsearch-serverless/api/machine_learning/evaluate_data_frame.rb +51 -0
  105. data/lib/elasticsearch-serverless/api/machine_learning/flush_job.rb +59 -0
  106. data/lib/elasticsearch-serverless/api/machine_learning/get_calendar_events.rb +58 -0
  107. data/lib/elasticsearch-serverless/api/machine_learning/get_calendars.rb +63 -0
  108. data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb +59 -0
  109. data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics_stats.rb +59 -0
  110. data/lib/elasticsearch-serverless/api/machine_learning/get_datafeed_stats.rb +56 -0
  111. data/lib/elasticsearch-serverless/api/machine_learning/get_datafeeds.rb +57 -0
  112. data/lib/elasticsearch-serverless/api/machine_learning/get_filters.rb +57 -0
  113. data/lib/elasticsearch-serverless/api/machine_learning/get_job_stats.rb +56 -0
  114. data/lib/elasticsearch-serverless/api/machine_learning/get_jobs.rb +57 -0
  115. data/lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb +66 -0
  116. data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb +62 -0
  117. data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb +58 -0
  118. data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +63 -0
  119. data/lib/elasticsearch-serverless/api/machine_learning/open_job.rb +55 -0
  120. data/lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb +55 -0
  121. data/lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb +61 -0
  122. data/lib/elasticsearch-serverless/api/machine_learning/preview_datafeed.rb +63 -0
  123. data/lib/elasticsearch-serverless/api/machine_learning/put_calendar.rb +54 -0
  124. data/lib/elasticsearch-serverless/api/machine_learning/put_calendar_job.rb +57 -0
  125. data/lib/elasticsearch-serverless/api/machine_learning/put_data_frame_analytics.rb +55 -0
  126. data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +59 -0
  127. data/lib/elasticsearch-serverless/api/machine_learning/put_filter.rb +55 -0
  128. data/lib/elasticsearch-serverless/api/machine_learning/put_job.rb +55 -0
  129. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model.rb +56 -0
  130. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_alias.rb +58 -0
  131. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_definition_part.rb +59 -0
  132. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_vocabulary.rb +55 -0
  133. data/lib/elasticsearch-serverless/api/machine_learning/reset_job.rb +55 -0
  134. data/lib/elasticsearch-serverless/api/machine_learning/start_data_frame_analytics.rb +54 -0
  135. data/lib/elasticsearch-serverless/api/machine_learning/start_datafeed.rb +57 -0
  136. data/lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb +60 -0
  137. data/lib/elasticsearch-serverless/api/machine_learning/stop_data_frame_analytics.rb +56 -0
  138. data/lib/elasticsearch-serverless/api/machine_learning/stop_datafeed.rb +57 -0
  139. data/lib/elasticsearch-serverless/api/machine_learning/stop_trained_model_deployment.rb +55 -0
  140. data/lib/elasticsearch-serverless/api/machine_learning/update_data_frame_analytics.rb +55 -0
  141. data/lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb +59 -0
  142. data/lib/elasticsearch-serverless/api/machine_learning/update_filter.rb +55 -0
  143. data/lib/elasticsearch-serverless/api/machine_learning/update_job.rb +55 -0
  144. data/lib/elasticsearch-serverless/api/mget.rb +64 -0
  145. data/lib/elasticsearch-serverless/api/msearch.rb +91 -0
  146. data/lib/elasticsearch-serverless/api/msearch_template.rb +72 -0
  147. data/lib/elasticsearch-serverless/api/mtermvectors.rb +75 -0
  148. data/lib/elasticsearch-serverless/api/open_point_in_time.rb +56 -0
  149. data/lib/elasticsearch-serverless/api/ping.rb +52 -0
  150. data/lib/elasticsearch-serverless/api/put_script.rb +62 -0
  151. data/lib/elasticsearch-serverless/api/query_ruleset/delete.rb +57 -0
  152. data/lib/elasticsearch-serverless/api/query_ruleset/get.rb +57 -0
  153. data/lib/elasticsearch-serverless/api/query_ruleset/list.rb +54 -0
  154. data/lib/elasticsearch-serverless/api/query_ruleset/put.rb +59 -0
  155. data/lib/elasticsearch-serverless/api/rank_eval.rb +60 -0
  156. data/lib/elasticsearch-serverless/api/reindex.rb +59 -0
  157. data/lib/elasticsearch-serverless/api/render_search_template.rb +59 -0
  158. data/lib/elasticsearch-serverless/api/response.rb +48 -0
  159. data/lib/elasticsearch-serverless/api/scripts_painless_execute.rb +56 -0
  160. data/lib/elasticsearch-serverless/api/scroll.rb +66 -0
  161. data/lib/elasticsearch-serverless/api/search.rb +102 -0
  162. data/lib/elasticsearch-serverless/api/search_application/delete.rb +57 -0
  163. data/lib/elasticsearch-serverless/api/search_application/delete_behavioral_analytics.rb +57 -0
  164. data/lib/elasticsearch-serverless/api/search_application/get.rb +57 -0
  165. data/lib/elasticsearch-serverless/api/search_application/get_behavioral_analytics.rb +59 -0
  166. data/lib/elasticsearch-serverless/api/search_application/list.rb +55 -0
  167. data/lib/elasticsearch-serverless/api/search_application/put.rb +60 -0
  168. data/lib/elasticsearch-serverless/api/search_application/put_behavioral_analytics.rb +57 -0
  169. data/lib/elasticsearch-serverless/api/search_application/search.rb +63 -0
  170. data/lib/elasticsearch-serverless/api/search_mvt.rb +75 -0
  171. data/lib/elasticsearch-serverless/api/search_template.rb +69 -0
  172. data/lib/elasticsearch-serverless/api/security/authenticate.rb +48 -0
  173. data/lib/elasticsearch-serverless/api/security/create_api_key.rb +52 -0
  174. data/lib/elasticsearch-serverless/api/security/get_api_key.rb +54 -0
  175. data/lib/elasticsearch-serverless/api/security/has_privileges.rb +58 -0
  176. data/lib/elasticsearch-serverless/api/security/invalidate_api_key.rb +51 -0
  177. data/lib/elasticsearch-serverless/api/security/query_api_keys.rb +55 -0
  178. data/lib/elasticsearch-serverless/api/security/update_api_key.rb +54 -0
  179. data/lib/elasticsearch-serverless/api/sql/clear_cursor.rb +51 -0
  180. data/lib/elasticsearch-serverless/api/sql/delete_async.rb +53 -0
  181. data/lib/elasticsearch-serverless/api/sql/get_async.rb +57 -0
  182. data/lib/elasticsearch-serverless/api/sql/get_async_status.rb +53 -0
  183. data/lib/elasticsearch-serverless/api/sql/query.rb +52 -0
  184. data/lib/elasticsearch-serverless/api/sql/translate.rb +51 -0
  185. data/lib/elasticsearch-serverless/api/synonyms/delete_synonym.rb +57 -0
  186. data/lib/elasticsearch-serverless/api/synonyms/delete_synonym_rule.rb +61 -0
  187. data/lib/elasticsearch-serverless/api/synonyms/get_synonym.rb +59 -0
  188. data/lib/elasticsearch-serverless/api/synonyms/get_synonym_rule.rb +61 -0
  189. data/lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb +54 -0
  190. data/lib/elasticsearch-serverless/api/synonyms/put_synonym.rb +59 -0
  191. data/lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb +63 -0
  192. data/lib/elasticsearch-serverless/api/tasks/get.rb +57 -0
  193. data/lib/elasticsearch-serverless/api/terms_enum.rb +57 -0
  194. data/lib/elasticsearch-serverless/api/termvectors.rb +82 -0
  195. data/lib/elasticsearch-serverless/api/transform/delete_transform.rb +55 -0
  196. data/lib/elasticsearch-serverless/api/transform/get_transform.rb +59 -0
  197. data/lib/elasticsearch-serverless/api/transform/get_transform_stats.rb +57 -0
  198. data/lib/elasticsearch-serverless/api/transform/preview_transform.rb +62 -0
  199. data/lib/elasticsearch-serverless/api/transform/put_transform.rb +57 -0
  200. data/lib/elasticsearch-serverless/api/transform/reset_transform.rb +54 -0
  201. data/lib/elasticsearch-serverless/api/transform/schedule_now_transform.rb +54 -0
  202. data/lib/elasticsearch-serverless/api/transform/start_transform.rb +55 -0
  203. data/lib/elasticsearch-serverless/api/transform/stop_transform.rb +58 -0
  204. data/lib/elasticsearch-serverless/api/transform/update_transform.rb +57 -0
  205. data/lib/elasticsearch-serverless/api/update.rb +77 -0
  206. data/lib/elasticsearch-serverless/api/update_by_query.rb +83 -0
  207. data/lib/elasticsearch-serverless/api/utils.rb +138 -0
  208. data/lib/elasticsearch-serverless/api.rb +98 -0
  209. data/lib/elasticsearch-serverless/version.rb +22 -0
  210. data/lib/elasticsearch-serverless.rb +105 -0
  211. metadata +321 -0
@@ -0,0 +1,102 @@
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
+ # Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
19
+ # @see https://github.com/elastic/elasticsearch-specification
20
+ #
21
+ module ElasticsearchServerless
22
+ module API
23
+ module Actions
24
+ # Returns results matching a query.
25
+ #
26
+ # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (+*+). To search all data streams and indices, omit this parameter or use +*+ or +_all+.
27
+ # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting +foo*,bar*+ returns an error if an index starts with +foo+ but no index starts with +bar+. Server default: true.
28
+ # @option arguments [Boolean] :allow_partial_search_results If true, returns partial results if there are shard request timeouts or shard failures. If false, returns an error with no partial results. Server default: true.
29
+ # @option arguments [String] :analyzer Analyzer to use for the query string. This parameter can only be used when the q query string parameter is specified.
30
+ # @option arguments [Boolean] :analyze_wildcard If true, wildcard and prefix queries are analyzed. This parameter can only be used when the q query string parameter is specified.
31
+ # @option arguments [Integer] :batched_reduce_size The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. Server default: 512.
32
+ # @option arguments [Boolean] :ccs_minimize_roundtrips If true, network round-trips between the coordinating node and the remote clusters are minimized when executing cross-cluster search (CCS) requests. Server default: true.
33
+ # @option arguments [String] :default_operator The default operator for query string query: AND or OR. This parameter can only be used when the +q+ query string parameter is specified. Server default: OR.
34
+ # @option arguments [String] :df Field to use as default where no field prefix is given in the query string. This parameter can only be used when the q query string parameter is specified.
35
+ # @option arguments [String, Array<String>] :docvalue_fields A comma-separated list of fields to return as the docvalue representation for each hit.
36
+ # @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as +open,hidden+.
37
+ # @option arguments [Boolean] :explain If +true+, returns detailed information about score computation as part of a hit.
38
+ # @option arguments [Boolean] :ignore_throttled If +true+, concrete, expanded or aliased indices will be ignored when frozen. Server default: true.
39
+ # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index.
40
+ # @option arguments [Boolean] :lenient If +true+, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. This parameter can only be used when the +q+ query string parameter is specified.
41
+ # @option arguments [Integer] :max_concurrent_shard_requests Defines the number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests. Server default: 5.
42
+ # @option arguments [String] :min_compatible_shard_node The minimum version of the node that can handle the request Any handling node with a lower version will fail the request.
43
+ # @option arguments [String] :preference Nodes and shards used for the search. By default, Elasticsearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness. Valid values are: +_only_local+ to run the search only on shards on the local node; +_local+ to, if possible, run the search on shards on the local node, or if not, select shards using the default method; +_only_nodes:<node-id>,<node-id>+ to run the search on only the specified nodes IDs, where, if suitable shards exist on more than one selected node, use shards on those nodes using the default method, or if none of the specified nodes are available, select shards from any available node using the default method; +_prefer_nodes:<node-id>,<node-id>+ to if possible, run the search on the specified nodes IDs, or if not, select shards using the default method; +_shards:<shard>,<shard>+ to run the search only on the specified shards; +<custom-string>+ (any string that does not start with +_+) to route searches with the same +<custom-string>+ to the same shards in the same order.
44
+ # @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 (if date filters are mandatory to match but the shard bounds and the query are disjoint). When unspecified, the pre-filter phase is executed if any of these conditions is met: the request targets more than 128 shards; the request targets one or more read-only index; the primary sort of the query targets an indexed field.
45
+ # @option arguments [Boolean] :request_cache If +true+, the caching of search results is enabled for requests where +size+ is +0+. Defaults to index level settings.
46
+ # @option arguments [String] :routing Custom value used to route operations to a specific shard.
47
+ # @option arguments [Time] :scroll Period to retain the search context for scrolling. See Scroll search results. By default, this value cannot exceed +1d+ (24 hours). You can change this limit using the +search.max_keep_alive+ cluster-level setting.
48
+ # @option arguments [String] :search_type How distributed term frequencies are calculated for relevance scoring.
49
+ # @option arguments [Array<String>] :stats Specific +tag+ of the request for logging and statistical purposes.
50
+ # @option arguments [String, Array<String>] :stored_fields A comma-separated list of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the +_source+ parameter defaults to +false+. You can pass +_source: true+ to return both source fields and stored fields in the search response.
51
+ # @option arguments [String] :suggest_field Specifies which field to use for suggestions.
52
+ # @option arguments [String] :suggest_mode Specifies the suggest mode. This parameter can only be used when the +suggest_field+ and +suggest_text+ query string parameters are specified. Server default: missing.
53
+ # @option arguments [Integer] :suggest_size Number of suggestions to return. This parameter can only be used when the +suggest_field+ and +suggest_text+ query string parameters are specified.
54
+ # @option arguments [String] :suggest_text The source text for which the suggestions should be returned. This parameter can only be used when the +suggest_field+ and +suggest_text+ query string parameters are specified.
55
+ # @option arguments [Integer] :terminate_after Maximum number of documents to collect for each shard. If a query reaches this limit, Elasticsearch terminates the query early. Elasticsearch collects documents before sorting. Use with caution. Elasticsearch applies this parameter to each shard handling the request. When possible, let Elasticsearch perform early termination automatically. Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. If set to +0+ (default), the query does not terminate early. Server default: 0.
56
+ # @option arguments [Time] :timeout Specifies the period of time to wait for a response from each shard. If no response is received before the timeout expires, the request fails and returns an error.
57
+ # @option arguments [Boolean, Integer] :track_total_hits Number of hits matching the query to count accurately. If +true+, the exact number of hits is returned at the cost of some performance. If +false+, the response does not include the total number of hits matching the query. Server default: 10000.
58
+ # @option arguments [Boolean] :track_scores If +true+, calculate and return document scores, even if the scores are not used for sorting.
59
+ # @option arguments [Boolean] :typed_keys If +true+, aggregation and suggester names are be prefixed by their respective types in the response. Server default: true.
60
+ # @option arguments [Boolean] :rest_total_hits_as_int Indicates whether +hits.total+ should be rendered as an integer or an object in the rest search response.
61
+ # @option arguments [Boolean] :version If +true+, returns document version as part of a hit.
62
+ # @option arguments [Boolean, String, Array<String>] :_source Indicates which source fields are returned for matching documents. These fields are returned in the +hits._source+ property of the search response. Valid values are: +true+ to return the entire document source; +false+ to not return the document source; +<string>+ to return the source fields that are specified as a comma-separated list (supports wildcard (+*+) patterns). Server default: true.
63
+ # @option arguments [String, Array<String>] :_source_excludes A comma-separated list of source fields to exclude from the response. You can also use this parameter to exclude fields from the subset specified in +_source_includes+ query parameter. If the +_source+ parameter is +false+, this parameter is ignored.
64
+ # @option arguments [String, Array<String>] :_source_includes A comma-separated list of source fields to include in the response. If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the +_source_excludes+ query parameter. If the +_source+ parameter is +false+, this parameter is ignored.
65
+ # @option arguments [Boolean] :seq_no_primary_term If +true+, returns sequence number and primary term of the last modification of each hit.
66
+ # @option arguments [String] :q Query in the Lucene query string syntax using query parameter search. Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing.
67
+ # @option arguments [Integer] :size Defines the number of hits to return. By default, you cannot page through more than 10,000 hits using the +from+ and +size+ parameters. To page through more hits, use the +search_after+ parameter. Server default: 10.
68
+ # @option arguments [Integer] :from Starting document offset. Needs to be non-negative. By default, you cannot page through more than 10,000 hits using the +from+ and +size+ parameters. To page through more hits, use the +search_after+ parameter. Server default: 0.
69
+ # @option arguments [String] :sort A comma-separated list of <field>:<direction> pairs.
70
+ # @option arguments [Hash] :headers Custom HTTP headers
71
+ # @option arguments [Hash] :body request body
72
+ #
73
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html
74
+ #
75
+ def search(arguments = {})
76
+ arguments = arguments.clone
77
+ headers = arguments.delete(:headers) || {}
78
+
79
+ body = arguments.delete(:body)
80
+
81
+ _index = arguments.delete(:index)
82
+
83
+ method = if body
84
+ ElasticsearchServerless::API::HTTP_POST
85
+ else
86
+ ElasticsearchServerless::API::HTTP_GET
87
+ end
88
+
89
+ path = if _index
90
+ "#{Utils.listify(_index)}/_search"
91
+ else
92
+ "_search"
93
+ end
94
+ params = Utils.process_params(arguments)
95
+
96
+ ElasticsearchServerless::API::Response.new(
97
+ perform_request(method, path, params, body, headers)
98
+ )
99
+ end
100
+ end
101
+ end
102
+ end
@@ -0,0 +1,57 @@
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
+ # Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
19
+ # @see https://github.com/elastic/elasticsearch-specification
20
+ #
21
+ module ElasticsearchServerless
22
+ module API
23
+ module SearchApplication
24
+ module Actions
25
+ # Deletes a search application.
26
+ # This functionality is in Beta and is subject to change. The design and
27
+ # code is less mature than official GA features and is being provided
28
+ # as-is with no warranties. Beta features are not subject to the support
29
+ # SLA of official GA features.
30
+ #
31
+ # @option arguments [String] :name The name of the search application to delete (*Required*)
32
+ # @option arguments [Hash] :headers Custom HTTP headers
33
+ #
34
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-search-application.html
35
+ #
36
+ def delete(arguments = {})
37
+ raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
38
+
39
+ arguments = arguments.clone
40
+ headers = arguments.delete(:headers) || {}
41
+
42
+ body = nil
43
+
44
+ _name = arguments.delete(:name)
45
+
46
+ method = ElasticsearchServerless::API::HTTP_DELETE
47
+ path = "_application/search_application/#{Utils.listify(_name)}"
48
+ params = {}
49
+
50
+ ElasticsearchServerless::API::Response.new(
51
+ perform_request(method, path, params, body, headers)
52
+ )
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,57 @@
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
+ # Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
19
+ # @see https://github.com/elastic/elasticsearch-specification
20
+ #
21
+ module ElasticsearchServerless
22
+ module API
23
+ module SearchApplication
24
+ module Actions
25
+ # Delete a behavioral analytics collection.
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 [String] :name The name of the analytics collection to be deleted (*Required*)
32
+ # @option arguments [Hash] :headers Custom HTTP headers
33
+ #
34
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-analytics-collection.html
35
+ #
36
+ def delete_behavioral_analytics(arguments = {})
37
+ raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
38
+
39
+ arguments = arguments.clone
40
+ headers = arguments.delete(:headers) || {}
41
+
42
+ body = nil
43
+
44
+ _name = arguments.delete(:name)
45
+
46
+ method = ElasticsearchServerless::API::HTTP_DELETE
47
+ path = "_application/analytics/#{Utils.listify(_name)}"
48
+ params = {}
49
+
50
+ ElasticsearchServerless::API::Response.new(
51
+ perform_request(method, path, params, body, headers)
52
+ )
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,57 @@
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
+ # Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
19
+ # @see https://github.com/elastic/elasticsearch-specification
20
+ #
21
+ module ElasticsearchServerless
22
+ module API
23
+ module SearchApplication
24
+ module Actions
25
+ # Returns the details about a search application.
26
+ # This functionality is in Beta and is subject to change. The design and
27
+ # code is less mature than official GA features and is being provided
28
+ # as-is with no warranties. Beta features are not subject to the support
29
+ # SLA of official GA features.
30
+ #
31
+ # @option arguments [String] :name The name of the search application (*Required*)
32
+ # @option arguments [Hash] :headers Custom HTTP headers
33
+ #
34
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-search-application.html
35
+ #
36
+ def get(arguments = {})
37
+ raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
38
+
39
+ arguments = arguments.clone
40
+ headers = arguments.delete(:headers) || {}
41
+
42
+ body = nil
43
+
44
+ _name = arguments.delete(:name)
45
+
46
+ method = ElasticsearchServerless::API::HTTP_GET
47
+ path = "_application/search_application/#{Utils.listify(_name)}"
48
+ params = {}
49
+
50
+ ElasticsearchServerless::API::Response.new(
51
+ perform_request(method, path, params, body, headers)
52
+ )
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,59 @@
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
+ # Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
19
+ # @see https://github.com/elastic/elasticsearch-specification
20
+ #
21
+ module ElasticsearchServerless
22
+ module API
23
+ module SearchApplication
24
+ module Actions
25
+ # Returns the existing behavioral analytics collections.
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 [Array<String>] :name A list of analytics collections to limit the returned information
32
+ # @option arguments [Hash] :headers Custom HTTP headers
33
+ #
34
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-analytics-collection.html
35
+ #
36
+ def get_behavioral_analytics(arguments = {})
37
+ arguments = arguments.clone
38
+ headers = arguments.delete(:headers) || {}
39
+
40
+ body = nil
41
+
42
+ _name = arguments.delete(:name)
43
+
44
+ method = ElasticsearchServerless::API::HTTP_GET
45
+ path = if _name
46
+ "_application/analytics/#{Utils.listify(_name)}"
47
+ else
48
+ "_application/analytics"
49
+ end
50
+ params = {}
51
+
52
+ ElasticsearchServerless::API::Response.new(
53
+ perform_request(method, path, params, body, headers)
54
+ )
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,55 @@
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
+ # Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
19
+ # @see https://github.com/elastic/elasticsearch-specification
20
+ #
21
+ module ElasticsearchServerless
22
+ module API
23
+ module SearchApplication
24
+ module Actions
25
+ # Returns the existing search applications.
26
+ # This functionality is in Beta and is subject to change. The design and
27
+ # code is less mature than official GA features and is being provided
28
+ # as-is with no warranties. Beta features are not subject to the support
29
+ # SLA of official GA features.
30
+ #
31
+ # @option arguments [String] :q Query in the Lucene query string syntax.
32
+ # @option arguments [Integer] :from Starting offset. Server default: 0.
33
+ # @option arguments [Integer] :size Specifies a max number of results to get.
34
+ # @option arguments [Hash] :headers Custom HTTP headers
35
+ #
36
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-search-applications.html
37
+ #
38
+ def list(arguments = {})
39
+ arguments = arguments.clone
40
+ headers = arguments.delete(:headers) || {}
41
+
42
+ body = nil
43
+
44
+ method = ElasticsearchServerless::API::HTTP_GET
45
+ path = "_application/search_application"
46
+ params = Utils.process_params(arguments)
47
+
48
+ ElasticsearchServerless::API::Response.new(
49
+ perform_request(method, path, params, body, headers)
50
+ )
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,60 @@
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
+ # Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
19
+ # @see https://github.com/elastic/elasticsearch-specification
20
+ #
21
+ module ElasticsearchServerless
22
+ module API
23
+ module SearchApplication
24
+ module Actions
25
+ # Creates or updates a search application.
26
+ # This functionality is in Beta and is subject to change. The design and
27
+ # code is less mature than official GA features and is being provided
28
+ # as-is with no warranties. Beta features are not subject to the support
29
+ # SLA of official GA features.
30
+ #
31
+ # @option arguments [String] :name The name of the search application to be created or updated. (*Required*)
32
+ # @option arguments [Boolean] :create If +true+, this request cannot replace or update existing Search Applications.
33
+ # @option arguments [Hash] :headers Custom HTTP headers
34
+ # @option arguments [Hash] :body search_application
35
+ #
36
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-search-application.html
37
+ #
38
+ def put(arguments = {})
39
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
40
+ raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
41
+
42
+ arguments = arguments.clone
43
+ headers = arguments.delete(:headers) || {}
44
+
45
+ body = arguments.delete(:body)
46
+
47
+ _name = arguments.delete(:name)
48
+
49
+ method = ElasticsearchServerless::API::HTTP_PUT
50
+ path = "_application/search_application/#{Utils.listify(_name)}"
51
+ params = Utils.process_params(arguments)
52
+
53
+ ElasticsearchServerless::API::Response.new(
54
+ perform_request(method, path, params, body, headers)
55
+ )
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,57 @@
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
+ # Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
19
+ # @see https://github.com/elastic/elasticsearch-specification
20
+ #
21
+ module ElasticsearchServerless
22
+ module API
23
+ module SearchApplication
24
+ module Actions
25
+ # Creates a behavioral analytics collection.
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 [String] :name The name of the analytics collection to be created or updated. (*Required*)
32
+ # @option arguments [Hash] :headers Custom HTTP headers
33
+ #
34
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-analytics-collection.html
35
+ #
36
+ def put_behavioral_analytics(arguments = {})
37
+ raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
38
+
39
+ arguments = arguments.clone
40
+ headers = arguments.delete(:headers) || {}
41
+
42
+ body = nil
43
+
44
+ _name = arguments.delete(:name)
45
+
46
+ method = ElasticsearchServerless::API::HTTP_PUT
47
+ path = "_application/analytics/#{Utils.listify(_name)}"
48
+ params = {}
49
+
50
+ ElasticsearchServerless::API::Response.new(
51
+ perform_request(method, path, params, body, headers)
52
+ )
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,63 @@
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
+ # Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
19
+ # @see https://github.com/elastic/elasticsearch-specification
20
+ #
21
+ module ElasticsearchServerless
22
+ module API
23
+ module SearchApplication
24
+ module Actions
25
+ # Perform a search against a search application
26
+ # This functionality is in Beta and is subject to change. The design and
27
+ # code is less mature than official GA features and is being provided
28
+ # as-is with no warranties. Beta features are not subject to the support
29
+ # SLA of official GA features.
30
+ #
31
+ # @option arguments [String] :name The name of the search application to be searched. (*Required*)
32
+ # @option arguments [Hash] :headers Custom HTTP headers
33
+ # @option arguments [Hash] :body request body
34
+ #
35
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-application-search.html
36
+ #
37
+ def search(arguments = {})
38
+ raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
39
+
40
+ arguments = arguments.clone
41
+ headers = arguments.delete(:headers) || {}
42
+
43
+ body = arguments.delete(:body)
44
+
45
+ _name = arguments.delete(:name)
46
+
47
+ method = if body
48
+ ElasticsearchServerless::API::HTTP_POST
49
+ else
50
+ ElasticsearchServerless::API::HTTP_GET
51
+ end
52
+
53
+ path = "_application/search_application/#{Utils.listify(_name)}/_search"
54
+ params = {}
55
+
56
+ ElasticsearchServerless::API::Response.new(
57
+ perform_request(method, path, params, body, headers)
58
+ )
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,75 @@
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
+ # Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
19
+ # @see https://github.com/elastic/elasticsearch-specification
20
+ #
21
+ module ElasticsearchServerless
22
+ module API
23
+ module Actions
24
+ # Searches a vector tile for geospatial values. Returns results as a binary Mapbox vector tile.
25
+ #
26
+ # @option arguments [String, Array] :index Comma-separated list of data streams, indices, or aliases to search (*Required*)
27
+ # @option arguments [String] :field Field containing geospatial data to return (*Required*)
28
+ # @option arguments [Integer] :zoom Zoom level for the vector tile to search (*Required*)
29
+ # @option arguments [Integer] :x X coordinate for the vector tile to search (*Required*)
30
+ # @option arguments [Integer] :y Y coordinate for the vector tile to search (*Required*)
31
+ # @option arguments [Boolean] :exact_bounds If false, the meta layer’s feature is the bounding box of the tile. If true, the meta layer’s feature is a bounding box resulting from a geo_bounds aggregation. The aggregation runs on <field> values that intersect the <zoom>/<x>/<y> tile with wrap_longitude set to false. The resulting bounding box may be larger than the vector tile.
32
+ # @option arguments [Integer] :extent Size, in pixels, of a side of the tile. Vector tiles are square with equal sides. Server default: 4096.
33
+ # @option arguments [String] :grid_agg Aggregation used to create a grid for +field+.
34
+ # @option arguments [Integer] :grid_precision Additional zoom levels available through the aggs layer. For example, if <zoom> is 7 and grid_precision is 8, you can zoom in up to level 15. Accepts 0-8. If 0, results don’t include the aggs layer. Server default: 8.
35
+ # @option arguments [String] :grid_type Determines the geometry type for features in the aggs layer. In the aggs layer, each feature represents a geotile_grid cell. If 'grid' each feature is a Polygon of the cells bounding box. If 'point' each feature is a Point that is the centroid of the cell. Server default: grid.
36
+ # @option arguments [Integer] :size Maximum number of features to return in the hits layer. Accepts 0-10000. If 0, results don’t include the hits layer. Server default: 10000.
37
+ # @option arguments [Boolean] :with_labels If +true+, the hits and aggs layers will contain additional point features representing suggested label positions for the original features.
38
+ # @option arguments [Hash] :headers Custom HTTP headers
39
+ # @option arguments [Hash] :body request body
40
+ #
41
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-vector-tile-api.html
42
+ #
43
+ def search_mvt(arguments = {})
44
+ raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
45
+ raise ArgumentError, "Required argument 'field' missing" unless arguments[:field]
46
+ raise ArgumentError, "Required argument 'zoom' missing" unless arguments[:zoom]
47
+ raise ArgumentError, "Required argument 'x' missing" unless arguments[:x]
48
+ raise ArgumentError, "Required argument 'y' missing" unless arguments[:y]
49
+
50
+ arguments = arguments.clone
51
+ headers = arguments.delete(:headers) || {}
52
+
53
+ body = arguments.delete(:body)
54
+
55
+ _index = arguments.delete(:index)
56
+
57
+ _field = arguments.delete(:field)
58
+
59
+ _zoom = arguments.delete(:zoom)
60
+
61
+ _x = arguments.delete(:x)
62
+
63
+ _y = arguments.delete(:y)
64
+
65
+ method = ElasticsearchServerless::API::HTTP_POST
66
+ path = "#{Utils.listify(_index)}/_mvt/#{Utils.listify(_field)}/#{Utils.listify(_zoom)}/#{Utils.listify(_x)}/#{Utils.listify(_y)}"
67
+ params = Utils.process_params(arguments)
68
+
69
+ ElasticsearchServerless::API::Response.new(
70
+ perform_request(method, path, params, body, headers)
71
+ )
72
+ end
73
+ end
74
+ end
75
+ end