elasticsearch-serverless 0.0.8.20231031.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/elasticsearch-serverless/api/async_search/delete.rb +53 -0
- data/lib/elasticsearch-serverless/api/async_search/get.rb +56 -0
- data/lib/elasticsearch-serverless/api/async_search/status.rb +53 -0
- data/lib/elasticsearch-serverless/api/async_search/submit.rb +102 -0
- data/lib/elasticsearch-serverless/api/bulk.rb +72 -0
- data/lib/elasticsearch-serverless/api/cat/aliases.rb +64 -0
- data/lib/elasticsearch-serverless/api/cat/component_templates.rb +62 -0
- data/lib/elasticsearch-serverless/api/cat/count.rb +63 -0
- data/lib/elasticsearch-serverless/api/cat/help.rb +55 -0
- data/lib/elasticsearch-serverless/api/cat/indices.rb +69 -0
- data/lib/elasticsearch-serverless/api/cat/ml_data_frame_analytics.rb +67 -0
- data/lib/elasticsearch-serverless/api/cat/ml_datafeeds.rb +66 -0
- data/lib/elasticsearch-serverless/api/cat/ml_jobs.rb +67 -0
- data/lib/elasticsearch-serverless/api/cat/ml_trained_models.rb +68 -0
- data/lib/elasticsearch-serverless/api/cat/transforms.rb +68 -0
- data/lib/elasticsearch-serverless/api/clear_scroll.rb +67 -0
- data/lib/elasticsearch-serverless/api/close_point_in_time.rb +47 -0
- data/lib/elasticsearch-serverless/api/cluster/delete_component_template.rb +55 -0
- data/lib/elasticsearch-serverless/api/cluster/exists_component_template.rb +57 -0
- data/lib/elasticsearch-serverless/api/cluster/get_component_template.rb +59 -0
- data/lib/elasticsearch-serverless/api/cluster/info.rb +53 -0
- data/lib/elasticsearch-serverless/api/cluster/put_component_template.rb +57 -0
- data/lib/elasticsearch-serverless/api/count.rb +73 -0
- data/lib/elasticsearch-serverless/api/create.rb +51 -0
- data/lib/elasticsearch-serverless/api/delete.rb +71 -0
- data/lib/elasticsearch-serverless/api/delete_by_query.rb +82 -0
- data/lib/elasticsearch-serverless/api/delete_script.rb +53 -0
- data/lib/elasticsearch-serverless/api/enrich/delete_policy.rb +53 -0
- data/lib/elasticsearch-serverless/api/enrich/execute_policy.rb +54 -0
- data/lib/elasticsearch-serverless/api/enrich/get_policy.rb +55 -0
- data/lib/elasticsearch-serverless/api/enrich/put_policy.rb +55 -0
- data/lib/elasticsearch-serverless/api/enrich/stats.rb +48 -0
- data/lib/elasticsearch-serverless/api/eql/delete.rb +53 -0
- data/lib/elasticsearch-serverless/api/eql/get.rb +55 -0
- data/lib/elasticsearch-serverless/api/eql/get_status.rb +53 -0
- data/lib/elasticsearch-serverless/api/eql/search.rb +61 -0
- data/lib/elasticsearch-serverless/api/exists.rb +67 -0
- data/lib/elasticsearch-serverless/api/exists_source.rb +66 -0
- data/lib/elasticsearch-serverless/api/explain.rb +73 -0
- data/lib/elasticsearch-serverless/api/field_caps.rb +66 -0
- data/lib/elasticsearch-serverless/api/get.rb +73 -0
- data/lib/elasticsearch-serverless/api/get_script.rb +52 -0
- data/lib/elasticsearch-serverless/api/get_source.rb +65 -0
- data/lib/elasticsearch-serverless/api/graph/explore.rb +61 -0
- data/lib/elasticsearch-serverless/api/index.rb +71 -0
- data/lib/elasticsearch-serverless/api/indices/add_block.rb +62 -0
- data/lib/elasticsearch-serverless/api/indices/analyze.rb +61 -0
- data/lib/elasticsearch-serverless/api/indices/create.rb +57 -0
- data/lib/elasticsearch-serverless/api/indices/create_data_stream.rb +53 -0
- data/lib/elasticsearch-serverless/api/indices/data_streams_stats.rb +56 -0
- data/lib/elasticsearch-serverless/api/indices/delete.rb +66 -0
- data/lib/elasticsearch-serverless/api/indices/delete_alias.rb +61 -0
- data/lib/elasticsearch-serverless/api/indices/delete_data_lifecycle.rb +56 -0
- data/lib/elasticsearch-serverless/api/indices/delete_data_stream.rb +54 -0
- data/lib/elasticsearch-serverless/api/indices/delete_index_template.rb +55 -0
- data/lib/elasticsearch-serverless/api/indices/exists.rb +61 -0
- data/lib/elasticsearch-serverless/api/indices/exists_alias.rb +66 -0
- data/lib/elasticsearch-serverless/api/indices/exists_index_template.rb +56 -0
- data/lib/elasticsearch-serverless/api/indices/explain_data_lifecycle.rb +55 -0
- data/lib/elasticsearch-serverless/api/indices/get.rb +61 -0
- data/lib/elasticsearch-serverless/api/indices/get_alias.rb +66 -0
- data/lib/elasticsearch-serverless/api/indices/get_data_lifecycle.rb +55 -0
- data/lib/elasticsearch-serverless/api/indices/get_data_stream.rb +57 -0
- data/lib/elasticsearch-serverless/api/indices/get_index_template.rb +59 -0
- data/lib/elasticsearch-serverless/api/indices/get_mapping.rb +60 -0
- data/lib/elasticsearch-serverless/api/indices/get_settings.rb +69 -0
- data/lib/elasticsearch-serverless/api/indices/migrate_to_data_stream.rb +53 -0
- data/lib/elasticsearch-serverless/api/indices/modify_data_stream.rb +51 -0
- data/lib/elasticsearch-serverless/api/indices/put_alias.rb +62 -0
- data/lib/elasticsearch-serverless/api/indices/put_data_lifecycle.rb +57 -0
- data/lib/elasticsearch-serverless/api/indices/put_index_template.rb +56 -0
- data/lib/elasticsearch-serverless/api/indices/put_mapping.rb +61 -0
- data/lib/elasticsearch-serverless/api/indices/put_settings.rb +65 -0
- data/lib/elasticsearch-serverless/api/indices/put_template.rb +60 -0
- data/lib/elasticsearch-serverless/api/indices/refresh.rb +58 -0
- data/lib/elasticsearch-serverless/api/indices/resolve_index.rb +54 -0
- data/lib/elasticsearch-serverless/api/indices/rollover.rb +66 -0
- data/lib/elasticsearch-serverless/api/indices/simulate_index_template.rb +57 -0
- data/lib/elasticsearch-serverless/api/indices/simulate_template.rb +59 -0
- data/lib/elasticsearch-serverless/api/indices/update_aliases.rb +53 -0
- data/lib/elasticsearch-serverless/api/indices/validate_query.rb +73 -0
- data/lib/elasticsearch-serverless/api/info.rb +46 -0
- data/lib/elasticsearch-serverless/api/ingest/delete_pipeline.rb +55 -0
- data/lib/elasticsearch-serverless/api/ingest/get_pipeline.rb +57 -0
- data/lib/elasticsearch-serverless/api/ingest/processor_grok.rb +48 -0
- data/lib/elasticsearch-serverless/api/ingest/put_pipeline.rb +58 -0
- data/lib/elasticsearch-serverless/api/ingest/simulate.rb +59 -0
- data/lib/elasticsearch-serverless/api/license/get.rb +50 -0
- data/lib/elasticsearch-serverless/api/logstash/delete_pipeline.rb +53 -0
- data/lib/elasticsearch-serverless/api/logstash/get_pipeline.rb +55 -0
- data/lib/elasticsearch-serverless/api/logstash/put_pipeline.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/close_job.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar.rb +53 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_event.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_job.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_data_frame_analytics.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_datafeed.rb +54 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_filter.rb +53 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_job.rb +56 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model.rb +54 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model_alias.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/estimate_model_memory.rb +51 -0
- data/lib/elasticsearch-serverless/api/machine_learning/evaluate_data_frame.rb +51 -0
- data/lib/elasticsearch-serverless/api/machine_learning/flush_job.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_calendar_events.rb +58 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_calendars.rb +63 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics_stats.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_datafeed_stats.rb +56 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_datafeeds.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_filters.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_job_stats.rb +56 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_jobs.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb +66 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb +62 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb +58 -0
- data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +63 -0
- data/lib/elasticsearch-serverless/api/machine_learning/open_job.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb +61 -0
- data/lib/elasticsearch-serverless/api/machine_learning/preview_datafeed.rb +63 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_calendar.rb +54 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_calendar_job.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_data_frame_analytics.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_filter.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_job.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model.rb +56 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_alias.rb +58 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_definition_part.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_vocabulary.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/reset_job.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/start_data_frame_analytics.rb +54 -0
- data/lib/elasticsearch-serverless/api/machine_learning/start_datafeed.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb +60 -0
- data/lib/elasticsearch-serverless/api/machine_learning/stop_data_frame_analytics.rb +56 -0
- data/lib/elasticsearch-serverless/api/machine_learning/stop_datafeed.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/stop_trained_model_deployment.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/update_data_frame_analytics.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/update_filter.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/update_job.rb +55 -0
- data/lib/elasticsearch-serverless/api/mget.rb +64 -0
- data/lib/elasticsearch-serverless/api/msearch.rb +91 -0
- data/lib/elasticsearch-serverless/api/msearch_template.rb +72 -0
- data/lib/elasticsearch-serverless/api/mtermvectors.rb +75 -0
- data/lib/elasticsearch-serverless/api/open_point_in_time.rb +56 -0
- data/lib/elasticsearch-serverless/api/ping.rb +52 -0
- data/lib/elasticsearch-serverless/api/put_script.rb +62 -0
- data/lib/elasticsearch-serverless/api/query_ruleset/delete.rb +57 -0
- data/lib/elasticsearch-serverless/api/query_ruleset/get.rb +57 -0
- data/lib/elasticsearch-serverless/api/query_ruleset/list.rb +54 -0
- data/lib/elasticsearch-serverless/api/query_ruleset/put.rb +59 -0
- data/lib/elasticsearch-serverless/api/rank_eval.rb +60 -0
- data/lib/elasticsearch-serverless/api/reindex.rb +59 -0
- data/lib/elasticsearch-serverless/api/render_search_template.rb +59 -0
- data/lib/elasticsearch-serverless/api/response.rb +48 -0
- data/lib/elasticsearch-serverless/api/scripts_painless_execute.rb +56 -0
- data/lib/elasticsearch-serverless/api/scroll.rb +66 -0
- data/lib/elasticsearch-serverless/api/search.rb +102 -0
- data/lib/elasticsearch-serverless/api/search_application/delete.rb +57 -0
- data/lib/elasticsearch-serverless/api/search_application/delete_behavioral_analytics.rb +57 -0
- data/lib/elasticsearch-serverless/api/search_application/get.rb +57 -0
- data/lib/elasticsearch-serverless/api/search_application/get_behavioral_analytics.rb +59 -0
- data/lib/elasticsearch-serverless/api/search_application/list.rb +55 -0
- data/lib/elasticsearch-serverless/api/search_application/put.rb +60 -0
- data/lib/elasticsearch-serverless/api/search_application/put_behavioral_analytics.rb +57 -0
- data/lib/elasticsearch-serverless/api/search_application/search.rb +63 -0
- data/lib/elasticsearch-serverless/api/search_mvt.rb +75 -0
- data/lib/elasticsearch-serverless/api/search_template.rb +69 -0
- data/lib/elasticsearch-serverless/api/security/authenticate.rb +48 -0
- data/lib/elasticsearch-serverless/api/security/create_api_key.rb +52 -0
- data/lib/elasticsearch-serverless/api/security/get_api_key.rb +54 -0
- data/lib/elasticsearch-serverless/api/security/has_privileges.rb +58 -0
- data/lib/elasticsearch-serverless/api/security/invalidate_api_key.rb +51 -0
- data/lib/elasticsearch-serverless/api/security/query_api_keys.rb +55 -0
- data/lib/elasticsearch-serverless/api/security/update_api_key.rb +54 -0
- data/lib/elasticsearch-serverless/api/sql/clear_cursor.rb +51 -0
- data/lib/elasticsearch-serverless/api/sql/delete_async.rb +53 -0
- data/lib/elasticsearch-serverless/api/sql/get_async.rb +57 -0
- data/lib/elasticsearch-serverless/api/sql/get_async_status.rb +53 -0
- data/lib/elasticsearch-serverless/api/sql/query.rb +52 -0
- data/lib/elasticsearch-serverless/api/sql/translate.rb +51 -0
- data/lib/elasticsearch-serverless/api/synonyms/delete_synonym.rb +57 -0
- data/lib/elasticsearch-serverless/api/synonyms/delete_synonym_rule.rb +61 -0
- data/lib/elasticsearch-serverless/api/synonyms/get_synonym.rb +59 -0
- data/lib/elasticsearch-serverless/api/synonyms/get_synonym_rule.rb +61 -0
- data/lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb +54 -0
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym.rb +59 -0
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb +63 -0
- data/lib/elasticsearch-serverless/api/tasks/get.rb +57 -0
- data/lib/elasticsearch-serverless/api/terms_enum.rb +57 -0
- data/lib/elasticsearch-serverless/api/termvectors.rb +82 -0
- data/lib/elasticsearch-serverless/api/transform/delete_transform.rb +55 -0
- data/lib/elasticsearch-serverless/api/transform/get_transform.rb +59 -0
- data/lib/elasticsearch-serverless/api/transform/get_transform_stats.rb +57 -0
- data/lib/elasticsearch-serverless/api/transform/preview_transform.rb +62 -0
- data/lib/elasticsearch-serverless/api/transform/put_transform.rb +57 -0
- data/lib/elasticsearch-serverless/api/transform/reset_transform.rb +54 -0
- data/lib/elasticsearch-serverless/api/transform/schedule_now_transform.rb +54 -0
- data/lib/elasticsearch-serverless/api/transform/start_transform.rb +55 -0
- data/lib/elasticsearch-serverless/api/transform/stop_transform.rb +58 -0
- data/lib/elasticsearch-serverless/api/transform/update_transform.rb +57 -0
- data/lib/elasticsearch-serverless/api/update.rb +77 -0
- data/lib/elasticsearch-serverless/api/update_by_query.rb +83 -0
- data/lib/elasticsearch-serverless/api/utils.rb +138 -0
- data/lib/elasticsearch-serverless/api.rb +98 -0
- data/lib/elasticsearch-serverless/version.rb +22 -0
- data/lib/elasticsearch-serverless.rb +105 -0
- metadata +321 -0
@@ -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 Enrich
|
24
|
+
module Actions
|
25
|
+
# Gets information about an enrich policy.
|
26
|
+
#
|
27
|
+
# @option arguments [String, Array<String>] :name Comma-separated list of enrich policy names used to limit the request. To return information for all enrich policies, omit this parameter.
|
28
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
29
|
+
#
|
30
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-enrich-policy-api.html
|
31
|
+
#
|
32
|
+
def get_policy(arguments = {})
|
33
|
+
arguments = arguments.clone
|
34
|
+
headers = arguments.delete(:headers) || {}
|
35
|
+
|
36
|
+
body = nil
|
37
|
+
|
38
|
+
_name = arguments.delete(:name)
|
39
|
+
|
40
|
+
method = ElasticsearchServerless::API::HTTP_GET
|
41
|
+
path = if _name
|
42
|
+
"_enrich/policy/#{Utils.listify(_name)}"
|
43
|
+
else
|
44
|
+
"_enrich/policy"
|
45
|
+
end
|
46
|
+
params = {}
|
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,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 Enrich
|
24
|
+
module Actions
|
25
|
+
# Creates a new enrich policy.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :name Name of the enrich policy to create or update. (*Required*)
|
28
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
29
|
+
# @option arguments [Hash] :body request body
|
30
|
+
#
|
31
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-enrich-policy-api.html
|
32
|
+
#
|
33
|
+
def put_policy(arguments = {})
|
34
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
35
|
+
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
36
|
+
|
37
|
+
arguments = arguments.clone
|
38
|
+
headers = arguments.delete(:headers) || {}
|
39
|
+
|
40
|
+
body = arguments.delete(:body)
|
41
|
+
|
42
|
+
_name = arguments.delete(:name)
|
43
|
+
|
44
|
+
method = ElasticsearchServerless::API::HTTP_PUT
|
45
|
+
path = "_enrich/policy/#{Utils.listify(_name)}"
|
46
|
+
params = {}
|
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,48 @@
|
|
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 Enrich
|
24
|
+
module Actions
|
25
|
+
# Gets enrich coordinator statistics and information about enrich policies that are currently executing.
|
26
|
+
#
|
27
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
28
|
+
#
|
29
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats-api.html
|
30
|
+
#
|
31
|
+
def stats(arguments = {})
|
32
|
+
arguments = arguments.clone
|
33
|
+
headers = arguments.delete(:headers) || {}
|
34
|
+
|
35
|
+
body = nil
|
36
|
+
|
37
|
+
method = ElasticsearchServerless::API::HTTP_GET
|
38
|
+
path = "_enrich/_stats"
|
39
|
+
params = {}
|
40
|
+
|
41
|
+
ElasticsearchServerless::API::Response.new(
|
42
|
+
perform_request(method, path, params, body, headers)
|
43
|
+
)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,53 @@
|
|
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 Eql
|
24
|
+
module Actions
|
25
|
+
# Deletes an async EQL search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :id Identifier for the search to delete. A search ID is provided in the EQL search API's response for an async search. A search ID is also provided if the request’s +keep_on_completion+ parameter is +true+. (*Required*)
|
28
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
29
|
+
#
|
30
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html
|
31
|
+
#
|
32
|
+
def delete(arguments = {})
|
33
|
+
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
34
|
+
|
35
|
+
arguments = arguments.clone
|
36
|
+
headers = arguments.delete(:headers) || {}
|
37
|
+
|
38
|
+
body = nil
|
39
|
+
|
40
|
+
_id = arguments.delete(:id)
|
41
|
+
|
42
|
+
method = ElasticsearchServerless::API::HTTP_DELETE
|
43
|
+
path = "_eql/search/#{Utils.listify(_id)}"
|
44
|
+
params = {}
|
45
|
+
|
46
|
+
ElasticsearchServerless::API::Response.new(
|
47
|
+
perform_request(method, path, params, body, headers)
|
48
|
+
)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
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 Eql
|
24
|
+
module Actions
|
25
|
+
# Returns async results from previously executed Event Query Language (EQL) search
|
26
|
+
#
|
27
|
+
# @option arguments [String] :id Identifier for the search. (*Required*)
|
28
|
+
# @option arguments [Time] :keep_alive Period for which the search and its results are stored on the cluster. Defaults to the keep_alive value set by the search’s EQL search API request.
|
29
|
+
# @option arguments [Time] :wait_for_completion_timeout Timeout duration to wait for the request to finish. Defaults to no timeout, meaning the request waits for complete search results.
|
30
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
31
|
+
#
|
32
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-eql-search-api.html
|
33
|
+
#
|
34
|
+
def get(arguments = {})
|
35
|
+
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
36
|
+
|
37
|
+
arguments = arguments.clone
|
38
|
+
headers = arguments.delete(:headers) || {}
|
39
|
+
|
40
|
+
body = nil
|
41
|
+
|
42
|
+
_id = arguments.delete(:id)
|
43
|
+
|
44
|
+
method = ElasticsearchServerless::API::HTTP_GET
|
45
|
+
path = "_eql/search/#{Utils.listify(_id)}"
|
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,53 @@
|
|
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 Eql
|
24
|
+
module Actions
|
25
|
+
# Returns the status of a previously submitted async or stored Event Query Language (EQL) search
|
26
|
+
#
|
27
|
+
# @option arguments [String] :id Identifier for the search. (*Required*)
|
28
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
29
|
+
#
|
30
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-eql-status-api.html
|
31
|
+
#
|
32
|
+
def get_status(arguments = {})
|
33
|
+
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
34
|
+
|
35
|
+
arguments = arguments.clone
|
36
|
+
headers = arguments.delete(:headers) || {}
|
37
|
+
|
38
|
+
body = nil
|
39
|
+
|
40
|
+
_id = arguments.delete(:id)
|
41
|
+
|
42
|
+
method = ElasticsearchServerless::API::HTTP_GET
|
43
|
+
path = "_eql/search/status/#{Utils.listify(_id)}"
|
44
|
+
params = {}
|
45
|
+
|
46
|
+
ElasticsearchServerless::API::Response.new(
|
47
|
+
perform_request(method, path, params, body, headers)
|
48
|
+
)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,61 @@
|
|
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 Eql
|
24
|
+
module Actions
|
25
|
+
# Returns results matching a query expressed in Event Query Language (EQL)
|
26
|
+
#
|
27
|
+
# @option arguments [String, Array] :index The name of the index to scope the operation (*Required*)
|
28
|
+
# @option arguments [Boolean] :allow_no_indices [TODO] Server default: true.
|
29
|
+
# @option arguments [String, Array<String>] :expand_wildcards [TODO] Server default: open.
|
30
|
+
# @option arguments [Boolean] :ignore_unavailable If true, missing or closed indices are not included in the response. Server default: true.
|
31
|
+
# @option arguments [Time] :keep_alive Period for which the search and its results are stored on the cluster. Server default: 5d.
|
32
|
+
# @option arguments [Boolean] :keep_on_completion If true, the search and its results are stored on the cluster.
|
33
|
+
# @option arguments [Time] :wait_for_completion_timeout Timeout duration to wait for the request to finish. Defaults to no timeout, meaning the request waits for complete search results.
|
34
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
35
|
+
# @option arguments [Hash] :body request body
|
36
|
+
#
|
37
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html
|
38
|
+
#
|
39
|
+
def search(arguments = {})
|
40
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
41
|
+
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
42
|
+
|
43
|
+
arguments = arguments.clone
|
44
|
+
headers = arguments.delete(:headers) || {}
|
45
|
+
|
46
|
+
body = arguments.delete(:body)
|
47
|
+
|
48
|
+
_index = arguments.delete(:index)
|
49
|
+
|
50
|
+
method = ElasticsearchServerless::API::HTTP_POST
|
51
|
+
path = "#{Utils.listify(_index)}/_eql/search"
|
52
|
+
params = Utils.process_params(arguments)
|
53
|
+
|
54
|
+
ElasticsearchServerless::API::Response.new(
|
55
|
+
perform_request(method, path, params, body, headers)
|
56
|
+
)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,67 @@
|
|
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 information about whether a document exists in an index.
|
25
|
+
#
|
26
|
+
# @option arguments [String] :id Identifier of the document. (*Required*)
|
27
|
+
# @option arguments [String] :index Comma-separated list of data streams, indices, and aliases. Supports wildcards (+*+). (*Required*)
|
28
|
+
# @option arguments [String] :preference Specifies the node or shard the operation should be performed on. Random by default.
|
29
|
+
# @option arguments [Boolean] :realtime If +true+, the request is real-time as opposed to near-real-time. Server default: true.
|
30
|
+
# @option arguments [Boolean] :refresh If +true+, Elasticsearch refreshes all shards involved in the delete by query after the request completes.
|
31
|
+
# @option arguments [String] :routing Target the specified primary shard.
|
32
|
+
# @option arguments [Boolean, String, Array<String>] :_source +true+ or +false+ to return the +_source+ field or not, or a list of fields to return.
|
33
|
+
# @option arguments [String, Array<String>] :_source_excludes A comma-separated list of source fields to exclude in the response.
|
34
|
+
# @option arguments [String, Array<String>] :_source_includes A comma-separated list of source fields to include in the response.
|
35
|
+
# @option arguments [String, Array<String>] :stored_fields 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.
|
36
|
+
# @option arguments [Integer] :version Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
|
37
|
+
# @option arguments [String] :version_type Specific version type: +external+, +external_gte+.
|
38
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
39
|
+
#
|
40
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
|
41
|
+
#
|
42
|
+
def exists(arguments = {})
|
43
|
+
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
44
|
+
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
45
|
+
|
46
|
+
arguments = arguments.clone
|
47
|
+
headers = arguments.delete(:headers) || {}
|
48
|
+
|
49
|
+
body = nil
|
50
|
+
|
51
|
+
_id = arguments.delete(:id)
|
52
|
+
|
53
|
+
_index = arguments.delete(:index)
|
54
|
+
|
55
|
+
method = ElasticsearchServerless::API::HTTP_HEAD
|
56
|
+
path = "#{Utils.listify(_index)}/_doc/#{Utils.listify(_id)}"
|
57
|
+
params = Utils.process_params(arguments)
|
58
|
+
|
59
|
+
Utils.rescue_from_not_found do
|
60
|
+
perform_request(method, path, params, body, headers).status == 200 ? true : false
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
alias_method :exists?, :exists
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,66 @@
|
|
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 information about whether a document source exists in an index.
|
25
|
+
#
|
26
|
+
# @option arguments [String] :id Identifier of the document. (*Required*)
|
27
|
+
# @option arguments [String] :index Comma-separated list of data streams, indices, and aliases. Supports wildcards (+*+). (*Required*)
|
28
|
+
# @option arguments [String] :preference Specifies the node or shard the operation should be performed on. Random by default.
|
29
|
+
# @option arguments [Boolean] :realtime If true, the request is real-time as opposed to near-real-time. Server default: true.
|
30
|
+
# @option arguments [Boolean] :refresh If +true+, Elasticsearch refreshes all shards involved in the delete by query after the request completes.
|
31
|
+
# @option arguments [String] :routing Target the specified primary shard.
|
32
|
+
# @option arguments [Boolean, String, Array<String>] :_source +true+ or +false+ to return the +_source+ field or not, or a list of fields to return.
|
33
|
+
# @option arguments [String, Array<String>] :_source_excludes A comma-separated list of source fields to exclude in the response.
|
34
|
+
# @option arguments [String, Array<String>] :_source_includes A comma-separated list of source fields to include in the response.
|
35
|
+
# @option arguments [Integer] :version Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
|
36
|
+
# @option arguments [String] :version_type Specific version type: +external+, +external_gte+.
|
37
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
38
|
+
#
|
39
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
|
40
|
+
#
|
41
|
+
def exists_source(arguments = {})
|
42
|
+
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
43
|
+
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
44
|
+
|
45
|
+
arguments = arguments.clone
|
46
|
+
headers = arguments.delete(:headers) || {}
|
47
|
+
|
48
|
+
body = nil
|
49
|
+
|
50
|
+
_id = arguments.delete(:id)
|
51
|
+
|
52
|
+
_index = arguments.delete(:index)
|
53
|
+
|
54
|
+
method = ElasticsearchServerless::API::HTTP_HEAD
|
55
|
+
path = "#{Utils.listify(_index)}/_source/#{Utils.listify(_id)}"
|
56
|
+
params = Utils.process_params(arguments)
|
57
|
+
|
58
|
+
ElasticsearchServerless::API::Response.new(
|
59
|
+
perform_request(method, path, params, body, headers)
|
60
|
+
)
|
61
|
+
end
|
62
|
+
|
63
|
+
alias_method :exists_source?, :exists_source
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,73 @@
|
|
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 information about why a specific matches (or doesn't match) a query.
|
25
|
+
#
|
26
|
+
# @option arguments [String] :id Defines the document ID. (*Required*)
|
27
|
+
# @option arguments [String] :index Index names used to limit the request. Only a single index name can be provided to this parameter. (*Required*)
|
28
|
+
# @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.
|
29
|
+
# @option arguments [Boolean] :analyze_wildcard If +true+, wildcard and prefix queries are analyzed.
|
30
|
+
# @option arguments [String] :default_operator The default operator for query string query: +AND+ or +OR+. Server default: OR.
|
31
|
+
# @option arguments [String] :df Field to use as default where no field prefix is given in the query string.
|
32
|
+
# @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.
|
33
|
+
# @option arguments [String] :preference Specifies the node or shard the operation should be performed on. Random by default.
|
34
|
+
# @option arguments [String] :routing Custom value used to route operations to a specific shard.
|
35
|
+
# @option arguments [Boolean, String, Array<String>] :_source True or false to return the +_source+ field or not, or a list of fields to return.
|
36
|
+
# @option arguments [String, Array<String>] :_source_excludes A comma-separated list of source fields to exclude from the response.
|
37
|
+
# @option arguments [String, Array<String>] :_source_includes A comma-separated list of source fields to include in the response.
|
38
|
+
# @option arguments [String, Array<String>] :stored_fields A comma-separated list of stored fields to return in the response.
|
39
|
+
# @option arguments [String] :q Query in the Lucene query string syntax.
|
40
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
41
|
+
# @option arguments [Hash] :body request body
|
42
|
+
#
|
43
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html
|
44
|
+
#
|
45
|
+
def explain(arguments = {})
|
46
|
+
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
47
|
+
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
48
|
+
|
49
|
+
arguments = arguments.clone
|
50
|
+
headers = arguments.delete(:headers) || {}
|
51
|
+
|
52
|
+
body = arguments.delete(:body)
|
53
|
+
|
54
|
+
_id = arguments.delete(:id)
|
55
|
+
|
56
|
+
_index = arguments.delete(:index)
|
57
|
+
|
58
|
+
method = if body
|
59
|
+
ElasticsearchServerless::API::HTTP_POST
|
60
|
+
else
|
61
|
+
ElasticsearchServerless::API::HTTP_GET
|
62
|
+
end
|
63
|
+
|
64
|
+
path = "#{Utils.listify(_index)}/_explain/#{Utils.listify(_id)}"
|
65
|
+
params = Utils.process_params(arguments)
|
66
|
+
|
67
|
+
ElasticsearchServerless::API::Response.new(
|
68
|
+
perform_request(method, path, params, body, headers)
|
69
|
+
)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,66 @@
|
|
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 the information about the capabilities of fields among multiple indices.
|
25
|
+
#
|
26
|
+
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (*). To target 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 [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+. Server default: open.
|
29
|
+
# @option arguments [String, Array<String>] :fields Comma-separated list of fields to retrieve capabilities for. Wildcard (+*+) expressions are supported.
|
30
|
+
# @option arguments [Boolean] :ignore_unavailable If +true+, missing or closed indices are not included in the response.
|
31
|
+
# @option arguments [Boolean] :include_unmapped If true, unmapped fields are included in the response.
|
32
|
+
# @option arguments [String] :filters An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent
|
33
|
+
# @option arguments [Array<String>] :types Only return results for fields that have one of the types in the list
|
34
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
35
|
+
# @option arguments [Hash] :body request body
|
36
|
+
#
|
37
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html
|
38
|
+
#
|
39
|
+
def field_caps(arguments = {})
|
40
|
+
arguments = arguments.clone
|
41
|
+
headers = arguments.delete(:headers) || {}
|
42
|
+
|
43
|
+
body = arguments.delete(:body)
|
44
|
+
|
45
|
+
_index = arguments.delete(:index)
|
46
|
+
|
47
|
+
method = if body
|
48
|
+
ElasticsearchServerless::API::HTTP_POST
|
49
|
+
else
|
50
|
+
ElasticsearchServerless::API::HTTP_GET
|
51
|
+
end
|
52
|
+
|
53
|
+
path = if _index
|
54
|
+
"#{Utils.listify(_index)}/_field_caps"
|
55
|
+
else
|
56
|
+
"_field_caps"
|
57
|
+
end
|
58
|
+
params = Utils.process_params(arguments)
|
59
|
+
|
60
|
+
ElasticsearchServerless::API::Response.new(
|
61
|
+
perform_request(method, path, params, body, headers)
|
62
|
+
)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|