|
@@ -31,7 +31,9 @@ import org.elasticsearch.rest.action.search.RestMultiSearchAction;
|
|
|
import org.elasticsearch.rest.action.search.RestSearchAction;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.Collections;
|
|
|
+import java.util.HashSet;
|
|
|
import java.util.Set;
|
|
|
|
|
|
import static org.elasticsearch.rest.RestRequest.Method.GET;
|
|
@@ -40,7 +42,15 @@ import static org.elasticsearch.rest.RestRequest.Method.POST;
|
|
|
public class RestMultiSearchTemplateAction extends BaseRestHandler {
|
|
|
private static final DeprecationLogger deprecationLogger = new DeprecationLogger(
|
|
|
LogManager.getLogger(RestMultiSearchAction.class));
|
|
|
- private static final Set<String> RESPONSE_PARAMS = Collections.singleton(RestSearchAction.TYPED_KEYS_PARAM);
|
|
|
+
|
|
|
+ private static final Set<String> RESPONSE_PARAMS;
|
|
|
+
|
|
|
+ static {
|
|
|
+ final Set<String> responseParams = new HashSet<>(
|
|
|
+ Arrays.asList(RestSearchAction.TYPED_KEYS_PARAM, RestSearchAction.TOTAL_HIT_AS_INT_PARAM)
|
|
|
+ );
|
|
|
+ RESPONSE_PARAMS = Collections.unmodifiableSet(responseParams);
|
|
|
+ }
|
|
|
|
|
|
private final boolean allowExplicitIndex;
|
|
|
|