Skip to content

Commit 63721a4

Browse files
committed
Add HLRC docs
1 parent 3ab7cb7 commit 63721a4

File tree

3 files changed

+57
-11
lines changed

3 files changed

+57
-11
lines changed

client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/CCRDocumentationIT.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -436,12 +436,12 @@ public void testForgetFollower() throws InterruptedException, IOException {
436436
final String leaderCluster = "local";
437437

438438
// tag::ccr-forget-follower-request
439-
final ForgetFollowerRequest request = new ForgetFollowerRequest( // <1>
440-
followerCluster,
441-
followerIndex,
442-
followerIndexUUID,
443-
leaderCluster,
444-
leaderIndex);
439+
final ForgetFollowerRequest request = new ForgetFollowerRequest(
440+
followerCluster, // <1>
441+
followerIndex, // <2>
442+
followerIndexUUID, // <3>
443+
leaderCluster, // <4>
444+
leaderIndex); // <5>
445445
// end::ccr-forget-follower-request
446446

447447
// tag::ccr-forget-follower-execute
@@ -452,11 +452,11 @@ public void testForgetFollower() throws InterruptedException, IOException {
452452

453453
// tag::ccr-forget-follower-response
454454
final BroadcastResponse.Shards shards = response.shards(); // <1>
455-
final int total = shards.total();
456-
final int successful = shards.successful();
457-
final int skipped = shards.skipped();
458-
final int failed = shards.failed();
459-
shards.failures().forEach(failure -> {});
455+
final int total = shards.total(); // <2>
456+
final int successful = shards.successful(); // <3>
457+
final int skipped = shards.skipped(); // <4>
458+
final int failed = shards.failed(); // <5>
459+
shards.failures().forEach(failure -> {}); // <6>
460460
// end::ccr-forget-follower-response
461461

462462
// tag::ccr-forget-follower-execute-listener
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
--
2+
:api: ccr-forget-follower
3+
:request: ForgetFollowerRequest
4+
:response: BroadcastResponse
5+
--
6+
7+
[id="{upid}-{api}"]
8+
=== Forget Follower API
9+
10+
[id="{upid}-{api}-request"]
11+
==== Request
12+
13+
The Forget Follower API allows you to manually remove the follower retention
14+
leases from the leader. Note that these retention leases are automatically
15+
managed by the following index. This API exists only for cases when invoking
16+
the unfollow API on the follower index is unable to remove the follower
17+
retention leases.
18+
19+
["source","java",subs="attributes,callouts,macros"]
20+
--------------------------------------------------
21+
include-tagged::{doc-tests-file}[{api}-request]
22+
--------------------------------------------------
23+
<1> The name of the cluster containing the follower index.
24+
<2> The name of the follower index.
25+
<3> The UUID of the follower index (can be obtained from index stats).
26+
<4> The alias of the remote cluster containing the leader index.
27+
<5> The name of the leader index.
28+
29+
[id="{upid}-{api}-response"]
30+
==== Response
31+
32+
The returned +{response}+ indicates if the response was successful.
33+
34+
["source","java",subs="attributes,callouts,macros"]
35+
--------------------------------------------------
36+
include-tagged::{doc-tests-file}[{api}-response]
37+
--------------------------------------------------
38+
<1> The high-level shards summary.
39+
<2> The total number of shards the request was executed on.
40+
<3> The total number of shards the request was successful on.
41+
<4> The total number of shards the request was skipped on (should always be zero).
42+
<5> The total number of shards the request failed on.
43+
<6> The shard-level failures.
44+
45+
include::../execution.asciidoc[]

docs/java-rest/high-level/supported-apis.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,7 @@ The Java High Level REST Client supports the following CCR APIs:
502502
* <<{upid}-ccr-pause-follow>>
503503
* <<{upid}-ccr-resume-follow>>
504504
* <<{upid}-ccr-unfollow>>
505+
* <<{upid}-ccr-forget-follower>>
505506
* <<{upid}-ccr-put-auto-follow-pattern>>
506507
* <<{upid}-ccr-delete-auto-follow-pattern>>
507508
* <<{upid}-ccr-get-auto-follow-pattern>>

0 commit comments

Comments
 (0)