split_index.asciidoc 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. --
  2. :api: split-index
  3. :request: ResizeRequest
  4. :response: ResizeResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Split Index API
  8. [id="{upid}-{api}-request"]
  9. ==== Resize Request
  10. The Split 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 split the source index (second argument) into
  17. <2> The resize type needs to be set to `SPLIT`
  18. ==== Optional arguments
  19. The following arguments can optionally be provided:
  20. ["source","java",subs="attributes,callouts,macros"]
  21. --------------------------------------------------
  22. include-tagged::{doc-tests-file}[{api}-request-timeout]
  23. --------------------------------------------------
  24. <1> Timeout to wait for the all the nodes to acknowledge the index is opened
  25. as a `TimeValue`
  26. <2> Timeout to wait for the all the nodes to acknowledge the index is opened
  27. as a `String`
  28. ["source","java",subs="attributes,callouts,macros"]
  29. --------------------------------------------------
  30. include-tagged::{doc-tests-file}[{api}-request-masterTimeout]
  31. --------------------------------------------------
  32. <1> Timeout to connect to the master node as a `TimeValue`
  33. <2> Timeout to connect to the master node as a `String`
  34. ["source","java",subs="attributes,callouts,macros"]
  35. --------------------------------------------------
  36. include-tagged::{doc-tests-file}[{api}-request-waitForActiveShards]
  37. --------------------------------------------------
  38. <1> The number of active shard copies to wait for before the split index API
  39. returns a response, as an `int`
  40. <2> The number of active shard copies to wait for before the split index API
  41. returns a response, as an `ActiveShardCount`
  42. ["source","java",subs="attributes,callouts,macros"]
  43. --------------------------------------------------
  44. include-tagged::{doc-tests-file}[{api}-request-settings]
  45. --------------------------------------------------
  46. <1> The settings to apply to the target index, which include the number of
  47. shards to create for it
  48. ["source","java",subs="attributes,callouts,macros"]
  49. --------------------------------------------------
  50. include-tagged::{doc-tests-file}[{api}-request-aliases]
  51. --------------------------------------------------
  52. <1> The aliases to associate the target index with
  53. include::../execution.asciidoc[]
  54. [id="{upid}-{api}-response"]
  55. ==== Split Index Response
  56. The returned +{response}+ allows to retrieve information about the
  57. executed operation as follows:
  58. ["source","java",subs="attributes,callouts,macros"]
  59. --------------------------------------------------
  60. include-tagged::{doc-tests-file}[{api}-response]
  61. --------------------------------------------------
  62. <1> Indicates whether all of the nodes have acknowledged the request
  63. <2> Indicates whether the requisite number of shard copies were started for
  64. each shard in the index before timing out