Expose _explain via POST

Closes #2710
This commit is contained in:
Simon Willnauer 2013-02-28 18:19:08 +01:00
parent d4ec03ed76
commit b4b3e350a6
1 changed files with 2 additions and 0 deletions

View File

@ -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