From 7d42e7e7163ba49e3e404e840092b4392bec4fc8 Mon Sep 17 00:00:00 2001 From: Alexander Lin Date: Wed, 25 May 2016 22:13:04 -0700 Subject: [PATCH] Closes #18013. Added status field to _msearch response bodies. --- .../action/search/MultiSearchResponse.java | 5 +++++ .../search/MultiSearchRequestTests.java | 2 +- docs/reference/search/multi-search.asciidoc | 8 ++++---- .../rest-api-spec/test/msearch/11_status.yaml | 20 +++++++++++++++++++ 4 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/msearch/11_status.yaml diff --git a/core/src/main/java/org/elasticsearch/action/search/MultiSearchResponse.java b/core/src/main/java/org/elasticsearch/action/search/MultiSearchResponse.java index bc1e697646f..bc23c11ceac 100644 --- a/core/src/main/java/org/elasticsearch/action/search/MultiSearchResponse.java +++ b/core/src/main/java/org/elasticsearch/action/search/MultiSearchResponse.java @@ -20,6 +20,7 @@ package org.elasticsearch.action.search; import org.elasticsearch.ElasticsearchException; +import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.io.stream.StreamInput; @@ -28,6 +29,7 @@ import org.elasticsearch.common.io.stream.Streamable; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; +import org.elasticsearch.rest.RestStatus; import java.io.IOException; import java.util.Arrays; @@ -155,8 +157,10 @@ public class MultiSearchResponse extends ActionResponse implements Iterable