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