elasticsearch-api 6.8.3 → 7.0.0.pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +17 -1
- data/LICENSE.txt +199 -10
- data/README.md +3 -3
- data/Rakefile +23 -6
- data/elasticsearch-api.gemspec +77 -43
- data/lib/elasticsearch-api.rb +16 -3
- data/lib/elasticsearch/api.rb +18 -5
- data/lib/elasticsearch/api/actions/abort_benchmark.rb +17 -4
- data/lib/elasticsearch/api/actions/benchmark.rb +18 -5
- data/lib/elasticsearch/api/actions/bulk.rb +18 -7
- data/lib/elasticsearch/api/actions/cat/aliases.rb +25 -11
- data/lib/elasticsearch/api/actions/cat/allocation.rb +26 -12
- data/lib/elasticsearch/api/actions/cat/count.rb +25 -11
- data/lib/elasticsearch/api/actions/cat/fielddata.rb +23 -11
- data/lib/elasticsearch/api/actions/cat/health.rb +26 -12
- data/lib/elasticsearch/api/actions/cat/help.rb +18 -6
- data/lib/elasticsearch/api/actions/cat/indices.rb +28 -13
- data/lib/elasticsearch/api/actions/cat/master.rb +25 -11
- data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +19 -7
- data/lib/elasticsearch/api/actions/cat/nodes.rb +25 -11
- data/lib/elasticsearch/api/actions/cat/params_registry.rb +19 -6
- data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +25 -11
- data/lib/elasticsearch/api/actions/cat/plugins.rb +21 -8
- data/lib/elasticsearch/api/actions/cat/recovery.rb +26 -11
- data/lib/elasticsearch/api/actions/cat/repositories.rb +18 -7
- data/lib/elasticsearch/api/actions/cat/segments.rb +22 -10
- data/lib/elasticsearch/api/actions/cat/shards.rb +26 -12
- data/lib/elasticsearch/api/actions/cat/snapshots.rb +19 -9
- data/lib/elasticsearch/api/actions/cat/tasks.rb +20 -6
- data/lib/elasticsearch/api/actions/cat/templates.rb +21 -8
- data/lib/elasticsearch/api/actions/cat/thread_pool.rb +33 -16
- data/lib/elasticsearch/api/actions/clear_scroll.rb +19 -15
- data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +20 -6
- data/lib/elasticsearch/api/actions/cluster/get_settings.rb +19 -7
- data/lib/elasticsearch/api/actions/cluster/health.rb +35 -13
- data/lib/elasticsearch/api/actions/cluster/params_registry.rb +19 -6
- data/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +20 -6
- data/lib/elasticsearch/api/actions/cluster/put_settings.rb +19 -8
- data/lib/elasticsearch/api/actions/cluster/remote_info.rb +17 -10
- data/lib/elasticsearch/api/actions/cluster/reroute.rb +23 -10
- data/lib/elasticsearch/api/actions/cluster/state.rb +28 -18
- data/lib/elasticsearch/api/actions/cluster/stats.rb +21 -16
- data/lib/elasticsearch/api/actions/count.rb +18 -4
- data/lib/elasticsearch/api/actions/create.rb +16 -3
- data/lib/elasticsearch/api/actions/delete.rb +24 -19
- data/lib/elasticsearch/api/actions/delete_by_query.rb +18 -5
- data/lib/elasticsearch/api/actions/{delete_by_query_rethrottle.rb → delete_by_rethrottle.rb} +18 -5
- data/lib/elasticsearch/api/actions/delete_script.rb +18 -5
- data/lib/elasticsearch/api/actions/exists.rb +18 -6
- data/lib/elasticsearch/api/actions/exists_source.rb +16 -3
- data/lib/elasticsearch/api/actions/explain.rb +30 -10
- data/lib/elasticsearch/api/actions/field_caps.rb +18 -6
- data/lib/elasticsearch/api/actions/get.rb +20 -6
- data/lib/elasticsearch/api/actions/get_script.rb +22 -9
- data/lib/elasticsearch/api/actions/get_source.rb +32 -10
- data/lib/elasticsearch/api/actions/index.rb +37 -17
- data/lib/elasticsearch/api/actions/indices/analyze.rb +32 -6
- data/lib/elasticsearch/api/actions/indices/clear_cache.rb +20 -8
- data/lib/elasticsearch/api/actions/indices/close.rb +31 -11
- data/lib/elasticsearch/api/actions/indices/create.rb +36 -24
- data/lib/elasticsearch/api/actions/indices/delete.rb +21 -7
- data/lib/elasticsearch/api/actions/indices/delete_alias.rb +20 -8
- data/lib/elasticsearch/api/actions/indices/delete_template.rb +18 -6
- data/lib/elasticsearch/api/actions/indices/exists.rb +32 -12
- data/lib/elasticsearch/api/actions/indices/exists_alias.rb +30 -10
- data/lib/elasticsearch/api/actions/indices/exists_template.rb +20 -8
- data/lib/elasticsearch/api/actions/indices/exists_type.rb +31 -10
- data/lib/elasticsearch/api/actions/indices/flush.rb +26 -9
- data/lib/elasticsearch/api/actions/indices/flush_synced.rb +18 -5
- data/lib/elasticsearch/api/actions/indices/forcemerge.rb +18 -5
- data/lib/elasticsearch/api/actions/indices/freeze.rb +1 -4
- data/lib/elasticsearch/api/actions/indices/get.rb +21 -7
- data/lib/elasticsearch/api/actions/indices/get_alias.rb +18 -5
- data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +21 -7
- data/lib/elasticsearch/api/actions/indices/get_mapping.rb +21 -8
- data/lib/elasticsearch/api/actions/indices/get_settings.rb +18 -5
- data/lib/elasticsearch/api/actions/indices/get_template.rb +21 -7
- data/lib/elasticsearch/api/actions/indices/open.rb +18 -5
- data/lib/elasticsearch/api/actions/indices/params_registry.rb +19 -6
- data/lib/elasticsearch/api/actions/indices/put_alias.rb +18 -5
- data/lib/elasticsearch/api/actions/indices/put_mapping.rb +23 -11
- data/lib/elasticsearch/api/actions/indices/put_settings.rb +18 -5
- data/lib/elasticsearch/api/actions/indices/put_template.rb +21 -7
- data/lib/elasticsearch/api/actions/indices/recovery.rb +19 -6
- data/lib/elasticsearch/api/actions/indices/refresh.rb +18 -5
- data/lib/elasticsearch/api/actions/indices/rollover.rb +21 -7
- data/lib/elasticsearch/api/actions/indices/segments.rb +18 -5
- data/lib/elasticsearch/api/actions/indices/shard_stores.rb +18 -5
- data/lib/elasticsearch/api/actions/indices/shrink.rb +18 -7
- data/lib/elasticsearch/api/actions/indices/split.rb +19 -9
- data/lib/elasticsearch/api/actions/indices/stats.rb +18 -5
- data/lib/elasticsearch/api/actions/indices/unfreeze.rb +0 -4
- data/lib/elasticsearch/api/actions/indices/update_aliases.rb +18 -5
- data/lib/elasticsearch/api/actions/indices/upgrade.rb +18 -5
- data/lib/elasticsearch/api/actions/indices/validate_query.rb +18 -5
- data/lib/elasticsearch/api/actions/info.rb +16 -9
- data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +18 -5
- data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +20 -8
- data/lib/elasticsearch/api/actions/ingest/params_registry.rb +19 -6
- data/lib/elasticsearch/api/actions/ingest/processor_grok.rb +0 -4
- data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +18 -5
- data/lib/elasticsearch/api/actions/ingest/simulate.rb +22 -9
- data/lib/elasticsearch/api/actions/mget.rb +17 -4
- data/lib/elasticsearch/api/actions/msearch.rb +21 -7
- data/lib/elasticsearch/api/actions/msearch_template.rb +21 -6
- data/lib/elasticsearch/api/actions/mtermvectors.rb +18 -5
- data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +20 -5
- data/lib/elasticsearch/api/actions/nodes/info.rb +44 -11
- data/lib/elasticsearch/api/actions/nodes/params_registry.rb +19 -6
- data/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +19 -12
- data/lib/elasticsearch/api/actions/nodes/shutdown.rb +17 -4
- data/lib/elasticsearch/api/actions/nodes/stats.rb +18 -5
- data/lib/elasticsearch/api/actions/nodes/usage.rb +3 -7
- data/lib/elasticsearch/api/actions/params_registry.rb +19 -6
- data/lib/elasticsearch/api/actions/ping.rb +16 -9
- data/lib/elasticsearch/api/actions/put_script.rb +18 -6
- data/lib/elasticsearch/api/actions/rank_eval.rb +17 -4
- data/lib/elasticsearch/api/actions/reindex.rb +19 -5
- data/lib/elasticsearch/api/actions/reindex_rethrottle.rb +17 -4
- data/lib/elasticsearch/api/actions/remote/info.rb +16 -3
- data/lib/elasticsearch/api/actions/render_search_template.rb +18 -5
- data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +16 -9
- data/lib/elasticsearch/api/actions/scroll.rb +19 -6
- data/lib/elasticsearch/api/actions/search.rb +72 -39
- data/lib/elasticsearch/api/actions/search_shards.rb +31 -11
- data/lib/elasticsearch/api/actions/search_template.rb +21 -6
- data/lib/elasticsearch/api/actions/snapshot/create.rb +20 -6
- data/lib/elasticsearch/api/actions/snapshot/create_repository.rb +18 -5
- data/lib/elasticsearch/api/actions/snapshot/delete.rb +20 -7
- data/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +19 -5
- data/lib/elasticsearch/api/actions/snapshot/get.rb +21 -7
- data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +23 -7
- data/lib/elasticsearch/api/actions/snapshot/params_registry.rb +19 -6
- data/lib/elasticsearch/api/actions/snapshot/restore.rb +18 -5
- data/lib/elasticsearch/api/actions/snapshot/status.rb +23 -8
- data/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +18 -5
- data/lib/elasticsearch/api/actions/tasks/cancel.rb +18 -5
- data/lib/elasticsearch/api/actions/tasks/get.rb +18 -5
- data/lib/elasticsearch/api/actions/tasks/list.rb +18 -5
- data/lib/elasticsearch/api/actions/tasks/params_registry.rb +19 -6
- data/lib/elasticsearch/api/actions/termvectors.rb +33 -18
- data/lib/elasticsearch/api/actions/update.rb +61 -26
- data/lib/elasticsearch/api/actions/update_by_query.rb +18 -5
- data/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +16 -3
- data/lib/elasticsearch/api/namespace/cat.rb +16 -3
- data/lib/elasticsearch/api/namespace/cluster.rb +16 -3
- data/lib/elasticsearch/api/namespace/common.rb +16 -3
- data/lib/elasticsearch/api/namespace/indices.rb +16 -3
- data/lib/elasticsearch/api/namespace/ingest.rb +16 -3
- data/lib/elasticsearch/api/namespace/nodes.rb +16 -3
- data/lib/elasticsearch/api/namespace/remote.rb +16 -3
- data/lib/elasticsearch/api/namespace/snapshot.rb +16 -3
- data/lib/elasticsearch/api/namespace/tasks.rb +16 -3
- data/lib/elasticsearch/api/utils.rb +16 -3
- data/lib/elasticsearch/api/version.rb +17 -4
- data/spec/elasticsearch/api/actions/abort_benchmark_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/benchmark_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/bulk_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cat/aliases_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cat/allocation_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cat/count_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cat/fielddata_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cat/health_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cat/help_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cat/indices_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cat/master_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cat/nodes_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cat/plugins_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cat/recovery_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cat/repositories_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cat/segments_spec.rb +33 -4
- data/spec/elasticsearch/api/actions/cat/shards_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cat/snapshot_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cat/tasks_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cat/templates_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/clear_scroll_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cluster/allocation_explain_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cluster/get_settings_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cluster/health_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cluster/pending_tasks_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cluster/put_settings_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cluster/remote_info_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cluster/reroute_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cluster/state_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/cluster/stats_spec.rb +16 -20
- data/spec/elasticsearch/api/actions/count_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/create_document_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/delete_by_query_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/delete_document_spec.rb +16 -9
- data/spec/elasticsearch/api/actions/delete_script_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/exists_document_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/explain_document_spec.rb +17 -10
- data/spec/elasticsearch/api/actions/field_caps_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/get_document_source_spec.rb +17 -4
- data/spec/elasticsearch/api/actions/get_document_spec.rb +17 -4
- data/spec/elasticsearch/api/actions/get_script_spec.rb +22 -16
- data/spec/elasticsearch/api/actions/hashie_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/index_document_spec.rb +16 -9
- data/spec/elasticsearch/api/actions/indices/analyze_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/clear_cache_spec.rb +19 -6
- data/spec/elasticsearch/api/actions/indices/close_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/create_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/delete_alias_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/delete_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/delete_template_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/exists_alias_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/exists_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/exists_template_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/exists_type_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/flush_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/flush_synced_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/forcemerge_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/freeze_spec.rb +68 -0
- data/spec/elasticsearch/api/actions/indices/get_alias_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/get_field_mapping_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/get_mapping_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/get_settings_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/get_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/open_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/put_alias_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/put_mapping_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/put_settings_spec.rb +31 -3
- data/spec/elasticsearch/api/actions/indices/put_template_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/recovery_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/refresh_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/rollover_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/segments_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/shard_stores_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/shrink_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/split_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/stats_spec.rb +125 -0
- data/spec/elasticsearch/api/actions/indices/unfreeze_spec.rb +68 -0
- data/spec/elasticsearch/api/actions/indices/update_aliases_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/upgrade_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/indices/validate_query_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/info_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/ingest/delete_pipeline_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/ingest/get_pipeline_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/ingest/put_pipeline_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/ingest/simulate_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/json_builders_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/mget_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/msearch_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/msearch_template_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/mtermvectors_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/nodes/info_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/nodes/shutdown_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/nodes/stats_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/ping_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/put_script_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/reindex_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/remote/info_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/render_search_template_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/scoll_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/search_shards_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/search_spec.rb +31 -3
- data/spec/elasticsearch/api/actions/search_template_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/snapshot/create_repository_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/snapshot/create_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/snapshot/delete_repository_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/snapshot/delete_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/snapshot/get_repository_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/snapshot/get_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/snapshot/restore_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/snapshot/status_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/snapshot/verify_repository_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/tasks/cancel_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/tasks/get_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/tasks/list_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/termvectors_spec.rb +16 -9
- data/spec/elasticsearch/api/actions/update_by_query_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/update_document_spec.rb +16 -9
- data/spec/elasticsearch/api/api_spec.rb +16 -3
- data/spec/elasticsearch/api/client_spec.rb +16 -3
- data/spec/elasticsearch/api/utils_spec.rb +16 -3
- data/spec/spec_helper.rb +16 -14
- data/test/integration/yaml_test_runner.rb +84 -42
- data/test/test_helper.rb +86 -14
- data/utils/Gemfile +17 -0
- data/utils/Thorfile +17 -0
- data/utils/thor/generate_api.rb +16 -3
- data/utils/thor/generate_source.rb +22 -6
- data/utils/thor/lister.rb +16 -3
- data/utils/thor/templates/ruby/method.erb +22 -7
- data/utils/thor/templates/ruby/test.erb +17 -0
- data/utils/thor/templates/ruby/test_helper.rb +16 -4
- metadata +56 -122
- data/lib/elasticsearch/api/actions/count_percolate.rb +0 -86
- data/lib/elasticsearch/api/actions/delete_template.rb +0 -25
- data/lib/elasticsearch/api/actions/field_stats.rb +0 -40
- data/lib/elasticsearch/api/actions/get_template.rb +0 -31
- data/lib/elasticsearch/api/actions/indices/delete_mapping.rb +0 -30
- data/lib/elasticsearch/api/actions/indices/delete_warmer.rb +0 -36
- data/lib/elasticsearch/api/actions/indices/get_aliases.rb +0 -41
- data/lib/elasticsearch/api/actions/indices/get_warmer.rb +0 -66
- data/lib/elasticsearch/api/actions/indices/optimize.rb +0 -81
- data/lib/elasticsearch/api/actions/indices/put_warmer.rb +0 -69
- data/lib/elasticsearch/api/actions/indices/seal.rb +0 -28
- data/lib/elasticsearch/api/actions/indices/snapshot_index.rb +0 -48
- data/lib/elasticsearch/api/actions/indices/status.rb +0 -67
- data/lib/elasticsearch/api/actions/list_benchmarks.rb +0 -31
- data/lib/elasticsearch/api/actions/mlt.rb +0 -134
- data/lib/elasticsearch/api/actions/mpercolate.rb +0 -66
- data/lib/elasticsearch/api/actions/percolate.rb +0 -77
- data/lib/elasticsearch/api/actions/put_template.rb +0 -29
- data/lib/elasticsearch/api/actions/search_exists.rb +0 -67
- data/lib/elasticsearch/api/actions/suggest.rb +0 -53
- data/spec/elasticsearch/api/actions/count_percolate_spec.rb +0 -21
- data/spec/elasticsearch/api/actions/delete_template_spec.rb +0 -21
- data/spec/elasticsearch/api/actions/field_stats_spec.rb +0 -21
- data/spec/elasticsearch/api/actions/get_template_spec.rb +0 -56
- data/spec/elasticsearch/api/actions/indices/delete_mapping_spec.rb +0 -81
- data/spec/elasticsearch/api/actions/indices/delete_warmer_spec.rb +0 -90
- data/spec/elasticsearch/api/actions/indices/get_aliases_spec.rb +0 -59
- data/spec/elasticsearch/api/actions/indices/get_template_spec.rb +0 -63
- data/spec/elasticsearch/api/actions/indices/get_warmer_spec.rb +0 -52
- data/spec/elasticsearch/api/actions/indices/optimize_spec.rb +0 -67
- data/spec/elasticsearch/api/actions/indices/put_warmer_spec.rb +0 -105
- data/spec/elasticsearch/api/actions/indices/seal_spec.rb +0 -22
- data/spec/elasticsearch/api/actions/indices/snapshot_index_spec.rb +0 -93
- data/spec/elasticsearch/api/actions/indices/status_spec.rb +0 -96
- data/spec/elasticsearch/api/actions/list_benchmarks_spec.rb +0 -21
- data/spec/elasticsearch/api/actions/mlt_spec.rb +0 -134
- data/spec/elasticsearch/api/actions/mpercolate_spec.rb +0 -53
- data/spec/elasticsearch/api/actions/put_template_spec.rb +0 -21
- data/spec/elasticsearch/api/actions/rank_eval_spec.rb +0 -113
- data/spec/elasticsearch/api/actions/search_exists_spec.rb +0 -67
- data/spec/elasticsearch/api/actions/suggest_spec.rb +0 -81
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
|
2
|
-
#
|
|
3
|
-
#
|
|
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.
|
|
4
17
|
|
|
5
18
|
module Elasticsearch
|
|
6
19
|
module API
|
|
@@ -9,24 +22,16 @@ module Elasticsearch
|
|
|
9
22
|
|
|
10
23
|
# Returns statistical information about the cluster
|
|
11
24
|
#
|
|
12
|
-
#
|
|
13
|
-
# @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned
|
|
14
|
-
# information; use `_local` to return information from the node you're connecting to, leave empty to get
|
|
15
|
-
# information from all nodes
|
|
25
|
+
# @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
|
|
16
26
|
# @option arguments [Boolean] :flat_settings Return settings in flat format (default: false)
|
|
27
|
+
# @option arguments [Boolean] :human Whether to return time and byte values in human-readable format.
|
|
17
28
|
# @option arguments [Time] :timeout Explicit operation timeout
|
|
18
29
|
#
|
|
19
|
-
# @see http://www.elastic.co/guide/en/elasticsearch/reference/
|
|
30
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html
|
|
20
31
|
#
|
|
21
32
|
def stats(arguments={})
|
|
22
33
|
method = 'GET'
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if node_id
|
|
26
|
-
path = Utils.__pathify("_cluster/stats/nodes", node_id)
|
|
27
|
-
else
|
|
28
|
-
path = "_cluster/stats"
|
|
29
|
-
end
|
|
34
|
+
path = "_cluster/stats"
|
|
30
35
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
|
31
36
|
body = nil
|
|
32
37
|
|
|
@@ -35,7 +40,7 @@ module Elasticsearch
|
|
|
35
40
|
|
|
36
41
|
# Register this action with its valid params when the module is loaded.
|
|
37
42
|
#
|
|
38
|
-
# @since 6.
|
|
43
|
+
# @since 6.1.1
|
|
39
44
|
ParamsRegistry.register(:stats, [
|
|
40
45
|
:flat_settings,
|
|
41
46
|
:timeout ].freeze)
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
|
2
|
-
#
|
|
3
|
-
#
|
|
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.
|
|
4
17
|
|
|
5
18
|
module Elasticsearch
|
|
6
19
|
module API
|
|
@@ -20,6 +33,7 @@ module Elasticsearch
|
|
|
20
33
|
#
|
|
21
34
|
# index: 'my_index', body: { filtered: { filter: { terms: { foo: ['bar'] } } } }
|
|
22
35
|
#
|
|
36
|
+
#
|
|
23
37
|
# @option arguments [List] :index A comma-separated list of indices to restrict the results
|
|
24
38
|
# @option arguments [List] :type A comma-separated list of types to restrict the results
|
|
25
39
|
# @option arguments [Hash] :body A query to restrict the results specified with the Query DSL (optional)
|
|
@@ -52,7 +66,7 @@ module Elasticsearch
|
|
|
52
66
|
|
|
53
67
|
# Register this action with its valid params when the module is loaded.
|
|
54
68
|
#
|
|
55
|
-
# @since 6.
|
|
69
|
+
# @since 6.1.1
|
|
56
70
|
ParamsRegistry.register(:count, [
|
|
57
71
|
:ignore_unavailable,
|
|
58
72
|
:ignore_throttled,
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
|
2
|
-
#
|
|
3
|
-
#
|
|
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.
|
|
4
17
|
|
|
5
18
|
module Elasticsearch
|
|
6
19
|
module API
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
|
2
|
-
#
|
|
3
|
-
#
|
|
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.
|
|
4
17
|
|
|
5
18
|
module Elasticsearch
|
|
6
19
|
module API
|
|
@@ -18,31 +31,23 @@ module Elasticsearch
|
|
|
18
31
|
#
|
|
19
32
|
# @option arguments [String] :id The document ID (*Required*)
|
|
20
33
|
# @option arguments [String] :index The name of the index (*Required*)
|
|
21
|
-
# @option arguments [String] :type The type of the document
|
|
22
|
-
# @option arguments [String] :wait_for_active_shards Sets the number of shard copies that must be active before
|
|
23
|
-
# proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all
|
|
24
|
-
# shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for
|
|
25
|
-
# the shard (number of replicas + 1)
|
|
34
|
+
# @option arguments [String] :type The type of the document
|
|
35
|
+
# @option arguments [String] :wait_for_active_shards Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
|
|
26
36
|
# @option arguments [String] :parent ID of parent document
|
|
27
|
-
# @option arguments [String] :refresh If `true` then refresh the effected shards to make this operation visible
|
|
28
|
-
# to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false`
|
|
29
|
-
# (the default) then do nothing with refreshes. (options: true, false, wait_for)
|
|
37
|
+
# @option arguments [String] :refresh If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (options: true, false, wait_for)
|
|
30
38
|
# @option arguments [String] :routing Specific routing value
|
|
31
39
|
# @option arguments [Time] :timeout Explicit operation timeout
|
|
32
|
-
# @option arguments [Number] :if_seq_no only perform the delete operation if the last operation that has changed
|
|
33
|
-
#
|
|
34
|
-
# @option arguments [Number] :if_primary_term only perform the delete operation if the last operation that has
|
|
35
|
-
# changed the document has the specified primary term
|
|
40
|
+
# @option arguments [Number] :if_seq_no only perform the delete operation if the last operation that has changed the document has the specified sequence number
|
|
41
|
+
# @option arguments [Number] :if_primary_term only perform the delete operation if the last operation that has changed the document has the specified primary term
|
|
36
42
|
# @option arguments [Number] :version Explicit version number for concurrency control
|
|
37
|
-
# @option arguments [String] :version_type Specific version type
|
|
38
|
-
# (options: internal, external, external_gte, force)
|
|
43
|
+
# @option arguments [String] :version_type Specific version type (options: internal, external, external_gte, force)
|
|
39
44
|
#
|
|
40
45
|
# @see http://elasticsearch.org/guide/reference/api/delete/
|
|
41
46
|
#
|
|
42
47
|
def delete(arguments={})
|
|
43
48
|
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
|
44
|
-
raise ArgumentError, "Required argument 'type' missing" unless arguments[:type]
|
|
45
49
|
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
|
50
|
+
arguments[:type] ||= DEFAULT_DOC
|
|
46
51
|
|
|
47
52
|
method = HTTP_DELETE
|
|
48
53
|
path = Utils.__pathify Utils.__escape(arguments[:index]),
|
|
@@ -61,7 +66,7 @@ module Elasticsearch
|
|
|
61
66
|
|
|
62
67
|
# Register this action with its valid params when the module is loaded.
|
|
63
68
|
#
|
|
64
|
-
# @since 6.
|
|
69
|
+
# @since 6.1.1
|
|
65
70
|
ParamsRegistry.register(:delete, [
|
|
66
71
|
:wait_for_active_shards,
|
|
67
72
|
:parent,
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
|
2
|
-
#
|
|
3
|
-
#
|
|
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.
|
|
4
17
|
|
|
5
18
|
module Elasticsearch
|
|
6
19
|
module API
|
|
@@ -55,7 +68,7 @@ module Elasticsearch
|
|
|
55
68
|
# @option arguments [Number] :requests_per_second The throttle for this request in sub-requests per second. -1 means no throttle.
|
|
56
69
|
# @option arguments [Number] :slices The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks.
|
|
57
70
|
#
|
|
58
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/
|
|
71
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html
|
|
59
72
|
#
|
|
60
73
|
def delete_by_query(arguments={})
|
|
61
74
|
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
|
@@ -72,7 +85,7 @@ module Elasticsearch
|
|
|
72
85
|
|
|
73
86
|
# Register this action with its valid params when the module is loaded.
|
|
74
87
|
#
|
|
75
|
-
# @since 6.
|
|
88
|
+
# @since 6.1.1
|
|
76
89
|
ParamsRegistry.register(:delete_by_query, [
|
|
77
90
|
:analyzer,
|
|
78
91
|
:analyze_wildcard,
|
data/lib/elasticsearch/api/actions/{delete_by_query_rethrottle.rb → delete_by_rethrottle.rb}
RENAMED
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
|
2
|
-
#
|
|
3
|
-
#
|
|
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.
|
|
4
17
|
|
|
5
18
|
module Elasticsearch
|
|
6
19
|
module API
|
|
@@ -8,8 +21,8 @@ module Elasticsearch
|
|
|
8
21
|
|
|
9
22
|
# The value of requests_per_second can be changed on a running delete by query using the _rethrottle API
|
|
10
23
|
#
|
|
11
|
-
# @option arguments [String] :task_id The task id to rethrottle (*Required*)
|
|
12
|
-
# @option arguments [Number] :requests_per_second The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
|
|
24
|
+
# @option arguments [String] :task_id The task id to rethrottle (*Required*)
|
|
25
|
+
# @option arguments [Number] :requests_per_second The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
|
|
13
26
|
#
|
|
14
27
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html
|
|
15
28
|
#
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
|
2
|
-
#
|
|
3
|
-
#
|
|
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.
|
|
4
17
|
|
|
5
18
|
module Elasticsearch
|
|
6
19
|
module API
|
|
@@ -12,7 +25,7 @@ module Elasticsearch
|
|
|
12
25
|
# @option arguments [Time] :timeout Explicit operation timeout
|
|
13
26
|
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
|
14
27
|
#
|
|
15
|
-
# @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/
|
|
28
|
+
# @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html
|
|
16
29
|
#
|
|
17
30
|
def delete_script(arguments={})
|
|
18
31
|
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
|
@@ -26,7 +39,7 @@ module Elasticsearch
|
|
|
26
39
|
|
|
27
40
|
# Register this action with its valid params when the module is loaded.
|
|
28
41
|
#
|
|
29
|
-
# @since 6.
|
|
42
|
+
# @since 6.1.1
|
|
30
43
|
ParamsRegistry.register(:delete_script, [
|
|
31
44
|
:timeout,
|
|
32
45
|
:master_timeout ].freeze)
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
|
2
|
-
#
|
|
3
|
-
#
|
|
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.
|
|
4
17
|
|
|
5
18
|
module Elasticsearch
|
|
6
19
|
module API
|
|
@@ -14,7 +27,7 @@ module Elasticsearch
|
|
|
14
27
|
#
|
|
15
28
|
# @option arguments [String] :id The document ID (*Required*)
|
|
16
29
|
# @option arguments [String] :index The name of the index (*Required*)
|
|
17
|
-
# @option arguments [String] :type The type of the document (use `_all` to fetch the first document matching the ID across all types)
|
|
30
|
+
# @option arguments [String] :type The type of the document (use `_all` to fetch the first document matching the ID across all types)
|
|
18
31
|
# @option arguments [List] :stored_fields A comma-separated list of stored fields to return in the response
|
|
19
32
|
# @option arguments [String] :parent The ID of the parent document
|
|
20
33
|
# @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
|
|
@@ -48,10 +61,9 @@ module Elasticsearch
|
|
|
48
61
|
end
|
|
49
62
|
alias_method :exists?, :exists
|
|
50
63
|
|
|
51
|
-
|
|
52
64
|
# Register this action with its valid params when the module is loaded.
|
|
53
65
|
#
|
|
54
|
-
# @since 6.
|
|
66
|
+
# @since 6.1.1
|
|
55
67
|
ParamsRegistry.register(:exists, [
|
|
56
68
|
:stored_fields,
|
|
57
69
|
:parent,
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
|
2
|
-
#
|
|
3
|
-
#
|
|
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.
|
|
4
17
|
|
|
5
18
|
module Elasticsearch
|
|
6
19
|
module API
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
|
2
|
-
#
|
|
3
|
-
#
|
|
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.
|
|
4
17
|
|
|
5
18
|
module Elasticsearch
|
|
6
19
|
module API
|
|
@@ -21,7 +34,7 @@ module Elasticsearch
|
|
|
21
34
|
#
|
|
22
35
|
# @option arguments [String] :id The document ID (*Required*)
|
|
23
36
|
# @option arguments [String] :index The name of the index (*Required*)
|
|
24
|
-
# @option arguments [String] :type The type of the document
|
|
37
|
+
# @option arguments [String] :type The type of the document
|
|
25
38
|
# @option arguments [Hash] :body The query definition using the Query DSL
|
|
26
39
|
# @option arguments [Boolean] :analyze_wildcard Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
|
|
27
40
|
# @option arguments [String] :analyzer The analyzer for the query string query
|
|
@@ -36,17 +49,24 @@ module Elasticsearch
|
|
|
36
49
|
# @option arguments [List] :_source True or false to return the _source field or not, or a list of fields to return
|
|
37
50
|
# @option arguments [List] :_source_excludes A list of fields to exclude from the returned _source field
|
|
38
51
|
# @option arguments [List] :_source_includes A list of fields to extract and return from the _source field
|
|
52
|
+
#
|
|
39
53
|
# @see http://elasticsearch.org/guide/reference/api/explain/
|
|
40
54
|
#
|
|
41
55
|
def explain(arguments={})
|
|
42
56
|
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
|
43
|
-
raise ArgumentError, "Required argument 'type' missing" unless arguments[:type]
|
|
44
57
|
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
|
45
58
|
method = HTTP_GET
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
59
|
+
|
|
60
|
+
if arguments[:type]
|
|
61
|
+
path = Utils.__pathify Utils.__escape(arguments[:index]),
|
|
62
|
+
Utils.__escape(arguments[:type]),
|
|
63
|
+
Utils.__escape(arguments[:id]),
|
|
64
|
+
'_explain'
|
|
65
|
+
else
|
|
66
|
+
path = Utils.__pathify Utils.__escape(arguments[:index]),
|
|
67
|
+
'_explain',
|
|
68
|
+
Utils.__escape(arguments[:id])
|
|
69
|
+
end
|
|
50
70
|
|
|
51
71
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
|
52
72
|
body = arguments[:body]
|
|
@@ -58,7 +78,7 @@ module Elasticsearch
|
|
|
58
78
|
|
|
59
79
|
# Register this action with its valid params when the module is loaded.
|
|
60
80
|
#
|
|
61
|
-
# @since 6.
|
|
81
|
+
# @since 6.1.1
|
|
62
82
|
ParamsRegistry.register(:explain, [
|
|
63
83
|
:analyze_wildcard,
|
|
64
84
|
:analyzer,
|