diff --git a/src/main/java/org/opensearch/search/asynchronous/rest/RestGetAsynchronousSearchAction.java b/src/main/java/org/opensearch/search/asynchronous/rest/RestGetAsynchronousSearchAction.java index 6be3f35f..b4416970 100644 --- a/src/main/java/org/opensearch/search/asynchronous/rest/RestGetAsynchronousSearchAction.java +++ b/src/main/java/org/opensearch/search/asynchronous/rest/RestGetAsynchronousSearchAction.java @@ -36,8 +36,10 @@ import java.io.IOException; import java.util.Collections; import java.util.List; +import java.util.Set; import static org.opensearch.rest.RestRequest.Method.GET; +import static org.opensearch.search.asynchronous.rest.RestSubmitAsynchronousSearchAction.RESPONSE_PARAMS; public class RestGetAsynchronousSearchAction extends BaseRestHandler { @@ -71,4 +73,9 @@ protected RestChannelConsumer prepareRequest(RestRequest request, NodeClient cli client.execute(GetAsynchronousSearchAction.INSTANCE, getRequest, new RestStatusToXContentListener<>(channel)); }; } + + @Override + protected Set responseParams() { + return RESPONSE_PARAMS; + } } diff --git a/src/main/java/org/opensearch/search/asynchronous/rest/RestSubmitAsynchronousSearchAction.java b/src/main/java/org/opensearch/search/asynchronous/rest/RestSubmitAsynchronousSearchAction.java index aded7618..c367378d 100644 --- a/src/main/java/org/opensearch/search/asynchronous/rest/RestSubmitAsynchronousSearchAction.java +++ b/src/main/java/org/opensearch/search/asynchronous/rest/RestSubmitAsynchronousSearchAction.java @@ -53,7 +53,7 @@ public class RestSubmitAsynchronousSearchAction extends BaseRestHandler { */ public static final String TOTAL_HITS_AS_INT_PARAM = "rest_total_hits_as_int"; public static final String TYPED_KEYS_PARAM = "typed_keys"; - private static final Set RESPONSE_PARAMS; + static final Set RESPONSE_PARAMS; static { final Set responseParams = new HashSet<>(Arrays.asList(TYPED_KEYS_PARAM, TOTAL_HITS_AS_INT_PARAM));