From f709b7283f283aa2d3918cc1afda1adb81f26f47 Mon Sep 17 00:00:00 2001 From: Lee Hinman Date: Thu, 3 Dec 2015 12:03:07 -0700 Subject: [PATCH] Remove `GET` option for /_forcemerge POST should be used to indicate this is not just a retrieval operation. Resolves #15165 --- .../action/admin/indices/forcemerge/RestForceMergeAction.java | 3 --- docs/reference/migration/migrate_3_0.asciidoc | 3 +++ .../main/resources/rest-api-spec/api/indices.forcemerge.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/rest/action/admin/indices/forcemerge/RestForceMergeAction.java b/core/src/main/java/org/elasticsearch/rest/action/admin/indices/forcemerge/RestForceMergeAction.java index 4bec04845d0..730276c1a2b 100644 --- a/core/src/main/java/org/elasticsearch/rest/action/admin/indices/forcemerge/RestForceMergeAction.java +++ b/core/src/main/java/org/elasticsearch/rest/action/admin/indices/forcemerge/RestForceMergeAction.java @@ -45,9 +45,6 @@ public class RestForceMergeAction extends BaseRestHandler { super(settings, controller, client); controller.registerHandler(POST, "/_forcemerge", this); controller.registerHandler(POST, "/{index}/_forcemerge", this); - - controller.registerHandler(GET, "/_forcemerge", this); - controller.registerHandler(GET, "/{index}/_forcemerge", this); } @Override diff --git a/docs/reference/migration/migrate_3_0.asciidoc b/docs/reference/migration/migrate_3_0.asciidoc index 822d8864f71..e6c3e49b43d 100644 --- a/docs/reference/migration/migrate_3_0.asciidoc +++ b/docs/reference/migration/migrate_3_0.asciidoc @@ -90,6 +90,9 @@ The search exists api has been removed in favour of using the search api with The deprecated `/_optimize` endpoint has been removed. The `/_forcemerge` endpoint should be used in lieu of optimize. +The `GET` HTTP verb for `/_forcemerge` is no longer supported, please use the +`POST` HTTP verb. + ==== Deprecated queries removed The following deprecated queries have been removed: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/indices.forcemerge.json b/rest-api-spec/src/main/resources/rest-api-spec/api/indices.forcemerge.json index 0e6c6ab23f9..c4170c1962a 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/indices.forcemerge.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/indices.forcemerge.json @@ -1,7 +1,7 @@ { "indices.forcemerge": { "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html", - "methods": ["POST", "GET"], + "methods": ["POST"], "url": { "path": "/_forcemerge", "paths": ["/_forcemerge", "/{index}/_forcemerge"],