open_index.asciidoc 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. --
  2. :api: open-index
  3. :request: OpenIndexRequest
  4. :response: OpenIndexResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Open Index API
  8. [id="{upid}-{api}-request"]
  9. ==== Open Index Request
  10. An +{request}+ requires an `index` argument:
  11. ["source","java",subs="attributes,callouts,macros"]
  12. --------------------------------------------------
  13. include-tagged::{doc-tests-file}[{api}-request]
  14. --------------------------------------------------
  15. <1> The index to open
  16. ==== Optional arguments
  17. The following arguments can optionally be provided:
  18. ["source","java",subs="attributes,callouts,macros"]
  19. --------------------------------------------------
  20. include-tagged::{doc-tests-file}[{api}-request-timeout]
  21. --------------------------------------------------
  22. <1> Timeout to wait for the all the nodes to acknowledge the index is opened
  23. as a `TimeValue`
  24. <2> Timeout to wait for the all the nodes to acknowledge the index is opened
  25. as a `String`
  26. ["source","java",subs="attributes,callouts,macros"]
  27. --------------------------------------------------
  28. include-tagged::{doc-tests-file}[{api}-request-masterTimeout]
  29. --------------------------------------------------
  30. <1> Timeout to connect to the master node as a `TimeValue`
  31. <2> Timeout to connect to the master node as a `String`
  32. ["source","java",subs="attributes,callouts,macros"]
  33. --------------------------------------------------
  34. include-tagged::{doc-tests-file}[{api}-request-waitForActiveShards]
  35. --------------------------------------------------
  36. <1> The number of active shard copies to wait for before the open index API
  37. returns a response, as an `int`
  38. <2> The number of active shard copies to wait for before the open index API
  39. returns a response, as an `ActiveShardCount`
  40. ["source","java",subs="attributes,callouts,macros"]
  41. --------------------------------------------------
  42. include-tagged::{doc-tests-file}[{api}-request-indicesOptions]
  43. --------------------------------------------------
  44. <1> Setting `IndicesOptions` controls how unavailable indices are resolved and
  45. how wildcard expressions are expanded
  46. include::../execution.asciidoc[]
  47. [id="{upid}-{api}-response"]
  48. ==== Open Index Response
  49. The returned +{response}+ allows to retrieve information about the
  50. executed operation as follows:
  51. ["source","java",subs="attributes,callouts,macros"]
  52. --------------------------------------------------
  53. include-tagged::{doc-tests-file}[{api}-response]
  54. --------------------------------------------------
  55. <1> Indicates whether all of the nodes have acknowledged the request
  56. <2> Indicates whether the requisite number of shard copies were started for
  57. each shard in the index before timing out