From 223d0b2a1c62ca5ebf12b141b9119fda9a465dc8 Mon Sep 17 00:00:00 2001 From: Suraj Singh <79435743+dreamer-89@users.noreply.github.com> Date: Fri, 25 Feb 2022 13:00:25 -0800 Subject: [PATCH] Remove type end-points from no-op bulk and search action (#2261) Signed-off-by: Suraj Singh --- .../plugin/noop/action/bulk/RestNoopBulkAction.java | 5 +---- .../plugin/noop/action/search/RestNoopSearchAction.java | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/client/client-benchmark-noop-api-plugin/src/main/java/org/opensearch/plugin/noop/action/bulk/RestNoopBulkAction.java b/client/client-benchmark-noop-api-plugin/src/main/java/org/opensearch/plugin/noop/action/bulk/RestNoopBulkAction.java index 62123870f0099..1e94939bed7b5 100644 --- a/client/client-benchmark-noop-api-plugin/src/main/java/org/opensearch/plugin/noop/action/bulk/RestNoopBulkAction.java +++ b/client/client-benchmark-noop-api-plugin/src/main/java/org/opensearch/plugin/noop/action/bulk/RestNoopBulkAction.java @@ -67,9 +67,7 @@ public List routes() { new Route(POST, "/_noop_bulk"), new Route(PUT, "/_noop_bulk"), new Route(POST, "/{index}/_noop_bulk"), - new Route(PUT, "/{index}/_noop_bulk"), - new Route(POST, "/{index}/{type}/_noop_bulk"), - new Route(PUT, "/{index}/{type}/_noop_bulk") + new Route(PUT, "/{index}/_noop_bulk") ) ); } @@ -83,7 +81,6 @@ public String getName() { public RestChannelConsumer prepareRequest(final RestRequest request, final NodeClient client) throws IOException { BulkRequest bulkRequest = Requests.bulkRequest(); String defaultIndex = request.param("index"); - String defaultType = request.param("type"); String defaultRouting = request.param("routing"); String defaultPipeline = request.param("pipeline"); Boolean defaultRequireAlias = request.paramAsBoolean("require_alias", null); diff --git a/client/client-benchmark-noop-api-plugin/src/main/java/org/opensearch/plugin/noop/action/search/RestNoopSearchAction.java b/client/client-benchmark-noop-api-plugin/src/main/java/org/opensearch/plugin/noop/action/search/RestNoopSearchAction.java index 3f7be0446532e..a6573cd488e4b 100644 --- a/client/client-benchmark-noop-api-plugin/src/main/java/org/opensearch/plugin/noop/action/search/RestNoopSearchAction.java +++ b/client/client-benchmark-noop-api-plugin/src/main/java/org/opensearch/plugin/noop/action/search/RestNoopSearchAction.java @@ -53,9 +53,7 @@ public List routes() { new Route(GET, "/_noop_search"), new Route(POST, "/_noop_search"), new Route(GET, "/{index}/_noop_search"), - new Route(POST, "/{index}/_noop_search"), - new Route(GET, "/{index}/{type}/_noop_search"), - new Route(POST, "/{index}/{type}/_noop_search") + new Route(POST, "/{index}/_noop_search") ) ); }