shrink_index.asciidoc 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. --
  2. :api: shrink-index
  3. :request: ResizeRequest
  4. :response: ResizeResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Shrink Index API
  8. [id="{upid}-{api}-request"]
  9. ==== Resize Request
  10. The Shrink API requires a +{request}+ instance.
  11. A +{request}+ requires two string arguments:
  12. ["source","java",subs="attributes,callouts,macros"]
  13. --------------------------------------------------
  14. include-tagged::{doc-tests-file}[{api}-request]
  15. --------------------------------------------------
  16. <1> The target index (first argument) to shrink the source index (second argument) into
  17. ==== Optional arguments
  18. The following arguments can optionally be provided:
  19. ["source","java",subs="attributes,callouts,macros"]
  20. --------------------------------------------------
  21. include-tagged::{doc-tests-file}[{api}-request-timeout]
  22. --------------------------------------------------
  23. <1> Timeout to wait for the all the nodes to acknowledge the index is opened
  24. as a `TimeValue`
  25. <2> Timeout to wait for the all the nodes to acknowledge the index is opened
  26. as a `String`
  27. ["source","java",subs="attributes,callouts,macros"]
  28. --------------------------------------------------
  29. include-tagged::{doc-tests-file}[{api}-request-masterTimeout]
  30. --------------------------------------------------
  31. <1> Timeout to connect to the master node as a `TimeValue`
  32. <2> Timeout to connect to the master node as a `String`
  33. ["source","java",subs="attributes,callouts,macros"]
  34. --------------------------------------------------
  35. include-tagged::{doc-tests-file}[{api}-request-waitForActiveShards]
  36. --------------------------------------------------
  37. <1> The number of active shard copies to wait for before the shrink index API
  38. returns a response, as an `int`
  39. <2> The number of active shard copies to wait for before the shrink index API
  40. returns a response, as an `ActiveShardCount`
  41. ["source","java",subs="attributes,callouts,macros"]
  42. --------------------------------------------------
  43. include-tagged::{doc-tests-file}[{api}-request-settings]
  44. --------------------------------------------------
  45. <1> The number of shards on the target of the shrink index request
  46. <2> Remove the allocation requirement copied from the source index
  47. ["source","java",subs="attributes,callouts,macros"]
  48. --------------------------------------------------
  49. include-tagged::{doc-tests-file}[{api}-request-maxSinglePrimarySize]
  50. --------------------------------------------------
  51. <1> The max single primary shard size of the target index
  52. ["source","java",subs="attributes,callouts,macros"]
  53. --------------------------------------------------
  54. include-tagged::{doc-tests-file}[{api}-request-aliases]
  55. --------------------------------------------------
  56. <1> The aliases to associate the target index with
  57. include::../execution.asciidoc[]
  58. [id="{upid}-{api}-response"]
  59. ==== Shrink Index Response
  60. The returned +{response}+ allows to retrieve information about the
  61. executed operation as follows:
  62. ["source","java",subs="attributes,callouts,macros"]
  63. --------------------------------------------------
  64. include-tagged::{doc-tests-file}[{api}-response]
  65. --------------------------------------------------
  66. <1> Indicates whether all of the nodes have acknowledged the request
  67. <2> Indicates whether the requisite number of shard copies were started for
  68. each shard in the index before timing out