From b4b3e350a6072bab214fffdbbb1bec89f29da9a2 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Thu, 28 Feb 2013 18:19:08 +0100 Subject: [PATCH] Expose _explain via POST Closes #2710 --- .../elasticsearch/rest/action/explain/RestExplainAction.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/elasticsearch/rest/action/explain/RestExplainAction.java b/src/main/java/org/elasticsearch/rest/action/explain/RestExplainAction.java index febb1c16395..ffafde3680c 100644 --- a/src/main/java/org/elasticsearch/rest/action/explain/RestExplainAction.java +++ b/src/main/java/org/elasticsearch/rest/action/explain/RestExplainAction.java @@ -40,6 +40,7 @@ import org.elasticsearch.rest.*; import java.io.IOException; import static org.elasticsearch.rest.RestRequest.Method.GET; +import static org.elasticsearch.rest.RestRequest.Method.POST; import static org.elasticsearch.rest.RestStatus.NOT_FOUND; import static org.elasticsearch.rest.RestStatus.OK; import static org.elasticsearch.rest.action.support.RestXContentBuilder.restContentBuilder; @@ -53,6 +54,7 @@ public class RestExplainAction extends BaseRestHandler { public RestExplainAction(Settings settings, Client client, RestController controller) { super(settings, client); controller.registerHandler(GET, "/{index}/{type}/{id}/_explain", this); + controller.registerHandler(POST, "/{index}/{type}/{id}/_explain", this); } @Override