Skip to content

Commit ae42d3e

Browse files
committed
migration API
1 parent 3fbfbc9 commit ae42d3e

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed
Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
1+
--
2+
:api: upgrade
3+
:request: IndexUpgradeRequest
4+
:response: BulkByScrollResponse
5+
:submit_response: IndexUpgradeSubmissionResponse
6+
:doc-tests-file: {doc-tests}/MigrationClientDocumentationIT.java
7+
--
8+
19
[[java-rest-high-migration-upgrade]]
210
=== Migration Upgrade
311

412
[[java-rest-high-migraton-upgrade-request]]
513
==== Index Upgrade Request
614

7-
An `IndexUpgradeRequest` requires an index argument. Only one index at the time should be upgraded:
15+
An +{request}+ requires an index argument. Only one index at the time should be upgraded:
816

917
["source","java",subs="attributes,callouts,macros"]
1018
--------------------------------------------------
11-
include-tagged::{doc-tests}/MigrationClientDocumentationIT.java[upgrade-request]
19+
include-tagged::{doc-tests-file}[{api}-request]
1220
--------------------------------------------------
1321
<1> Create a new request instance
1422

@@ -17,39 +25,37 @@ include-tagged::{doc-tests}/MigrationClientDocumentationIT.java[upgrade-request]
1725

1826
["source","java",subs="attributes,callouts,macros"]
1927
--------------------------------------------------
20-
include-tagged::{doc-tests}/MigrationClientDocumentationIT.java[upgrade-execute]
28+
include-tagged::{doc-tests-file}[{api}-execute]
2129
--------------------------------------------------
2230

2331
[[java-rest-high-migration-upgrade-response]]
2432
==== Response
25-
The returned `BulkByScrollResponse` contains information about the executed operation
33+
The returned +{response}+ contains information about the executed operation
2634

2735

2836
[[java-rest-high-migraton-async-upgrade-request]]
2937
==== Asynchronous Execution
3038

31-
The asynchronous execution of a upgrade request requires both the `IndexUpgradeRequest`
39+
The asynchronous execution of an upgrade request requires both the +{request}+
3240
instance and an `ActionListener` instance to be passed to the asynchronous
3341
method:
3442

35-
A typical listener for `BulkResponse` looks like:
36-
3743
["source","java",subs="attributes,callouts,macros"]
3844
--------------------------------------------------
39-
include-tagged::{doc-tests}/MigrationClientDocumentationIT.java[upgrade-async-listener]
45+
include-tagged::{doc-tests-file}[{api}-async-listener]
4046
--------------------------------------------------
4147
<1> Called when the execution is successfully completed. The response is
4248
provided as an argument and contains a list of individual results for each
4349
operation that was executed. Note that one or more operations might have
4450
failed while the others have been successfully executed.
45-
<2> Called when the whole `IndexUpgradeRequest` fails. In this case the raised
51+
<2> Called when the whole +{request}+ fails. In this case the raised
4652
exception is provided as an argument and no operation has been executed.
4753

4854
["source","java",subs="attributes,callouts,macros"]
4955
--------------------------------------------------
50-
include-tagged::{doc-tests}/MigrationClientDocumentationIT.java[upgrade-async-execute]
56+
include-tagged::{doc-tests-file}[{api}-async-execute]
5157
--------------------------------------------------
52-
<1> The `IndexUpgradeRequest` to execute and the `ActionListener` to use when
58+
<1> The +{request}+ to execute and the `ActionListener` to use when
5359
the execution completes
5460

5561
The asynchronous method does not block and returns immediately. Once it is
@@ -59,11 +65,11 @@ it failed.
5965

6066

6167
=== Migration Upgrade with Task API
62-
Submission of upgrade request task will requires the `IndexUpgradeRequest` and will return
63-
`IndexUpgradeSubmissionResponse`. The `IndexUpgradeSubmissionResponse` can later be use to fetch
68+
Submission of upgrade request task will requires the +{request}+ and will return
69+
+{submit_response}+. The +{submit_response}+ can later be use to fetch
6470
TaskId and query the Task API for results.
6571

6672
["source","java",subs="attributes,callouts,macros"]
6773
--------------------------------------------------
68-
include-tagged::{doc-tests}/MigrationClientDocumentationIT.java[upgrade-task-api]
74+
include-tagged::{doc-tests-file}[{api}-task-api]
6975
--------------------------------------------------

0 commit comments

Comments
 (0)