elasticsearch-api 6.3.0 → 6.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/Rakefile +1 -1
- data/elasticsearch-api.gemspec +43 -60
- data/lib/elasticsearch-api.rb +4 -0
- data/lib/elasticsearch/api.rb +6 -1
- data/lib/elasticsearch/api/actions/abort_benchmark.rb +4 -0
- data/lib/elasticsearch/api/actions/benchmark.rb +4 -0
- data/lib/elasticsearch/api/actions/bulk.rb +4 -0
- data/lib/elasticsearch/api/actions/cat/aliases.rb +4 -0
- data/lib/elasticsearch/api/actions/cat/allocation.rb +4 -0
- data/lib/elasticsearch/api/actions/cat/count.rb +4 -0
- data/lib/elasticsearch/api/actions/cat/fielddata.rb +4 -0
- data/lib/elasticsearch/api/actions/cat/health.rb +4 -0
- data/lib/elasticsearch/api/actions/cat/help.rb +4 -0
- data/lib/elasticsearch/api/actions/cat/indices.rb +4 -0
- data/lib/elasticsearch/api/actions/cat/master.rb +4 -0
- data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +4 -0
- data/lib/elasticsearch/api/actions/cat/nodes.rb +4 -0
- data/lib/elasticsearch/api/actions/cat/params_registry.rb +4 -0
- data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +4 -0
- data/lib/elasticsearch/api/actions/cat/plugins.rb +4 -0
- data/lib/elasticsearch/api/actions/cat/recovery.rb +4 -0
- data/lib/elasticsearch/api/actions/cat/repositories.rb +4 -0
- data/lib/elasticsearch/api/actions/cat/segments.rb +4 -0
- data/lib/elasticsearch/api/actions/cat/shards.rb +4 -0
- data/lib/elasticsearch/api/actions/cat/snapshots.rb +4 -0
- data/lib/elasticsearch/api/actions/cat/tasks.rb +4 -0
- data/lib/elasticsearch/api/actions/cat/templates.rb +4 -0
- data/lib/elasticsearch/api/actions/cat/thread_pool.rb +4 -0
- data/lib/elasticsearch/api/actions/clear_scroll.rb +4 -0
- data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +4 -0
- data/lib/elasticsearch/api/actions/cluster/get_settings.rb +4 -0
- data/lib/elasticsearch/api/actions/cluster/health.rb +4 -0
- data/lib/elasticsearch/api/actions/cluster/params_registry.rb +4 -0
- data/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +4 -0
- data/lib/elasticsearch/api/actions/cluster/put_settings.rb +4 -0
- data/lib/elasticsearch/api/actions/cluster/remote_info.rb +4 -0
- data/lib/elasticsearch/api/actions/cluster/reroute.rb +4 -0
- data/lib/elasticsearch/api/actions/cluster/state.rb +4 -0
- data/lib/elasticsearch/api/actions/cluster/stats.rb +4 -0
- data/lib/elasticsearch/api/actions/count.rb +4 -0
- data/lib/elasticsearch/api/actions/count_percolate.rb +4 -0
- data/lib/elasticsearch/api/actions/create.rb +4 -0
- data/lib/elasticsearch/api/actions/delete.rb +4 -0
- data/lib/elasticsearch/api/actions/delete_by_query.rb +4 -0
- data/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +4 -0
- data/lib/elasticsearch/api/actions/delete_script.rb +4 -0
- data/lib/elasticsearch/api/actions/delete_template.rb +25 -0
- data/lib/elasticsearch/api/actions/exists.rb +4 -0
- data/lib/elasticsearch/api/actions/exists_source.rb +4 -0
- data/lib/elasticsearch/api/actions/explain.rb +4 -0
- data/lib/elasticsearch/api/actions/field_caps.rb +4 -0
- data/lib/elasticsearch/api/actions/field_stats.rb +40 -0
- data/lib/elasticsearch/api/actions/get.rb +4 -0
- data/lib/elasticsearch/api/actions/get_script.rb +4 -0
- data/lib/elasticsearch/api/actions/get_source.rb +4 -0
- data/lib/elasticsearch/api/actions/get_template.rb +31 -0
- data/lib/elasticsearch/api/actions/index.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/analyze.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/clear_cache.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/close.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/create.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/delete.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/delete_alias.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/delete_mapping.rb +30 -0
- data/lib/elasticsearch/api/actions/indices/delete_template.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/delete_warmer.rb +36 -0
- data/lib/elasticsearch/api/actions/indices/exists.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/exists_alias.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/exists_template.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/exists_type.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/flush.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/flush_synced.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/forcemerge.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/freeze.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/get.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/get_alias.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/get_aliases.rb +41 -0
- data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/get_mapping.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/get_settings.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/get_template.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/get_warmer.rb +66 -0
- data/lib/elasticsearch/api/actions/indices/open.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/optimize.rb +81 -0
- data/lib/elasticsearch/api/actions/indices/params_registry.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/put_alias.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/put_mapping.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/put_settings.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/put_template.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/put_warmer.rb +69 -0
- data/lib/elasticsearch/api/actions/indices/recovery.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/refresh.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/rollover.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/seal.rb +28 -0
- data/lib/elasticsearch/api/actions/indices/segments.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/shard_stores.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/shrink.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/snapshot_index.rb +48 -0
- data/lib/elasticsearch/api/actions/indices/split.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/stats.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/status.rb +67 -0
- data/lib/elasticsearch/api/actions/indices/unfreeze.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/update_aliases.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/upgrade.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/validate_query.rb +4 -0
- data/lib/elasticsearch/api/actions/info.rb +4 -0
- data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +4 -0
- data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +4 -0
- data/lib/elasticsearch/api/actions/ingest/params_registry.rb +4 -0
- data/lib/elasticsearch/api/actions/ingest/processor_grok.rb +4 -0
- data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +4 -0
- data/lib/elasticsearch/api/actions/ingest/simulate.rb +4 -0
- data/lib/elasticsearch/api/actions/list_benchmarks.rb +31 -0
- data/lib/elasticsearch/api/actions/mget.rb +4 -0
- data/lib/elasticsearch/api/actions/mlt.rb +134 -0
- data/lib/elasticsearch/api/actions/mpercolate.rb +66 -0
- data/lib/elasticsearch/api/actions/msearch.rb +4 -0
- data/lib/elasticsearch/api/actions/msearch_template.rb +4 -0
- data/lib/elasticsearch/api/actions/mtermvectors.rb +4 -0
- data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +4 -0
- data/lib/elasticsearch/api/actions/nodes/info.rb +4 -0
- data/lib/elasticsearch/api/actions/nodes/params_registry.rb +4 -0
- data/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +4 -0
- data/lib/elasticsearch/api/actions/nodes/shutdown.rb +43 -0
- data/lib/elasticsearch/api/actions/nodes/stats.rb +4 -0
- data/lib/elasticsearch/api/actions/nodes/usage.rb +4 -0
- data/lib/elasticsearch/api/actions/params_registry.rb +4 -0
- data/lib/elasticsearch/api/actions/percolate.rb +77 -0
- data/lib/elasticsearch/api/actions/ping.rb +4 -0
- data/lib/elasticsearch/api/actions/put_script.rb +4 -0
- data/lib/elasticsearch/api/actions/put_template.rb +29 -0
- data/lib/elasticsearch/api/actions/rank_eval.rb +5 -1
- data/lib/elasticsearch/api/actions/reindex.rb +4 -0
- data/lib/elasticsearch/api/actions/reindex_rethrottle.rb +4 -0
- data/lib/elasticsearch/api/actions/remote/info.rb +25 -0
- data/lib/elasticsearch/api/actions/render_search_template.rb +4 -0
- data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +4 -0
- data/lib/elasticsearch/api/actions/scroll.rb +4 -0
- data/lib/elasticsearch/api/actions/search.rb +4 -0
- data/lib/elasticsearch/api/actions/search_exists.rb +67 -0
- data/lib/elasticsearch/api/actions/search_shards.rb +4 -0
- data/lib/elasticsearch/api/actions/search_template.rb +4 -0
- data/lib/elasticsearch/api/actions/snapshot/create.rb +4 -0
- data/lib/elasticsearch/api/actions/snapshot/create_repository.rb +4 -0
- data/lib/elasticsearch/api/actions/snapshot/delete.rb +4 -0
- data/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +4 -0
- data/lib/elasticsearch/api/actions/snapshot/get.rb +4 -0
- data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +4 -0
- data/lib/elasticsearch/api/actions/snapshot/params_registry.rb +4 -0
- data/lib/elasticsearch/api/actions/snapshot/restore.rb +4 -0
- data/lib/elasticsearch/api/actions/snapshot/status.rb +4 -0
- data/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +4 -0
- data/lib/elasticsearch/api/actions/suggest.rb +53 -0
- data/lib/elasticsearch/api/actions/tasks/cancel.rb +4 -0
- data/lib/elasticsearch/api/actions/tasks/get.rb +4 -0
- data/lib/elasticsearch/api/actions/tasks/list.rb +4 -0
- data/lib/elasticsearch/api/actions/tasks/params_registry.rb +4 -0
- data/lib/elasticsearch/api/actions/termvectors.rb +4 -0
- data/lib/elasticsearch/api/actions/update.rb +4 -0
- data/lib/elasticsearch/api/actions/update_by_query.rb +4 -0
- data/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +4 -0
- data/lib/elasticsearch/api/namespace/cat.rb +4 -0
- data/lib/elasticsearch/api/namespace/cluster.rb +4 -0
- data/lib/elasticsearch/api/namespace/common.rb +4 -0
- data/lib/elasticsearch/api/namespace/indices.rb +4 -0
- data/lib/elasticsearch/api/namespace/ingest.rb +4 -0
- data/lib/elasticsearch/api/namespace/nodes.rb +4 -0
- data/lib/elasticsearch/api/namespace/remote.rb +4 -0
- data/lib/elasticsearch/api/namespace/snapshot.rb +4 -0
- data/lib/elasticsearch/api/namespace/tasks.rb +4 -0
- data/lib/elasticsearch/api/utils.rb +4 -0
- data/lib/elasticsearch/api/version.rb +5 -1
- data/spec/elasticsearch/api/actions/abort_benchmark_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/benchmark_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/bulk_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cat/aliases_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cat/allocation_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cat/count_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cat/fielddata_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cat/health_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cat/help_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cat/indices_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cat/master_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cat/nodes_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cat/plugins_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cat/recovery_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cat/repositories_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cat/segments_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cat/shards_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cat/snapshot_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cat/tasks_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cat/templates_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/clear_scroll_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cluster/allocation_explain_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cluster/get_settings_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cluster/health_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cluster/pending_tasks_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cluster/put_settings_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cluster/remote_info_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cluster/reroute_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cluster/state_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/cluster/stats_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/count_percolate_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/count_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/create_document_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/delete_by_query_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/delete_document_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/delete_script_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/delete_template_spec.rb +21 -0
- data/spec/elasticsearch/api/actions/exists_document_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/explain_document_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/field_caps_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/field_stats_spec.rb +21 -0
- data/spec/elasticsearch/api/actions/get_document_source_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/get_document_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/get_script_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/get_template_spec.rb +56 -0
- data/spec/elasticsearch/api/actions/hashie_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/index_document_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/analyze_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/clear_cache_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/close_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/create_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/delete_alias_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/delete_mapping_spec.rb +81 -0
- data/spec/elasticsearch/api/actions/indices/delete_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/delete_template_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/delete_warmer_spec.rb +90 -0
- data/spec/elasticsearch/api/actions/indices/exists_alias_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/exists_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/exists_template_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/exists_type_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/flush_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/flush_synced_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/forcemerge_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/get_alias_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/get_aliases_spec.rb +59 -0
- data/spec/elasticsearch/api/actions/indices/get_field_mapping_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/get_mapping_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/get_settings_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/get_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/get_template_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/get_warmer_spec.rb +52 -0
- data/spec/elasticsearch/api/actions/indices/open_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/optimize_spec.rb +67 -0
- data/spec/elasticsearch/api/actions/indices/put_alias_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/put_mapping_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/put_settings_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/put_template_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/put_warmer_spec.rb +105 -0
- data/spec/elasticsearch/api/actions/indices/recovery_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/refresh_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/rollover_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/seal_spec.rb +22 -0
- data/spec/elasticsearch/api/actions/indices/segments_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/shard_stores_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/shrink_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/snapshot_index_spec.rb +93 -0
- data/spec/elasticsearch/api/actions/indices/split_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/status_spec.rb +96 -0
- data/spec/elasticsearch/api/actions/indices/update_aliases_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/upgrade_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/validate_query_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/info_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/ingest/delete_pipeline_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/ingest/get_pipeline_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/ingest/put_pipeline_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/ingest/simulate_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/json_builders_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/list_benchmarks_spec.rb +21 -0
- data/spec/elasticsearch/api/actions/mget_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/mlt_spec.rb +134 -0
- data/spec/elasticsearch/api/actions/mpercolate_spec.rb +53 -0
- data/spec/elasticsearch/api/actions/msearch_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/msearch_template_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/mtermvectors_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/nodes/info_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/nodes/shutdown_spec.rb +63 -0
- data/spec/elasticsearch/api/actions/nodes/stats_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/ping_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/put_script_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/put_template_spec.rb +21 -0
- data/spec/elasticsearch/api/actions/rank_eval_spec.rb +113 -0
- data/spec/elasticsearch/api/actions/reindex_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/remote/info_spec.rb +22 -0
- data/spec/elasticsearch/api/actions/render_search_template_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/scoll_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/search_exists_spec.rb +67 -0
- data/spec/elasticsearch/api/actions/search_shards_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/search_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/search_template_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/snapshot/create_repository_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/snapshot/create_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/snapshot/delete_repository_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/snapshot/delete_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/snapshot/get_repository_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/snapshot/get_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/snapshot/restore_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/snapshot/status_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/snapshot/verify_repository_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/suggest_spec.rb +81 -0
- data/spec/elasticsearch/api/actions/tasks/cancel_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/tasks/get_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/tasks/list_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/termvectors_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/update_by_query_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/update_document_spec.rb +4 -0
- data/spec/elasticsearch/api/api_spec.rb +4 -0
- data/spec/elasticsearch/api/client_spec.rb +4 -0
- data/spec/elasticsearch/api/utils_spec.rb +4 -0
- data/spec/spec_helper.rb +5 -0
- data/test/integration/yaml_test_runner.rb +4 -0
- data/test/test_helper.rb +4 -0
- data/utils/thor/generate_api.rb +4 -0
- data/utils/thor/generate_source.rb +4 -0
- data/utils/thor/lister.rb +4 -0
- data/utils/thor/templates/ruby/test_helper.rb +4 -0
- metadata +124 -51
@@ -1,3 +1,7 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
+
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
+
# See the LICENSE file in the project root for more information
|
4
|
+
|
1
5
|
require 'spec_helper'
|
2
6
|
|
3
7
|
describe 'client.cluster#update_aliases' do
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
+
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
+
# See the LICENSE file in the project root for more information
|
4
|
+
|
1
5
|
require 'spec_helper'
|
2
6
|
|
3
7
|
describe 'client.cluster#upgrade' do
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
+
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
+
# See the LICENSE file in the project root for more information
|
4
|
+
|
1
5
|
require 'spec_helper'
|
2
6
|
|
3
7
|
describe 'client.cluster#validate_query' do
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
+
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
+
# See the LICENSE file in the project root for more information
|
4
|
+
|
1
5
|
require 'spec_helper'
|
2
6
|
|
3
7
|
describe 'client.ingest#delete_pipeline' do
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
+
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
+
# See the LICENSE file in the project root for more information
|
4
|
+
|
1
5
|
require 'spec_helper'
|
2
6
|
|
3
7
|
describe 'client.ingest#get_pipeline' do
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
+
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
+
# See the LICENSE file in the project root for more information
|
4
|
+
|
1
5
|
require 'spec_helper'
|
2
6
|
|
3
7
|
describe 'client.ingest#put_pipeline' do
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
+
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
+
# See the LICENSE file in the project root for more information
|
4
|
+
|
1
5
|
require 'spec_helper'
|
2
6
|
|
3
7
|
describe 'client.ingest#simulate' do
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
+
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
+
# See the LICENSE file in the project root for more information
|
4
|
+
|
5
|
+
require 'spec_helper'
|
6
|
+
|
7
|
+
describe 'client#list_benchmarks' do
|
8
|
+
|
9
|
+
let(:expected_args) do
|
10
|
+
[
|
11
|
+
'GET',
|
12
|
+
'_bench',
|
13
|
+
{ },
|
14
|
+
nil
|
15
|
+
]
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'performs the request' do
|
19
|
+
expect(client_double.list_benchmarks).to eq({})
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,134 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
+
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
+
# See the LICENSE file in the project root for more information
|
4
|
+
|
5
|
+
module Elasticsearch
|
6
|
+
module API
|
7
|
+
module Actions
|
8
|
+
|
9
|
+
# Return documents similar to the specified one.
|
10
|
+
#
|
11
|
+
# Performs a `more_like_this` query with the specified document as the input.
|
12
|
+
#
|
13
|
+
# @example Search for similar documents using the `title` property of document `myindex/mytype/1`
|
14
|
+
#
|
15
|
+
# # First, let's setup a synonym-aware analyzer ("quick" <=> "fast")
|
16
|
+
# client.indices.create index: 'myindex', body: {
|
17
|
+
# settings: {
|
18
|
+
# analysis: {
|
19
|
+
# filter: {
|
20
|
+
# synonyms: {
|
21
|
+
# type: 'synonym',
|
22
|
+
# synonyms: [ "quick,fast" ]
|
23
|
+
# }
|
24
|
+
# },
|
25
|
+
# analyzer: {
|
26
|
+
# title_synonym: {
|
27
|
+
# type: 'custom',
|
28
|
+
# tokenizer: 'whitespace',
|
29
|
+
# filter: ['lowercase', 'stop', 'snowball', 'synonyms']
|
30
|
+
# }
|
31
|
+
# }
|
32
|
+
# }
|
33
|
+
# },
|
34
|
+
# mappings: {
|
35
|
+
# mytype: {
|
36
|
+
# properties: {
|
37
|
+
# title: {
|
38
|
+
# type: 'string',
|
39
|
+
# analyzer: 'title_synonym'
|
40
|
+
# }
|
41
|
+
# }
|
42
|
+
# }
|
43
|
+
# }
|
44
|
+
# }
|
45
|
+
#
|
46
|
+
# # Index three documents
|
47
|
+
# client.index index: 'myindex', type: 'mytype', id: 1, body: { title: 'Quick Brown Fox' }
|
48
|
+
# client.index index: 'myindex', type: 'mytype', id: 2, body: { title: 'Slow Black Dog' }
|
49
|
+
# client.index index: 'myindex', type: 'mytype', id: 3, body: { title: 'Fast White Rabbit' }
|
50
|
+
# client.indices.refresh index: 'myindex'
|
51
|
+
#
|
52
|
+
# client.mlt index: 'myindex', type: 'mytype', id: 1, mlt_fields: 'title', min_doc_freq: 1, min_term_freq: 1
|
53
|
+
# # => { ... {"title"=>"Fast White Rabbit"}}]}}
|
54
|
+
#
|
55
|
+
# @option arguments [String] :id The document ID (*Required*)
|
56
|
+
# @option arguments [String] :index The name of the index (*Required*)
|
57
|
+
# @option arguments [String] :type The type of the document (use `_all` to fetch
|
58
|
+
# the first document matching the ID across all types) (*Required*)
|
59
|
+
# @option arguments [Hash] :body A specific search request definition
|
60
|
+
# @option arguments [Number] :boost_terms The boost factor
|
61
|
+
# @option arguments [Number] :max_doc_freq The word occurrence frequency as count: words with higher occurrence
|
62
|
+
# in the corpus will be ignored
|
63
|
+
# @option arguments [Number] :max_query_terms The maximum query terms to be included in the generated query
|
64
|
+
# @option arguments [Number] :max_word_len The minimum length of the word: longer words will be ignored
|
65
|
+
# @option arguments [Number] :min_doc_freq The word occurrence frequency as count: words with lower occurrence
|
66
|
+
# in the corpus will be ignored
|
67
|
+
# @option arguments [Number] :min_term_freq The term frequency as percent: terms with lower occurence
|
68
|
+
# in the source document will be ignored
|
69
|
+
# @option arguments [Number] :min_word_len The minimum length of the word: shorter words will be ignored
|
70
|
+
# @option arguments [List] :mlt_fields Specific fields to perform the query against
|
71
|
+
# @option arguments [Number] :percent_terms_to_match How many terms have to match in order to consider
|
72
|
+
# the document a match (default: 0.3)
|
73
|
+
# @option arguments [String] :routing Specific routing value
|
74
|
+
# @option arguments [Number] :search_from The offset from which to return results
|
75
|
+
# @option arguments [List] :search_indices A comma-separated list of indices to perform the query against
|
76
|
+
# (default: the index containing the document)
|
77
|
+
# @option arguments [String] :search_query_hint The search query hint
|
78
|
+
# @option arguments [String] :search_scroll A scroll search request definition
|
79
|
+
# @option arguments [Number] :search_size The number of documents to return (default: 10)
|
80
|
+
# @option arguments [String] :search_source A specific search request definition (instead of using the request body)
|
81
|
+
# @option arguments [String] :search_type Specific search type (eg. `dfs_then_fetch`, `count`, etc)
|
82
|
+
# @option arguments [List] :search_types A comma-separated list of types to perform the query against
|
83
|
+
# (default: the same type as the document)
|
84
|
+
# @option arguments [List] :stop_words A list of stop words to be ignored
|
85
|
+
#
|
86
|
+
# @see http://elasticsearch.org/guide/reference/api/more-like-this/
|
87
|
+
#
|
88
|
+
def mlt(arguments={})
|
89
|
+
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
90
|
+
raise ArgumentError, "Required argument 'type' missing" unless arguments[:type]
|
91
|
+
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
92
|
+
method = HTTP_GET
|
93
|
+
path = Utils.__pathify Utils.__escape(arguments[:index]),
|
94
|
+
Utils.__escape(arguments[:type]),
|
95
|
+
Utils.__escape(arguments[:id]),
|
96
|
+
'_mlt'
|
97
|
+
|
98
|
+
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
99
|
+
|
100
|
+
[:mlt_fields, :search_indices, :search_types, :stop_words].each do |name|
|
101
|
+
params[name] = Utils.__listify(params[name]) if params[name]
|
102
|
+
end
|
103
|
+
|
104
|
+
body = arguments[:body]
|
105
|
+
|
106
|
+
perform_request(method, path, params, body).body
|
107
|
+
end
|
108
|
+
|
109
|
+
# Register this action with its valid params when the module is loaded.
|
110
|
+
#
|
111
|
+
# @since 6.2.0
|
112
|
+
ParamsRegistry.register(:mlt, [
|
113
|
+
:boost_terms,
|
114
|
+
:max_doc_freq,
|
115
|
+
:max_query_terms,
|
116
|
+
:max_word_len,
|
117
|
+
:min_doc_freq,
|
118
|
+
:min_term_freq,
|
119
|
+
:min_word_len,
|
120
|
+
:mlt_fields,
|
121
|
+
:percent_terms_to_match,
|
122
|
+
:routing,
|
123
|
+
:search_from,
|
124
|
+
:search_indices,
|
125
|
+
:search_query_hint,
|
126
|
+
:search_scroll,
|
127
|
+
:search_size,
|
128
|
+
:search_source,
|
129
|
+
:search_type,
|
130
|
+
:search_types,
|
131
|
+
:stop_words ].freeze)
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
+
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
+
# See the LICENSE file in the project root for more information
|
4
|
+
|
5
|
+
require 'spec_helper'
|
6
|
+
|
7
|
+
describe 'client#mpercolate' do
|
8
|
+
|
9
|
+
let(:expected_args) do
|
10
|
+
[
|
11
|
+
'GET',
|
12
|
+
'_mpercolate',
|
13
|
+
params,
|
14
|
+
body
|
15
|
+
]
|
16
|
+
end
|
17
|
+
|
18
|
+
let(:body) do
|
19
|
+
nil
|
20
|
+
end
|
21
|
+
|
22
|
+
let(:params) do
|
23
|
+
{}
|
24
|
+
end
|
25
|
+
|
26
|
+
context 'when a body is provided as a document' do
|
27
|
+
|
28
|
+
let(:body) do
|
29
|
+
"{\"percolate\":{\"index\":\"my-index\",\"type\":\"my-type\"}}\n{\"doc\":{\"message\":\"foo bar\"}}\n" +
|
30
|
+
"{\"percolate\":{\"index\":\"my-other-index\",\"type\":\"my-other-type\",\"id\":\"1\"}}\n{}\n"
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'performs the request' do
|
34
|
+
expect(client_double.mpercolate(body: [
|
35
|
+
{ percolate: { index: "my-index", type: "my-type" } },
|
36
|
+
{ doc: { message: "foo bar" } },
|
37
|
+
{ percolate: { index: "my-other-index", type: "my-other-type", id: "1" } },
|
38
|
+
{ }
|
39
|
+
])).to eq({})
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
context 'when a body is provided as a string' do
|
44
|
+
|
45
|
+
let(:body) do
|
46
|
+
%Q|{"foo":"bar"}\n{"moo":"lam"}|
|
47
|
+
end
|
48
|
+
|
49
|
+
it 'performs the request' do
|
50
|
+
expect(client_double.mpercolate(body: %Q|{"foo":"bar"}\n{"moo":"lam"}|)).to eq({})
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
+
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
+
# See the LICENSE file in the project root for more information
|
4
|
+
|
1
5
|
require 'spec_helper'
|
2
6
|
|
3
7
|
describe 'client#msearch_template' do
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
+
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
+
# See the LICENSE file in the project root for more information
|
4
|
+
|
1
5
|
require 'spec_helper'
|
2
6
|
|
3
7
|
describe 'client#mtermvectors' do
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
+
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
+
# See the LICENSE file in the project root for more information
|
4
|
+
|
1
5
|
require 'spec_helper'
|
2
6
|
|
3
7
|
describe 'client.nodes#hot_threads' do
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
+
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
+
# See the LICENSE file in the project root for more information
|
4
|
+
|
1
5
|
require 'spec_helper'
|
2
6
|
|
3
7
|
describe 'client#reload_secure_settings' do
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
+
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
+
# See the LICENSE file in the project root for more information
|
4
|
+
|
5
|
+
require 'spec_helper'
|
6
|
+
|
7
|
+
describe 'client.nodes#shutdown' do
|
8
|
+
|
9
|
+
let(:expected_args) do
|
10
|
+
[
|
11
|
+
'POST',
|
12
|
+
url,
|
13
|
+
params,
|
14
|
+
nil,
|
15
|
+
nil
|
16
|
+
]
|
17
|
+
end
|
18
|
+
|
19
|
+
let(:url) do
|
20
|
+
'_cluster/nodes/_shutdown'
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'performs the request' do
|
24
|
+
expect(client_double.nodes.shutdown).to eq({})
|
25
|
+
end
|
26
|
+
|
27
|
+
let(:params) do
|
28
|
+
{}
|
29
|
+
end
|
30
|
+
|
31
|
+
context 'when the node id is specified' do
|
32
|
+
|
33
|
+
let(:url) do
|
34
|
+
'_cluster/nodes/foo/_shutdown'
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'performs the request' do
|
38
|
+
expect(client_double.nodes.shutdown(node_id: 'foo')).to eq({})
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
context 'when multiple node ids are specified as a list' do
|
43
|
+
|
44
|
+
let(:url) do
|
45
|
+
'_cluster/nodes/A,B,C/_shutdown'
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'performs the request' do
|
49
|
+
expect(client_double.nodes.shutdown(node_id: ['A', 'B', 'C'])).to eq({})
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
context 'when multiple node ids are specified as a String' do
|
54
|
+
|
55
|
+
let(:url) do
|
56
|
+
'_cluster/nodes/A,B,C/_shutdown'
|
57
|
+
end
|
58
|
+
|
59
|
+
it 'performs the request' do
|
60
|
+
expect(client_double.nodes.shutdown(node_id: 'A,B,C')).to eq({})
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
+
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
+
# See the LICENSE file in the project root for more information
|
4
|
+
|
1
5
|
require 'spec_helper'
|
2
6
|
|
3
7
|
describe 'client.nodes#stats' do
|