Skip to content

Commit 59f8728

Browse files
author
Christoph Büscher
authored
[Docs] Minor fix for SubmitAsyncSearchRequest.keepOnCompletion javadoc (#54325)
The semantics and the default value for this parameter have changed, adapting the javadoc accordingly.
1 parent 4090568 commit 59f8728

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

client/rest-high-level/src/main/java/org/elasticsearch/client/asyncsearch/SubmitAsyncSearchRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ public void setWaitForCompletionTimeout(TimeValue waitForCompletionTimeout) {
7777
}
7878

7979
/**
80-
* Returns whether the resource resource should be removed on completion or failure (defaults to true).
80+
* Returns whether the resource resource should be kept on completion or failure (defaults to false).
8181
*/
8282
public Boolean isKeepOnCompletion() {
8383
return keepOnCompletion;
8484
}
8585

8686
/**
87-
* Determines if the resource should be removed on completion or failure (defaults to true).
87+
* Determines if the resource should be kept on completion or failure (defaults to false).
8888
*/
8989
public void setKeepOnCompletion(boolean keepOnCompletion) {
9090
this.keepOnCompletion = keepOnCompletion;

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/SubmitAsyncSearchRequest.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public SearchRequest getSearchRequest() {
113113
}
114114

115115
/**
116-
* Should the resource be removed on completion or failure (defaults to true).
116+
* Should the resource be kept on completion or failure (defaults to false).
117117
*/
118118
public SubmitAsyncSearchRequest setKeepOnCompletion(boolean value) {
119119
this.keepOnCompletion = value;
@@ -162,8 +162,12 @@ public boolean shouldCancelChildrenOnCancellation() {
162162

163163
@Override
164164
public boolean equals(Object o) {
165-
if (this == o) return true;
166-
if (o == null || getClass() != o.getClass()) return false;
165+
if (this == o) {
166+
return true;
167+
}
168+
if (o == null || getClass() != o.getClass()) {
169+
return false;
170+
}
167171
SubmitAsyncSearchRequest request1 = (SubmitAsyncSearchRequest) o;
168172
return keepOnCompletion == request1.keepOnCompletion &&
169173
waitForCompletionTimeout.equals(request1.waitForCompletionTimeout) &&

0 commit comments

Comments
 (0)