From 449b5ecb0b76e70d92b6e4446ac36d45013e6bda Mon Sep 17 00:00:00 2001 From: Suraj Singh Date: Tue, 1 Feb 2022 13:53:27 -0800 Subject: [PATCH] Remove type mapping specific delete API Signed-off-by: Suraj Singh --- .../rest/action/document/RestDeleteAction.java | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/server/src/main/java/org/opensearch/rest/action/document/RestDeleteAction.java b/server/src/main/java/org/opensearch/rest/action/document/RestDeleteAction.java index 25a50a49d3aa0..716a14182fee2 100644 --- a/server/src/main/java/org/opensearch/rest/action/document/RestDeleteAction.java +++ b/server/src/main/java/org/opensearch/rest/action/document/RestDeleteAction.java @@ -56,13 +56,7 @@ public class RestDeleteAction extends BaseRestHandler { @Override public List routes() { - return unmodifiableList( - asList( - new Route(DELETE, "/{index}/_doc/{id}"), - // Deprecated typed endpoint. - new Route(DELETE, "/{index}/{type}/{id}") - ) - ); + return unmodifiableList(asList(new Route(DELETE, "/{index}/_doc/{id}"))); } @Override @@ -73,12 +67,7 @@ public String getName() { @Override public RestChannelConsumer prepareRequest(final RestRequest request, final NodeClient client) throws IOException { DeleteRequest deleteRequest; - if (request.hasParam("type")) { - deprecationLogger.deprecate("delete_with_types", TYPES_DEPRECATION_MESSAGE); - deleteRequest = new DeleteRequest(request.param("index"), request.param("type"), request.param("id")); - } else { - deleteRequest = new DeleteRequest(request.param("index"), request.param("id")); - } + deleteRequest = new DeleteRequest(request.param("index"), request.param("id")); deleteRequest.routing(request.param("routing")); deleteRequest.timeout(request.paramAsTime("timeout", DeleteRequest.DEFAULT_TIMEOUT));