From e23de0ef6b2d2124fc63e555fed6e4ba8f040509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=BCscher?= Date: Fri, 27 Mar 2020 16:01:38 +0100 Subject: [PATCH] [Docs] Minor fix for SubmitAsyncSearchRequest.keepOnCompletion javadoc (#54325) The semantics and the default value for this parameter have changed, adapting the javadoc accordingly. --- .../client/asyncsearch/SubmitAsyncSearchRequest.java | 4 ++-- .../core/search/action/SubmitAsyncSearchRequest.java | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/client/rest-high-level/src/main/java/org/elasticsearch/client/asyncsearch/SubmitAsyncSearchRequest.java b/client/rest-high-level/src/main/java/org/elasticsearch/client/asyncsearch/SubmitAsyncSearchRequest.java index eba121d7cc0d5..4a92eb803922d 100644 --- a/client/rest-high-level/src/main/java/org/elasticsearch/client/asyncsearch/SubmitAsyncSearchRequest.java +++ b/client/rest-high-level/src/main/java/org/elasticsearch/client/asyncsearch/SubmitAsyncSearchRequest.java @@ -77,14 +77,14 @@ public void setWaitForCompletionTimeout(TimeValue waitForCompletionTimeout) { } /** - * Returns whether the resource resource should be removed on completion or failure (defaults to true). + * Returns whether the resource resource should be kept on completion or failure (defaults to false). */ public Boolean isKeepOnCompletion() { return keepOnCompletion; } /** - * Determines if the resource should be removed on completion or failure (defaults to true). + * Determines if the resource should be kept on completion or failure (defaults to false). */ public void setKeepOnCompletion(boolean keepOnCompletion) { this.keepOnCompletion = keepOnCompletion; diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/SubmitAsyncSearchRequest.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/SubmitAsyncSearchRequest.java index 6dc18d3581eae..d93e484a0ba90 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/SubmitAsyncSearchRequest.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/SubmitAsyncSearchRequest.java @@ -113,7 +113,7 @@ public SearchRequest getSearchRequest() { } /** - * Should the resource be removed on completion or failure (defaults to true). + * Should the resource be kept on completion or failure (defaults to false). */ public SubmitAsyncSearchRequest setKeepOnCompletion(boolean value) { this.keepOnCompletion = value; @@ -162,8 +162,12 @@ public boolean shouldCancelChildrenOnCancellation() { @Override public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } SubmitAsyncSearchRequest request1 = (SubmitAsyncSearchRequest) o; return keepOnCompletion == request1.keepOnCompletion && waitForCompletionTimeout.equals(request1.waitForCompletionTimeout) &&