elasticsearch-api 6.8.3 → 7.0.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- 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,59 +0,0 @@
|
|
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.cluster#get_aliases' do
|
8
|
-
|
9
|
-
let(:expected_args) do
|
10
|
-
[
|
11
|
-
'GET',
|
12
|
-
url,
|
13
|
-
{},
|
14
|
-
nil,
|
15
|
-
nil
|
16
|
-
]
|
17
|
-
end
|
18
|
-
|
19
|
-
let(:url) do
|
20
|
-
'_aliases'
|
21
|
-
end
|
22
|
-
|
23
|
-
it 'performs the request' do
|
24
|
-
expect(client_double.indices.get_aliases).to eq({})
|
25
|
-
end
|
26
|
-
|
27
|
-
context 'when an index is specified' do
|
28
|
-
|
29
|
-
let(:url) do
|
30
|
-
'foo/_aliases'
|
31
|
-
end
|
32
|
-
|
33
|
-
it 'performs the request' do
|
34
|
-
expect(client_double.indices.get_aliases(index: 'foo')).to eq({})
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
context 'when a specified alias is specified' do
|
39
|
-
|
40
|
-
let(:url) do
|
41
|
-
'foo/_aliases/bar'
|
42
|
-
end
|
43
|
-
|
44
|
-
it 'performs the request' do
|
45
|
-
expect(client_double.indices.get_aliases(index: 'foo', name: 'bar')).to eq({})
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
context 'when the path needs to be URL-escaped' do
|
50
|
-
|
51
|
-
let(:url) do
|
52
|
-
'foo%5Ebar/_aliases'
|
53
|
-
end
|
54
|
-
|
55
|
-
it 'performs the request' do
|
56
|
-
expect(client_double.indices.get_aliases(index: 'foo^bar')).to eq({})
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
@@ -1,63 +0,0 @@
|
|
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.indices#get_template' do
|
8
|
-
|
9
|
-
let(:expected_args) do
|
10
|
-
[
|
11
|
-
'GET',
|
12
|
-
url,
|
13
|
-
params,
|
14
|
-
nil,
|
15
|
-
nil
|
16
|
-
]
|
17
|
-
end
|
18
|
-
|
19
|
-
let(:params) do
|
20
|
-
{}
|
21
|
-
end
|
22
|
-
|
23
|
-
let(:url) do
|
24
|
-
'_template/foo'
|
25
|
-
end
|
26
|
-
|
27
|
-
it 'performs the request' do
|
28
|
-
expect(client_double.indices.get_template(name: 'foo')).to eq({})
|
29
|
-
end
|
30
|
-
|
31
|
-
context 'when the path needs to be URL-escaped' do
|
32
|
-
|
33
|
-
let(:url) do
|
34
|
-
'_template/foo%5Ebar'
|
35
|
-
end
|
36
|
-
|
37
|
-
it 'performs the request' do
|
38
|
-
expect(client_double.indices.get_template(name: 'foo^bar')).to eq({})
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
context 'when a \'not found\' exception is raised with the ignore parameter' do
|
43
|
-
|
44
|
-
let(:client) do
|
45
|
-
Class.new { include Elasticsearch::API }.new.tap do |_client|
|
46
|
-
expect(_client).to receive(:perform_request).with(*expected_args).and_raise(NotFound)
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
let(:url) do
|
51
|
-
'_template'
|
52
|
-
end
|
53
|
-
|
54
|
-
let(:params) do
|
55
|
-
{ ignore: 404 }
|
56
|
-
end
|
57
|
-
|
58
|
-
it 'returns false' do
|
59
|
-
skip
|
60
|
-
expect(client.indices.get_template(id: 'foo', ignore: 404)).to eq(false)
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
@@ -1,52 +0,0 @@
|
|
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.indices#get_warmer' do
|
8
|
-
|
9
|
-
let(:expected_args) do
|
10
|
-
[
|
11
|
-
'GET',
|
12
|
-
url,
|
13
|
-
params,
|
14
|
-
nil,
|
15
|
-
nil
|
16
|
-
]
|
17
|
-
end
|
18
|
-
|
19
|
-
let(:params) do
|
20
|
-
{}
|
21
|
-
end
|
22
|
-
|
23
|
-
let(:url) do
|
24
|
-
'_all/_warmer'
|
25
|
-
end
|
26
|
-
|
27
|
-
it 'performs the request' do
|
28
|
-
expect(client_double.indices.get_warmer(index: '_all')).to eq({})
|
29
|
-
end
|
30
|
-
|
31
|
-
context 'when a specified warmer is specified' do
|
32
|
-
|
33
|
-
let(:url) do
|
34
|
-
'foo/_warmer/bar'
|
35
|
-
end
|
36
|
-
|
37
|
-
it 'performs the request' do
|
38
|
-
expect(client_double.indices.get_warmer(index: 'foo', name: 'bar')).to eq({})
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
context 'when the path must be URL-escaped' do
|
43
|
-
|
44
|
-
let(:url) do
|
45
|
-
'foo%5Ebar/_warmer/bar%2Fbam'
|
46
|
-
end
|
47
|
-
|
48
|
-
it 'performs the request' do
|
49
|
-
expect(client_double.indices.get_warmer(index: 'foo^bar', name: 'bar/bam')).to eq({})
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
@@ -1,67 +0,0 @@
|
|
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.indices#optimize' do
|
8
|
-
|
9
|
-
let(:expected_args) do
|
10
|
-
[
|
11
|
-
'POST',
|
12
|
-
url,
|
13
|
-
params,
|
14
|
-
nil,
|
15
|
-
nil
|
16
|
-
]
|
17
|
-
end
|
18
|
-
|
19
|
-
let(:params) do
|
20
|
-
{}
|
21
|
-
end
|
22
|
-
|
23
|
-
let(:url) do
|
24
|
-
'_optimize'
|
25
|
-
end
|
26
|
-
|
27
|
-
it 'performs the request' do
|
28
|
-
expect(client_double.indices.optimize).to eq({})
|
29
|
-
end
|
30
|
-
|
31
|
-
context 'when multiple indices are specified' do
|
32
|
-
|
33
|
-
let(:url) do
|
34
|
-
'foo,bar/_optimize'
|
35
|
-
end
|
36
|
-
|
37
|
-
it 'performs the request' do
|
38
|
-
expect(client_double.indices.optimize(index: ['foo', 'bar'])).to eq({})
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
context 'when parameters are specified' do
|
43
|
-
|
44
|
-
let(:params) do
|
45
|
-
{ max_num_segments: 1 }
|
46
|
-
end
|
47
|
-
|
48
|
-
let(:url) do
|
49
|
-
'foo/_optimize'
|
50
|
-
end
|
51
|
-
|
52
|
-
it 'performs the request' do
|
53
|
-
expect(client_double.indices.optimize(index: 'foo', max_num_segments: 1)).to eq({})
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
context 'when the path must be URL-escaped' do
|
58
|
-
|
59
|
-
let(:url) do
|
60
|
-
'foo%5Ebar/_optimize'
|
61
|
-
end
|
62
|
-
|
63
|
-
it 'performs the request' do
|
64
|
-
expect(client_double.indices.optimize(index: 'foo^bar')).to eq({})
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
@@ -1,105 +0,0 @@
|
|
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.cluster#put_warmer' do
|
8
|
-
|
9
|
-
let(:expected_args) do
|
10
|
-
[
|
11
|
-
'PUT',
|
12
|
-
url,
|
13
|
-
params,
|
14
|
-
body,
|
15
|
-
nil
|
16
|
-
]
|
17
|
-
end
|
18
|
-
|
19
|
-
let(:url) do
|
20
|
-
'foo/_warmer/bar'
|
21
|
-
end
|
22
|
-
|
23
|
-
let(:body) do
|
24
|
-
{ query: { match_all: {} } }
|
25
|
-
end
|
26
|
-
|
27
|
-
let(:params) do
|
28
|
-
{}
|
29
|
-
end
|
30
|
-
|
31
|
-
it 'performs the request' do
|
32
|
-
expect(client_double.indices.put_warmer(index: 'foo', name: 'bar', body: { query: { match_all: {} } })).to eq({})
|
33
|
-
end
|
34
|
-
|
35
|
-
context 'when there is no name specified' do
|
36
|
-
|
37
|
-
let(:client) do
|
38
|
-
Class.new { include Elasticsearch::API }.new
|
39
|
-
end
|
40
|
-
|
41
|
-
it 'raises an exception' do
|
42
|
-
expect {
|
43
|
-
client.indices.put_warmer(body: {})
|
44
|
-
}.to raise_exception(ArgumentError)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
context 'when there is no body specified' do
|
49
|
-
|
50
|
-
let(:client) do
|
51
|
-
Class.new { include Elasticsearch::API }.new
|
52
|
-
end
|
53
|
-
|
54
|
-
it 'raises an exception' do
|
55
|
-
expect {
|
56
|
-
client.indices.put_warmer(name: 'foo')
|
57
|
-
}.to raise_exception(ArgumentError)
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
context 'when multiple indices are specified' do
|
62
|
-
|
63
|
-
let(:url) do
|
64
|
-
'foo,bar/_warmer/xul'
|
65
|
-
end
|
66
|
-
|
67
|
-
let(:body) do
|
68
|
-
{}
|
69
|
-
end
|
70
|
-
|
71
|
-
it 'performs the request' do
|
72
|
-
expect(client_double.indices.put_warmer(index: ['foo', 'bar'], name: 'xul', body: {})).to eq({})
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
context 'when a type is specified' do
|
77
|
-
|
78
|
-
let(:url) do
|
79
|
-
'foo/bar/_warmer/xul'
|
80
|
-
end
|
81
|
-
|
82
|
-
let(:body) do
|
83
|
-
{}
|
84
|
-
end
|
85
|
-
|
86
|
-
it 'performs the request' do
|
87
|
-
expect(client_double.indices.put_warmer(index: 'foo', type: 'bar', name: 'xul', body: {})).to eq({})
|
88
|
-
end
|
89
|
-
end
|
90
|
-
|
91
|
-
context 'when the path needs to be URL-escaped' do
|
92
|
-
|
93
|
-
let(:url) do
|
94
|
-
'foo%5Ebar/bar%2Fbam/_warmer/qu+uz'
|
95
|
-
end
|
96
|
-
|
97
|
-
let(:body) do
|
98
|
-
{}
|
99
|
-
end
|
100
|
-
|
101
|
-
it 'performs the request' do
|
102
|
-
expect(client_double.indices.put_warmer(index: 'foo^bar', type: 'bar/bam', name: 'qu uz', body: {})).to eq({})
|
103
|
-
end
|
104
|
-
end
|
105
|
-
end
|
@@ -1,22 +0,0 @@
|
|
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.cluster#seal' do
|
8
|
-
|
9
|
-
let(:expected_args) do
|
10
|
-
[
|
11
|
-
'POST',
|
12
|
-
'foo/_seal',
|
13
|
-
{},
|
14
|
-
nil,
|
15
|
-
nil
|
16
|
-
]
|
17
|
-
end
|
18
|
-
|
19
|
-
it 'performs the request' do
|
20
|
-
expect(client_double.indices.seal(index: 'foo')).to eq({})
|
21
|
-
end
|
22
|
-
end
|
@@ -1,93 +0,0 @@
|
|
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.cluster#snapshot_index' do
|
8
|
-
|
9
|
-
let(:expected_args) do
|
10
|
-
[
|
11
|
-
'POST',
|
12
|
-
url,
|
13
|
-
params,
|
14
|
-
body,
|
15
|
-
nil
|
16
|
-
]
|
17
|
-
end
|
18
|
-
|
19
|
-
let(:url) do
|
20
|
-
'_gateway/snapshot'
|
21
|
-
end
|
22
|
-
|
23
|
-
let(:body) do
|
24
|
-
nil
|
25
|
-
end
|
26
|
-
|
27
|
-
let(:params) do
|
28
|
-
{}
|
29
|
-
end
|
30
|
-
|
31
|
-
it 'performs the request' do
|
32
|
-
expect(client_double.indices.snapshot_index).to eq({})
|
33
|
-
end
|
34
|
-
|
35
|
-
context 'when an index is specified' do
|
36
|
-
|
37
|
-
let(:url) do
|
38
|
-
'foo/_gateway/snapshot'
|
39
|
-
end
|
40
|
-
|
41
|
-
it 'performs the request' do
|
42
|
-
expect(client_double.indices.snapshot_index(index: 'foo')).to eq({})
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
context 'when multiple indicies are specified as a list' do
|
47
|
-
|
48
|
-
let(:url) do
|
49
|
-
'foo,bar/_gateway/snapshot'
|
50
|
-
end
|
51
|
-
|
52
|
-
it 'performs the request' do
|
53
|
-
expect(client_double.indices.snapshot_index(index: ['foo', 'bar'])).to eq({})
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
context 'when multiple indicies are specified as a string' do
|
58
|
-
|
59
|
-
let(:url) do
|
60
|
-
'foo,bar/_gateway/snapshot'
|
61
|
-
end
|
62
|
-
|
63
|
-
it 'performs the request' do
|
64
|
-
expect(client_double.indices.snapshot_index(index: 'foo,bar')).to eq({})
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
context 'when parameters are specified' do
|
69
|
-
|
70
|
-
let(:params) do
|
71
|
-
{ ignore_indices: 'missing' }
|
72
|
-
end
|
73
|
-
|
74
|
-
let(:url) do
|
75
|
-
'foo/_gateway/snapshot'
|
76
|
-
end
|
77
|
-
|
78
|
-
it 'performs the request' do
|
79
|
-
expect(client_double.indices.snapshot_index(index: 'foo', ignore_indices: 'missing')).to eq({})
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
|
-
context 'when the path needs to be URL-escaped' do
|
84
|
-
|
85
|
-
let(:url) do
|
86
|
-
'foo%5Ebar/_gateway/snapshot'
|
87
|
-
end
|
88
|
-
|
89
|
-
it 'performs the request' do
|
90
|
-
expect(client_double.indices.snapshot_index(index: 'foo^bar')).to eq({})
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|