elasticsearch-api 6.8.3 → 7.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (334) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +17 -1
  3. data/LICENSE.txt +199 -10
  4. data/README.md +3 -3
  5. data/Rakefile +23 -6
  6. data/elasticsearch-api.gemspec +77 -43
  7. data/lib/elasticsearch/api/actions/abort_benchmark.rb +17 -4
  8. data/lib/elasticsearch/api/actions/benchmark.rb +18 -5
  9. data/lib/elasticsearch/api/actions/bulk.rb +18 -7
  10. data/lib/elasticsearch/api/actions/cat/aliases.rb +25 -11
  11. data/lib/elasticsearch/api/actions/cat/allocation.rb +26 -12
  12. data/lib/elasticsearch/api/actions/cat/count.rb +25 -11
  13. data/lib/elasticsearch/api/actions/cat/fielddata.rb +23 -11
  14. data/lib/elasticsearch/api/actions/cat/health.rb +26 -12
  15. data/lib/elasticsearch/api/actions/cat/help.rb +18 -6
  16. data/lib/elasticsearch/api/actions/cat/indices.rb +28 -13
  17. data/lib/elasticsearch/api/actions/cat/master.rb +25 -11
  18. data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +19 -7
  19. data/lib/elasticsearch/api/actions/cat/nodes.rb +25 -11
  20. data/lib/elasticsearch/api/actions/cat/params_registry.rb +19 -6
  21. data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +25 -11
  22. data/lib/elasticsearch/api/actions/cat/plugins.rb +21 -8
  23. data/lib/elasticsearch/api/actions/cat/recovery.rb +26 -11
  24. data/lib/elasticsearch/api/actions/cat/repositories.rb +18 -7
  25. data/lib/elasticsearch/api/actions/cat/segments.rb +22 -10
  26. data/lib/elasticsearch/api/actions/cat/shards.rb +26 -12
  27. data/lib/elasticsearch/api/actions/cat/snapshots.rb +19 -9
  28. data/lib/elasticsearch/api/actions/cat/tasks.rb +20 -6
  29. data/lib/elasticsearch/api/actions/cat/templates.rb +21 -8
  30. data/lib/elasticsearch/api/actions/cat/thread_pool.rb +33 -16
  31. data/lib/elasticsearch/api/actions/clear_scroll.rb +19 -15
  32. data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +20 -6
  33. data/lib/elasticsearch/api/actions/cluster/get_settings.rb +19 -7
  34. data/lib/elasticsearch/api/actions/cluster/health.rb +35 -13
  35. data/lib/elasticsearch/api/actions/cluster/params_registry.rb +19 -6
  36. data/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +20 -6
  37. data/lib/elasticsearch/api/actions/cluster/put_settings.rb +19 -8
  38. data/lib/elasticsearch/api/actions/cluster/remote_info.rb +17 -10
  39. data/lib/elasticsearch/api/actions/cluster/reroute.rb +23 -10
  40. data/lib/elasticsearch/api/actions/cluster/state.rb +28 -18
  41. data/lib/elasticsearch/api/actions/cluster/stats.rb +21 -16
  42. data/lib/elasticsearch/api/actions/count.rb +18 -4
  43. data/lib/elasticsearch/api/actions/create.rb +16 -3
  44. data/lib/elasticsearch/api/actions/delete.rb +24 -19
  45. data/lib/elasticsearch/api/actions/delete_by_query.rb +18 -5
  46. data/lib/elasticsearch/api/actions/{delete_by_query_rethrottle.rb → delete_by_rethrottle.rb} +18 -5
  47. data/lib/elasticsearch/api/actions/delete_script.rb +18 -5
  48. data/lib/elasticsearch/api/actions/exists.rb +18 -6
  49. data/lib/elasticsearch/api/actions/exists_source.rb +16 -3
  50. data/lib/elasticsearch/api/actions/explain.rb +30 -10
  51. data/lib/elasticsearch/api/actions/field_caps.rb +18 -6
  52. data/lib/elasticsearch/api/actions/get.rb +20 -6
  53. data/lib/elasticsearch/api/actions/get_script.rb +22 -9
  54. data/lib/elasticsearch/api/actions/get_source.rb +32 -10
  55. data/lib/elasticsearch/api/actions/index.rb +37 -17
  56. data/lib/elasticsearch/api/actions/indices/analyze.rb +32 -6
  57. data/lib/elasticsearch/api/actions/indices/clear_cache.rb +20 -8
  58. data/lib/elasticsearch/api/actions/indices/close.rb +31 -11
  59. data/lib/elasticsearch/api/actions/indices/create.rb +36 -24
  60. data/lib/elasticsearch/api/actions/indices/delete.rb +21 -7
  61. data/lib/elasticsearch/api/actions/indices/delete_alias.rb +20 -8
  62. data/lib/elasticsearch/api/actions/indices/delete_template.rb +18 -6
  63. data/lib/elasticsearch/api/actions/indices/exists.rb +32 -12
  64. data/lib/elasticsearch/api/actions/indices/exists_alias.rb +30 -10
  65. data/lib/elasticsearch/api/actions/indices/exists_template.rb +20 -8
  66. data/lib/elasticsearch/api/actions/indices/exists_type.rb +31 -10
  67. data/lib/elasticsearch/api/actions/indices/flush.rb +26 -9
  68. data/lib/elasticsearch/api/actions/indices/flush_synced.rb +18 -5
  69. data/lib/elasticsearch/api/actions/indices/forcemerge.rb +18 -5
  70. data/lib/elasticsearch/api/actions/indices/freeze.rb +1 -4
  71. data/lib/elasticsearch/api/actions/indices/get.rb +21 -7
  72. data/lib/elasticsearch/api/actions/indices/get_alias.rb +18 -5
  73. data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +21 -7
  74. data/lib/elasticsearch/api/actions/indices/get_mapping.rb +21 -8
  75. data/lib/elasticsearch/api/actions/indices/get_settings.rb +18 -5
  76. data/lib/elasticsearch/api/actions/indices/get_template.rb +21 -7
  77. data/lib/elasticsearch/api/actions/indices/open.rb +18 -5
  78. data/lib/elasticsearch/api/actions/indices/params_registry.rb +19 -6
  79. data/lib/elasticsearch/api/actions/indices/put_alias.rb +18 -5
  80. data/lib/elasticsearch/api/actions/indices/put_mapping.rb +23 -11
  81. data/lib/elasticsearch/api/actions/indices/put_settings.rb +18 -5
  82. data/lib/elasticsearch/api/actions/indices/put_template.rb +21 -7
  83. data/lib/elasticsearch/api/actions/indices/recovery.rb +19 -6
  84. data/lib/elasticsearch/api/actions/indices/refresh.rb +18 -5
  85. data/lib/elasticsearch/api/actions/indices/rollover.rb +21 -7
  86. data/lib/elasticsearch/api/actions/indices/segments.rb +18 -5
  87. data/lib/elasticsearch/api/actions/indices/shard_stores.rb +18 -5
  88. data/lib/elasticsearch/api/actions/indices/shrink.rb +18 -7
  89. data/lib/elasticsearch/api/actions/indices/split.rb +19 -9
  90. data/lib/elasticsearch/api/actions/indices/stats.rb +18 -5
  91. data/lib/elasticsearch/api/actions/indices/unfreeze.rb +0 -4
  92. data/lib/elasticsearch/api/actions/indices/update_aliases.rb +18 -5
  93. data/lib/elasticsearch/api/actions/indices/upgrade.rb +18 -5
  94. data/lib/elasticsearch/api/actions/indices/validate_query.rb +18 -5
  95. data/lib/elasticsearch/api/actions/info.rb +16 -9
  96. data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +18 -5
  97. data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +20 -8
  98. data/lib/elasticsearch/api/actions/ingest/params_registry.rb +19 -6
  99. data/lib/elasticsearch/api/actions/ingest/processor_grok.rb +0 -4
  100. data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +18 -5
  101. data/lib/elasticsearch/api/actions/ingest/simulate.rb +22 -9
  102. data/lib/elasticsearch/api/actions/mget.rb +17 -4
  103. data/lib/elasticsearch/api/actions/msearch.rb +21 -7
  104. data/lib/elasticsearch/api/actions/msearch_template.rb +21 -6
  105. data/lib/elasticsearch/api/actions/mtermvectors.rb +18 -5
  106. data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +20 -5
  107. data/lib/elasticsearch/api/actions/nodes/info.rb +44 -11
  108. data/lib/elasticsearch/api/actions/nodes/params_registry.rb +19 -6
  109. data/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +19 -12
  110. data/lib/elasticsearch/api/actions/nodes/shutdown.rb +17 -4
  111. data/lib/elasticsearch/api/actions/nodes/stats.rb +18 -5
  112. data/lib/elasticsearch/api/actions/nodes/usage.rb +3 -7
  113. data/lib/elasticsearch/api/actions/params_registry.rb +19 -6
  114. data/lib/elasticsearch/api/actions/ping.rb +16 -9
  115. data/lib/elasticsearch/api/actions/put_script.rb +18 -6
  116. data/lib/elasticsearch/api/actions/rank_eval.rb +17 -4
  117. data/lib/elasticsearch/api/actions/reindex.rb +19 -5
  118. data/lib/elasticsearch/api/actions/reindex_rethrottle.rb +17 -4
  119. data/lib/elasticsearch/api/actions/remote/info.rb +16 -3
  120. data/lib/elasticsearch/api/actions/render_search_template.rb +18 -5
  121. data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +16 -9
  122. data/lib/elasticsearch/api/actions/scroll.rb +19 -6
  123. data/lib/elasticsearch/api/actions/search.rb +72 -39
  124. data/lib/elasticsearch/api/actions/search_shards.rb +31 -11
  125. data/lib/elasticsearch/api/actions/search_template.rb +21 -6
  126. data/lib/elasticsearch/api/actions/snapshot/create.rb +20 -6
  127. data/lib/elasticsearch/api/actions/snapshot/create_repository.rb +18 -5
  128. data/lib/elasticsearch/api/actions/snapshot/delete.rb +20 -7
  129. data/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +19 -5
  130. data/lib/elasticsearch/api/actions/snapshot/get.rb +21 -7
  131. data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +23 -7
  132. data/lib/elasticsearch/api/actions/snapshot/params_registry.rb +19 -6
  133. data/lib/elasticsearch/api/actions/snapshot/restore.rb +18 -5
  134. data/lib/elasticsearch/api/actions/snapshot/status.rb +23 -8
  135. data/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +18 -5
  136. data/lib/elasticsearch/api/actions/tasks/cancel.rb +18 -5
  137. data/lib/elasticsearch/api/actions/tasks/get.rb +18 -5
  138. data/lib/elasticsearch/api/actions/tasks/list.rb +18 -5
  139. data/lib/elasticsearch/api/actions/tasks/params_registry.rb +19 -6
  140. data/lib/elasticsearch/api/actions/termvectors.rb +33 -18
  141. data/lib/elasticsearch/api/actions/update.rb +61 -26
  142. data/lib/elasticsearch/api/actions/update_by_query.rb +18 -5
  143. data/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +16 -3
  144. data/lib/elasticsearch/api/namespace/cat.rb +16 -3
  145. data/lib/elasticsearch/api/namespace/cluster.rb +16 -3
  146. data/lib/elasticsearch/api/namespace/common.rb +16 -3
  147. data/lib/elasticsearch/api/namespace/indices.rb +16 -3
  148. data/lib/elasticsearch/api/namespace/ingest.rb +16 -3
  149. data/lib/elasticsearch/api/namespace/nodes.rb +16 -3
  150. data/lib/elasticsearch/api/namespace/remote.rb +16 -3
  151. data/lib/elasticsearch/api/namespace/snapshot.rb +16 -3
  152. data/lib/elasticsearch/api/namespace/tasks.rb +16 -3
  153. data/lib/elasticsearch/api/utils.rb +16 -3
  154. data/lib/elasticsearch/api/version.rb +17 -4
  155. data/lib/elasticsearch/api.rb +18 -5
  156. data/lib/elasticsearch-api.rb +16 -3
  157. data/spec/elasticsearch/api/actions/abort_benchmark_spec.rb +16 -3
  158. data/spec/elasticsearch/api/actions/benchmark_spec.rb +16 -3
  159. data/spec/elasticsearch/api/actions/bulk_spec.rb +16 -3
  160. data/spec/elasticsearch/api/actions/cat/aliases_spec.rb +16 -3
  161. data/spec/elasticsearch/api/actions/cat/allocation_spec.rb +16 -3
  162. data/spec/elasticsearch/api/actions/cat/count_spec.rb +16 -3
  163. data/spec/elasticsearch/api/actions/cat/fielddata_spec.rb +16 -3
  164. data/spec/elasticsearch/api/actions/cat/health_spec.rb +16 -3
  165. data/spec/elasticsearch/api/actions/cat/help_spec.rb +16 -3
  166. data/spec/elasticsearch/api/actions/cat/indices_spec.rb +16 -3
  167. data/spec/elasticsearch/api/actions/cat/master_spec.rb +16 -3
  168. data/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb +16 -3
  169. data/spec/elasticsearch/api/actions/cat/nodes_spec.rb +16 -3
  170. data/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb +16 -3
  171. data/spec/elasticsearch/api/actions/cat/plugins_spec.rb +16 -3
  172. data/spec/elasticsearch/api/actions/cat/recovery_spec.rb +16 -3
  173. data/spec/elasticsearch/api/actions/cat/repositories_spec.rb +16 -3
  174. data/spec/elasticsearch/api/actions/cat/segments_spec.rb +33 -4
  175. data/spec/elasticsearch/api/actions/cat/shards_spec.rb +16 -3
  176. data/spec/elasticsearch/api/actions/cat/snapshot_spec.rb +16 -3
  177. data/spec/elasticsearch/api/actions/cat/tasks_spec.rb +16 -3
  178. data/spec/elasticsearch/api/actions/cat/templates_spec.rb +16 -3
  179. data/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb +16 -3
  180. data/spec/elasticsearch/api/actions/clear_scroll_spec.rb +16 -3
  181. data/spec/elasticsearch/api/actions/cluster/allocation_explain_spec.rb +16 -3
  182. data/spec/elasticsearch/api/actions/cluster/get_settings_spec.rb +16 -3
  183. data/spec/elasticsearch/api/actions/cluster/health_spec.rb +16 -3
  184. data/spec/elasticsearch/api/actions/cluster/pending_tasks_spec.rb +16 -3
  185. data/spec/elasticsearch/api/actions/cluster/put_settings_spec.rb +16 -3
  186. data/spec/elasticsearch/api/actions/cluster/remote_info_spec.rb +16 -3
  187. data/spec/elasticsearch/api/actions/cluster/reroute_spec.rb +16 -3
  188. data/spec/elasticsearch/api/actions/cluster/state_spec.rb +16 -3
  189. data/spec/elasticsearch/api/actions/cluster/stats_spec.rb +16 -20
  190. data/spec/elasticsearch/api/actions/count_spec.rb +16 -3
  191. data/spec/elasticsearch/api/actions/create_document_spec.rb +16 -3
  192. data/spec/elasticsearch/api/actions/delete_by_query_spec.rb +16 -3
  193. data/spec/elasticsearch/api/actions/delete_document_spec.rb +16 -9
  194. data/spec/elasticsearch/api/actions/delete_script_spec.rb +16 -3
  195. data/spec/elasticsearch/api/actions/exists_document_spec.rb +16 -3
  196. data/spec/elasticsearch/api/actions/explain_document_spec.rb +17 -10
  197. data/spec/elasticsearch/api/actions/field_caps_spec.rb +16 -3
  198. data/spec/elasticsearch/api/actions/get_document_source_spec.rb +17 -4
  199. data/spec/elasticsearch/api/actions/get_document_spec.rb +17 -4
  200. data/spec/elasticsearch/api/actions/get_script_spec.rb +22 -16
  201. data/spec/elasticsearch/api/actions/hashie_spec.rb +16 -3
  202. data/spec/elasticsearch/api/actions/index_document_spec.rb +16 -9
  203. data/spec/elasticsearch/api/actions/indices/analyze_spec.rb +16 -3
  204. data/spec/elasticsearch/api/actions/indices/clear_cache_spec.rb +19 -6
  205. data/spec/elasticsearch/api/actions/indices/close_spec.rb +16 -3
  206. data/spec/elasticsearch/api/actions/indices/create_spec.rb +16 -3
  207. data/spec/elasticsearch/api/actions/indices/delete_alias_spec.rb +16 -3
  208. data/spec/elasticsearch/api/actions/indices/delete_spec.rb +16 -3
  209. data/spec/elasticsearch/api/actions/indices/delete_template_spec.rb +16 -3
  210. data/spec/elasticsearch/api/actions/indices/exists_alias_spec.rb +16 -3
  211. data/spec/elasticsearch/api/actions/indices/exists_spec.rb +16 -3
  212. data/spec/elasticsearch/api/actions/indices/exists_template_spec.rb +16 -3
  213. data/spec/elasticsearch/api/actions/indices/exists_type_spec.rb +16 -3
  214. data/spec/elasticsearch/api/actions/indices/flush_spec.rb +16 -3
  215. data/spec/elasticsearch/api/actions/indices/flush_synced_spec.rb +16 -3
  216. data/spec/elasticsearch/api/actions/indices/forcemerge_spec.rb +16 -3
  217. data/spec/elasticsearch/api/actions/indices/freeze_spec.rb +68 -0
  218. data/spec/elasticsearch/api/actions/indices/get_alias_spec.rb +16 -3
  219. data/spec/elasticsearch/api/actions/indices/get_field_mapping_spec.rb +16 -3
  220. data/spec/elasticsearch/api/actions/indices/get_mapping_spec.rb +16 -3
  221. data/spec/elasticsearch/api/actions/indices/get_settings_spec.rb +16 -3
  222. data/spec/elasticsearch/api/actions/indices/get_spec.rb +16 -3
  223. data/spec/elasticsearch/api/actions/indices/open_spec.rb +16 -3
  224. data/spec/elasticsearch/api/actions/indices/put_alias_spec.rb +16 -3
  225. data/spec/elasticsearch/api/actions/indices/put_mapping_spec.rb +16 -3
  226. data/spec/elasticsearch/api/actions/indices/put_settings_spec.rb +31 -3
  227. data/spec/elasticsearch/api/actions/indices/put_template_spec.rb +16 -3
  228. data/spec/elasticsearch/api/actions/indices/recovery_spec.rb +16 -3
  229. data/spec/elasticsearch/api/actions/indices/refresh_spec.rb +16 -3
  230. data/spec/elasticsearch/api/actions/indices/rollover_spec.rb +16 -3
  231. data/spec/elasticsearch/api/actions/indices/segments_spec.rb +16 -3
  232. data/spec/elasticsearch/api/actions/indices/shard_stores_spec.rb +16 -3
  233. data/spec/elasticsearch/api/actions/indices/shrink_spec.rb +16 -3
  234. data/spec/elasticsearch/api/actions/indices/split_spec.rb +16 -3
  235. data/spec/elasticsearch/api/actions/indices/stats_spec.rb +125 -0
  236. data/spec/elasticsearch/api/actions/indices/unfreeze_spec.rb +68 -0
  237. data/spec/elasticsearch/api/actions/indices/update_aliases_spec.rb +16 -3
  238. data/spec/elasticsearch/api/actions/indices/upgrade_spec.rb +16 -3
  239. data/spec/elasticsearch/api/actions/indices/validate_query_spec.rb +16 -3
  240. data/spec/elasticsearch/api/actions/info_spec.rb +16 -3
  241. data/spec/elasticsearch/api/actions/ingest/delete_pipeline_spec.rb +16 -3
  242. data/spec/elasticsearch/api/actions/ingest/get_pipeline_spec.rb +16 -3
  243. data/spec/elasticsearch/api/actions/ingest/put_pipeline_spec.rb +16 -3
  244. data/spec/elasticsearch/api/actions/ingest/simulate_spec.rb +16 -3
  245. data/spec/elasticsearch/api/actions/json_builders_spec.rb +16 -3
  246. data/spec/elasticsearch/api/actions/mget_spec.rb +16 -3
  247. data/spec/elasticsearch/api/actions/msearch_spec.rb +16 -3
  248. data/spec/elasticsearch/api/actions/msearch_template_spec.rb +16 -3
  249. data/spec/elasticsearch/api/actions/mtermvectors_spec.rb +16 -3
  250. data/spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb +16 -3
  251. data/spec/elasticsearch/api/actions/nodes/info_spec.rb +16 -3
  252. data/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb +16 -3
  253. data/spec/elasticsearch/api/actions/nodes/shutdown_spec.rb +16 -3
  254. data/spec/elasticsearch/api/actions/nodes/stats_spec.rb +16 -3
  255. data/spec/elasticsearch/api/actions/ping_spec.rb +16 -3
  256. data/spec/elasticsearch/api/actions/put_script_spec.rb +16 -3
  257. data/spec/elasticsearch/api/actions/reindex_spec.rb +16 -3
  258. data/spec/elasticsearch/api/actions/remote/info_spec.rb +16 -3
  259. data/spec/elasticsearch/api/actions/render_search_template_spec.rb +16 -3
  260. data/spec/elasticsearch/api/actions/scoll_spec.rb +16 -3
  261. data/spec/elasticsearch/api/actions/search_shards_spec.rb +16 -3
  262. data/spec/elasticsearch/api/actions/search_spec.rb +31 -3
  263. data/spec/elasticsearch/api/actions/search_template_spec.rb +16 -3
  264. data/spec/elasticsearch/api/actions/snapshot/create_repository_spec.rb +16 -3
  265. data/spec/elasticsearch/api/actions/snapshot/create_spec.rb +16 -3
  266. data/spec/elasticsearch/api/actions/snapshot/delete_repository_spec.rb +16 -3
  267. data/spec/elasticsearch/api/actions/snapshot/delete_spec.rb +16 -3
  268. data/spec/elasticsearch/api/actions/snapshot/get_repository_spec.rb +16 -3
  269. data/spec/elasticsearch/api/actions/snapshot/get_spec.rb +16 -3
  270. data/spec/elasticsearch/api/actions/snapshot/restore_spec.rb +16 -3
  271. data/spec/elasticsearch/api/actions/snapshot/status_spec.rb +16 -3
  272. data/spec/elasticsearch/api/actions/snapshot/verify_repository_spec.rb +16 -3
  273. data/spec/elasticsearch/api/actions/tasks/cancel_spec.rb +16 -3
  274. data/spec/elasticsearch/api/actions/tasks/get_spec.rb +16 -3
  275. data/spec/elasticsearch/api/actions/tasks/list_spec.rb +16 -3
  276. data/spec/elasticsearch/api/actions/termvectors_spec.rb +16 -9
  277. data/spec/elasticsearch/api/actions/update_by_query_spec.rb +16 -3
  278. data/spec/elasticsearch/api/actions/update_document_spec.rb +16 -9
  279. data/spec/elasticsearch/api/api_spec.rb +16 -3
  280. data/spec/elasticsearch/api/client_spec.rb +16 -3
  281. data/spec/elasticsearch/api/utils_spec.rb +16 -3
  282. data/spec/spec_helper.rb +16 -14
  283. data/test/integration/yaml_test_runner.rb +84 -42
  284. data/test/test_helper.rb +86 -14
  285. data/utils/Gemfile +17 -0
  286. data/utils/Thorfile +17 -0
  287. data/utils/thor/generate_api.rb +16 -3
  288. data/utils/thor/generate_source.rb +22 -6
  289. data/utils/thor/lister.rb +16 -3
  290. data/utils/thor/templates/ruby/method.erb +22 -7
  291. data/utils/thor/templates/ruby/test.erb +17 -0
  292. data/utils/thor/templates/ruby/test_helper.rb +16 -4
  293. metadata +54 -120
  294. data/lib/elasticsearch/api/actions/count_percolate.rb +0 -86
  295. data/lib/elasticsearch/api/actions/delete_template.rb +0 -25
  296. data/lib/elasticsearch/api/actions/field_stats.rb +0 -40
  297. data/lib/elasticsearch/api/actions/get_template.rb +0 -31
  298. data/lib/elasticsearch/api/actions/indices/delete_mapping.rb +0 -30
  299. data/lib/elasticsearch/api/actions/indices/delete_warmer.rb +0 -36
  300. data/lib/elasticsearch/api/actions/indices/get_aliases.rb +0 -41
  301. data/lib/elasticsearch/api/actions/indices/get_warmer.rb +0 -66
  302. data/lib/elasticsearch/api/actions/indices/optimize.rb +0 -81
  303. data/lib/elasticsearch/api/actions/indices/put_warmer.rb +0 -69
  304. data/lib/elasticsearch/api/actions/indices/seal.rb +0 -28
  305. data/lib/elasticsearch/api/actions/indices/snapshot_index.rb +0 -48
  306. data/lib/elasticsearch/api/actions/indices/status.rb +0 -67
  307. data/lib/elasticsearch/api/actions/list_benchmarks.rb +0 -31
  308. data/lib/elasticsearch/api/actions/mlt.rb +0 -134
  309. data/lib/elasticsearch/api/actions/mpercolate.rb +0 -66
  310. data/lib/elasticsearch/api/actions/percolate.rb +0 -77
  311. data/lib/elasticsearch/api/actions/put_template.rb +0 -29
  312. data/lib/elasticsearch/api/actions/search_exists.rb +0 -67
  313. data/lib/elasticsearch/api/actions/suggest.rb +0 -53
  314. data/spec/elasticsearch/api/actions/count_percolate_spec.rb +0 -21
  315. data/spec/elasticsearch/api/actions/delete_template_spec.rb +0 -21
  316. data/spec/elasticsearch/api/actions/field_stats_spec.rb +0 -21
  317. data/spec/elasticsearch/api/actions/get_template_spec.rb +0 -56
  318. data/spec/elasticsearch/api/actions/indices/delete_mapping_spec.rb +0 -81
  319. data/spec/elasticsearch/api/actions/indices/delete_warmer_spec.rb +0 -90
  320. data/spec/elasticsearch/api/actions/indices/get_aliases_spec.rb +0 -59
  321. data/spec/elasticsearch/api/actions/indices/get_template_spec.rb +0 -63
  322. data/spec/elasticsearch/api/actions/indices/get_warmer_spec.rb +0 -52
  323. data/spec/elasticsearch/api/actions/indices/optimize_spec.rb +0 -67
  324. data/spec/elasticsearch/api/actions/indices/put_warmer_spec.rb +0 -105
  325. data/spec/elasticsearch/api/actions/indices/seal_spec.rb +0 -22
  326. data/spec/elasticsearch/api/actions/indices/snapshot_index_spec.rb +0 -93
  327. data/spec/elasticsearch/api/actions/indices/status_spec.rb +0 -96
  328. data/spec/elasticsearch/api/actions/list_benchmarks_spec.rb +0 -21
  329. data/spec/elasticsearch/api/actions/mlt_spec.rb +0 -134
  330. data/spec/elasticsearch/api/actions/mpercolate_spec.rb +0 -53
  331. data/spec/elasticsearch/api/actions/put_template_spec.rb +0 -21
  332. data/spec/elasticsearch/api/actions/rank_eval_spec.rb +0 -113
  333. data/spec/elasticsearch/api/actions/search_exists_spec.rb +0 -67
  334. data/spec/elasticsearch/api/actions/suggest_spec.rb +0 -81
@@ -1,6 +1,19 @@
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
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
@@ -66,50 +79,63 @@ module Elasticsearch
66
79
  #
67
80
  # response.aggregations.tags.terms.to_a.map { |f| "#{f.term} [#{f.count}]" }.join(', ')
68
81
  #
69
- #
70
- # @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
71
- # @option arguments [List] :type A comma-separated list of document types to search; leave empty to perform the operation on all types
82
+ # @option arguments [List] :index A comma-separated list of index names to search; use `_all`
83
+ # or empty string to perform the operation on all indices
84
+ # @option arguments [List] :type A comma-separated list of document types to search;
85
+ # leave empty to perform the operation on all types
72
86
  # @option arguments [Hash] :body The search definition using the Query DSL
73
87
  # @option arguments [String] :analyzer The analyzer to use for the query string
74
- # @option arguments [Boolean] :analyze_wildcard Specify whether wildcard and prefix queries should be analyzed (default: false)
75
- # @option arguments [String] :default_operator The default operator for query string query (AND or OR) (options: AND, OR)
88
+ # @option arguments [Boolean] :analyze_wildcard Specify whether wildcard and prefix queries should be analyzed
89
+ # (default: false)
90
+ # @option arguments [String] :default_operator The default operator for query string query (AND or OR)
91
+ # (options: AND, OR)
76
92
  # @option arguments [String] :df The field to use as default where no field prefix is given in the query string
77
- # @option arguments [Boolean] :explain Specify whether to return detailed information about score computation as part of a hit
93
+ # @option arguments [Boolean] :explain Specify whether to return detailed information about score computation
94
+ # as part of a hit
95
+ # @option arguments [List] :fields A comma-separated list of fields to return as part of a hit
96
+ # @option arguments [List] :fielddata_fields A comma-separated list of fields to return as the field data
97
+ # representation of a field for each hit
98
+ # @option arguments [List] :docvalue_fields A comma-separated list of fields to return as the docvalue
99
+ # representation of a field for each hit
78
100
  # @option arguments [List] :stored_fields A comma-separated list of stored fields to return as part of a hit
79
- # @option arguments [List] :docvalue_fields A comma-separated list of fields to return as the docvalue representation of a field for each hit
80
101
  # @option arguments [Number] :from Starting offset (default: 0)
81
- # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
82
- # @option arguments [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indices should be ignored when throttled
83
- # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
84
- # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, none, all)
85
- # @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
86
- # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
102
+ # @option arguments [Boolean] :include_type_name Whether a type should be expected in the body of the mappings.
103
+ # @option arguments [String] :ignore_indices When performed on multiple indices, allows to ignore `missing` ones
104
+ # (options: none, missing)
105
+ # @option arguments [Boolean] :lenient Specify whether format-based query failures
106
+ # (such as providing text to a numeric field) should be ignored
107
+ # @option arguments [Boolean] :lowercase_expanded_terms Specify whether query terms should be lowercased
108
+ # @option arguments [String] :preference Specify the node or shard the operation should be performed on
109
+ # (default: random)
87
110
  # @option arguments [String] :q Query in the Lucene query string syntax
111
+ # @option arguments [Boolean] :request_cache Specify if request cache should be used for this request
112
+ # (defaults to index level setting)
88
113
  # @option arguments [List] :routing A comma-separated list of specific routing values
89
- # @option arguments [Time] :scroll Specify how long a consistent view of the index should be maintained for scrolled search
90
- # @option arguments [String] :search_type Search operation type (options: query_then_fetch, dfs_query_then_fetch)
114
+ # @option arguments [Duration] :scroll Specify how long a consistent view of the index should be maintained
115
+ # for scrolled search
116
+ # @option arguments [String] :search_type Search operation type (options: query_then_fetch, query_and_fetch,
117
+ # dfs_query_then_fetch, dfs_query_and_fetch, count, scan)
91
118
  # @option arguments [Number] :size Number of hits to return (default: 10)
92
119
  # @option arguments [List] :sort A comma-separated list of <field>:<direction> pairs
93
- # @option arguments [List] :_source True or false to return the _source field or not, or a list of fields to return
94
- # @option arguments [List] :_source_excludes A list of fields to exclude from the returned _source field
95
- # @option arguments [List] :_source_includes A list of fields to extract and return from the _source field
96
- # @option arguments [Number] :terminate_after The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
120
+ # @option arguments [String] :source The URL-encoded request definition using the Query DSL
121
+ # (instead of using request body)
122
+ # @option arguments [String] :_source Specify whether the _source field should be returned,
123
+ # or a list of fields to return
124
+ # @option arguments [String] :_source_exclude A list of fields to exclude from the returned _source field
125
+ # @option arguments [String] :_source_include A list of fields to extract and return from the _source field
126
+ # @option arguments [List] :stored_fields A comma-separated list of stored fields to return in the response
97
127
  # @option arguments [List] :stats Specific 'tag' of the request for logging and statistical purposes
98
128
  # @option arguments [String] :suggest_field Specify which field to use for suggestions
99
129
  # @option arguments [String] :suggest_mode Specify suggest mode (options: missing, popular, always)
100
130
  # @option arguments [Number] :suggest_size How many suggestions to return in response
101
- # @option arguments [String] :suggest_text The source text for which the suggestions should be returned
131
+ # @option arguments [Text] :suggest_text The source text for which the suggestions should be returned
132
+ # @option arguments [Number] :terminate_after The maximum number of documents to collect for each shard
102
133
  # @option arguments [Time] :timeout Explicit operation timeout
103
- # @option arguments [Boolean] :track_scores Whether to calculate and return scores even if they are not used for sorting
104
- # @option arguments [Boolean] :track_total_hits Indicate if the number of documents that match the query should be tracked
105
- # @option arguments [Boolean] :allow_partial_search_results Indicate if an error should be returned if there is a partial search failure or timeout
106
134
  # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response
107
135
  # @option arguments [Boolean] :version Specify whether to return document version as part of a hit
108
- # @option arguments [Boolean] :request_cache Specify if request cache should be used for this request or not, defaults to index level setting
109
136
  # @option arguments [Number] :batched_reduce_size The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.
110
- # @option arguments [Number] :max_concurrent_shard_requests The number of concurrent shard requests this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
111
- # @option arguments [Number] :pre_filter_shard_size A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.
112
- # @option arguments [Boolean] :rest_total_hits_as_int This parameter is ignored in this version. It is used in the next major version to control whether the rest response should render the total.hits as an object or a number
137
+ # @option arguments [Number] :max_concurrent_shard_requests The number of concurrent shard requests this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests. The default grows with the number of nodes in the cluster but is at most 256.
138
+ # @option arguments [Number] :pre_filter_shard_size A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. (Default: 128)
113
139
  #
114
140
  # @return [Hash]
115
141
  #
@@ -136,48 +162,55 @@ module Elasticsearch
136
162
 
137
163
  # Register this action with its valid params when the module is loaded.
138
164
  #
139
- # @since 6.2.0
165
+ # @since 6.1.1
140
166
  ParamsRegistry.register(:search, [
141
167
  :analyzer,
142
168
  :analyze_wildcard,
143
169
  :default_operator,
144
170
  :df,
145
171
  :explain,
146
- :stored_fields,
172
+ :fielddata_fields,
173
+ :include_type_name,
147
174
  :docvalue_fields,
175
+ :stored_fields,
176
+ :fields,
148
177
  :from,
178
+ :ignore_indices,
149
179
  :ignore_unavailable,
150
- :ignore_throttled,
151
180
  :allow_no_indices,
152
181
  :expand_wildcards,
153
182
  :lenient,
183
+ :lowercase_expanded_terms,
154
184
  :preference,
155
185
  :q,
186
+ :query_cache,
187
+ :request_cache,
156
188
  :routing,
157
189
  :scroll,
158
190
  :search_type,
159
191
  :size,
160
192
  :sort,
193
+ :source,
161
194
  :_source,
162
- :_source_excludes,
163
195
  :_source_includes,
164
- :terminate_after,
196
+ :_source_excludes,
197
+ :stored_fields,
165
198
  :stats,
166
199
  :suggest_field,
167
200
  :suggest_mode,
168
201
  :suggest_size,
169
202
  :suggest_text,
203
+ :terminate_after,
170
204
  :timeout,
171
- :track_scores,
172
- :track_total_hits,
173
- :allow_partial_search_results,
174
205
  :typed_keys,
175
206
  :version,
176
- :request_cache,
177
207
  :batched_reduce_size,
178
208
  :max_concurrent_shard_requests,
179
209
  :pre_filter_shard_size,
210
+ :allow_partial_search_results,
180
211
  :rest_total_hits_as_int,
212
+ :track_total_hits,
213
+ :ignore_throttled,
181
214
  :seq_no_primary_term ].freeze)
182
215
  end
183
216
  end
@@ -1,6 +1,19 @@
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
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,15 +21,22 @@ module Elasticsearch
8
21
 
9
22
  # Returns the names of indices and shards on which a search request would be executed
10
23
  #
11
- # @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
12
- # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
24
+ # @option arguments [String] :index The name of the index
25
+ # @option arguments [String] :type The type of the document
26
+ # @option arguments [String] :preference Specify the node or shard the operation should be performed on
27
+ # (default: random)
13
28
  # @option arguments [String] :routing Specific routing value
14
- # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
15
- # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
16
- # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
17
- # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, none, all)
29
+ # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
30
+ # (default: false)
31
+ # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when
32
+ # unavailable (missing or closed)
33
+ # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves
34
+ # into no concrete indices.
35
+ # (This includes `_all` or when no indices have been specified)
36
+ # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices
37
+ # that are open, closed or both. (options: open, closed)
18
38
  #
19
- # @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-shards.html
39
+ # @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-shards.html
20
40
  #
21
41
  def search_shards(arguments={})
22
42
  method = HTTP_GET
@@ -29,7 +49,7 @@ module Elasticsearch
29
49
 
30
50
  # Register this action with its valid params when the module is loaded.
31
51
  #
32
- # @since 6.2.0
52
+ # @since 6.1.1
33
53
  ParamsRegistry.register(:search_shards, [
34
54
  :preference,
35
55
  :routing,
@@ -1,6 +1,19 @@
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
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
@@ -36,7 +49,8 @@ module Elasticsearch
36
49
  # @option arguments [Boolean] :explain Specify whether to return detailed information about score computation as part of a hit
37
50
  # @option arguments [Boolean] :profile Specify whether to profile the query execution
38
51
  # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response
39
- # @option arguments [Boolean] :rest_total_hits_as_int This parameter is ignored in this version. It is used in the next major version to control whether the rest response should render the total.hits as an object or a number
52
+ # @option arguments [Boolean] :rest_total_hits_as_int Indicates whether hits.total should be rendered as an integer or an object in the rest search response
53
+ # @option arguments [Boolean] :ccs_minimize_roundtrips Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
40
54
  #
41
55
  # @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-template.html
42
56
  #
@@ -51,7 +65,7 @@ module Elasticsearch
51
65
 
52
66
  # Register this action with its valid params when the module is loaded.
53
67
  #
54
- # @since 6.2.0
68
+ # @since 6.1.1
55
69
  ParamsRegistry.register(:search_template, [
56
70
  :ignore_unavailable,
57
71
  :ignore_throttled,
@@ -64,7 +78,8 @@ module Elasticsearch
64
78
  :explain,
65
79
  :profile,
66
80
  :typed_keys,
67
- :rest_total_hits_as_int ].freeze)
81
+ :rest_total_hits_as_int,
82
+ :ccs_minimize_roundtrips ].freeze)
68
83
  end
69
84
  end
70
85
  end
@@ -1,6 +1,19 @@
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
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
@@ -23,9 +36,10 @@ module Elasticsearch
23
36
  # @option arguments [String] :snapshot A snapshot name (*Required*)
24
37
  # @option arguments [Hash] :body The snapshot definition
25
38
  # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
26
- # @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before returning
39
+ # @option arguments [Boolean] :wait_for_completion Whether the request should block and wait until
40
+ # the operation has completed
27
41
  #
28
- # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
42
+ # @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-snapshots.html#_snapshot
29
43
  #
30
44
  def create(arguments={})
31
45
  raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
@@ -44,7 +58,7 @@ module Elasticsearch
44
58
 
45
59
  # Register this action with its valid params when the module is loaded.
46
60
  #
47
- # @since 6.2.0
61
+ # @since 6.1.1
48
62
  ParamsRegistry.register(:create, [
49
63
  :master_timeout,
50
64
  :wait_for_completion ].freeze)
@@ -1,6 +1,19 @@
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
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
@@ -23,7 +36,7 @@ module Elasticsearch
23
36
  # @option arguments [Time] :timeout Explicit operation timeout
24
37
  # @option arguments [Boolean] :verify Whether to verify the repository after creation
25
38
  #
26
- # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
39
+ # @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-snapshots.html#_repositories
27
40
  #
28
41
  def create_repository(arguments={})
29
42
  raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
@@ -41,7 +54,7 @@ module Elasticsearch
41
54
 
42
55
  # Register this action with its valid params when the module is loaded.
43
56
  #
44
- # @since 6.2.0
57
+ # @since 6.1.1
45
58
  ParamsRegistry.register(:create_repository, [
46
59
  :master_timeout,
47
60
  :timeout,
@@ -1,6 +1,19 @@
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
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,8 +31,9 @@ module Elasticsearch
18
31
  # @option arguments [String] :repository A repository name (*Required*)
19
32
  # @option arguments [String] :snapshot A snapshot name (*Required*)
20
33
  # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
34
+ # @option arguments [Number,List] :ignore The list of HTTP errors to ignore
21
35
  #
22
- # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
36
+ # @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-snapshots.html
23
37
  #
24
38
  def delete(arguments={})
25
39
  raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
@@ -42,9 +56,8 @@ module Elasticsearch
42
56
 
43
57
  # Register this action with its valid params when the module is loaded.
44
58
  #
45
- # @since 6.2.0
46
- ParamsRegistry.register(:delete, [
47
- :master_timeout ].freeze)
59
+ # @since 6.1.1
60
+ ParamsRegistry.register(:delete, [ :master_timeout ].freeze)
48
61
  end
49
62
  end
50
63
  end
@@ -1,6 +1,19 @@
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
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
@@ -16,8 +29,9 @@ module Elasticsearch
16
29
  # @option arguments [List] :repository A comma-separated list of repository names (*Required*)
17
30
  # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
18
31
  # @option arguments [Time] :timeout Explicit operation timeout
32
+ # @option arguments [Number,List] :ignore The list of HTTP errors to ignore
19
33
  #
20
- # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
34
+ # @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-snapshots.html
21
35
  #
22
36
  def delete_repository(arguments={})
23
37
  raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
@@ -38,7 +52,7 @@ module Elasticsearch
38
52
 
39
53
  # Register this action with its valid params when the module is loaded.
40
54
  #
41
- # @since 6.2.0
55
+ # @since 6.1.1
42
56
  ParamsRegistry.register(:delete_repository, [
43
57
  :master_timeout,
44
58
  :timeout ].freeze)
@@ -1,6 +1,19 @@
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
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
@@ -23,11 +36,12 @@ module Elasticsearch
23
36
  #
24
37
  # @option arguments [String] :repository A repository name (*Required*)
25
38
  # @option arguments [List] :snapshot A comma-separated list of snapshot names (*Required*)
39
+ # @option arguments [Boolean] :ignore_unavailable Whether to ignore unavailable snapshots, defaults to
40
+ # false which means a SnapshotMissingException is thrown
26
41
  # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
27
- # @option arguments [Boolean] :ignore_unavailable Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
28
42
  # @option arguments [Boolean] :verbose Whether to show verbose snapshot info or only show the basic info found in the repository index blob
29
43
  #
30
- # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
44
+ # @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-snapshots.html
31
45
  #
32
46
  def get(arguments={})
33
47
  raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
@@ -50,10 +64,10 @@ module Elasticsearch
50
64
 
51
65
  # Register this action with its valid params when the module is loaded.
52
66
  #
53
- # @since 6.2.0
67
+ # @since 6.1.1
54
68
  ParamsRegistry.register(:get, [
55
- :master_timeout,
56
69
  :ignore_unavailable,
70
+ :master_timeout,
57
71
  :verbose ].freeze)
58
72
  end
59
73
  end
@@ -1,6 +1,19 @@
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
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
@@ -17,11 +30,14 @@ module Elasticsearch
17
30
  #
18
31
  # client.snapshot.get_repository repository: 'my-backups'
19
32
  #
20
- # @option arguments [List] :repository A comma-separated list of repository names
33
+ # @option arguments [List] :repository A comma-separated list of repository names. Leave blank or use `_all`
34
+ # to get a list of repositories
21
35
  # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
22
- # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
36
+ # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
37
+ # (default: false)
38
+ # @option arguments [Number,List] :ignore The list of HTTP errors to ignore
23
39
  #
24
- # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
40
+ # @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-snapshots.html
25
41
  #
26
42
  def get_repository(arguments={})
27
43
  repository = arguments.delete(:repository)
@@ -40,7 +56,7 @@ module Elasticsearch
40
56
 
41
57
  # Register this action with its valid params when the module is loaded.
42
58
  #
43
- # @since 6.2.0
59
+ # @since 6.1.1
44
60
  ParamsRegistry.register(:get_repository, [
45
61
  :master_timeout,
46
62
  :local ].freeze)
@@ -1,6 +1,19 @@
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
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
 
13
26
  # A Mapping of all the actions to their list of valid params.
14
27
  #
15
- # @since 6.2.0
28
+ # @since 6.1.1
16
29
  PARAMS = {}
17
30
 
18
31
  # Register an action with its list of valid params.
@@ -23,7 +36,7 @@ module Elasticsearch
23
36
  # @param [ Symbol ] action The action to register.
24
37
  # @param [ Array[Symbol] ] valid_params The list of valid params.
25
38
  #
26
- # @since 6.2.0
39
+ # @since 6.1.1
27
40
  def register(action, valid_params)
28
41
  PARAMS[action.to_sym] = valid_params
29
42
  end
@@ -37,7 +50,7 @@ module Elasticsearch
37
50
  #
38
51
  # @return [ Array<Symbol> ] The list of valid params for the action.
39
52
  #
40
- # @since 6.2.0
53
+ # @since 6.1.1
41
54
  def get(action)
42
55
  PARAMS.fetch(action, [])
43
56
  end