Skip to content

Commit 0851a37

Browse files
authored
Remove types from GET _source endpoint (#46931)
Types are already not needed to retrieve documents; this commit removes the now-redundant path elements in the GET _source API. Relates to #41059
1 parent 18a3b2e commit 0851a37

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

server/src/main/java/org/elasticsearch/rest/action/document/RestGetSourceAction.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@
1919

2020
package org.elasticsearch.rest.action.document;
2121

22-
import org.apache.logging.log4j.LogManager;
2322
import org.elasticsearch.ResourceNotFoundException;
2423
import org.elasticsearch.action.ActionRequestValidationException;
2524
import org.elasticsearch.action.get.GetRequest;
2625
import org.elasticsearch.action.get.GetResponse;
2726
import org.elasticsearch.client.node.NodeClient;
2827
import org.elasticsearch.common.bytes.BytesReference;
29-
import org.elasticsearch.common.logging.DeprecationLogger;
3028
import org.elasticsearch.common.xcontent.XContentBuilder;
3129
import org.elasticsearch.common.xcontent.XContentHelper;
3230
import org.elasticsearch.rest.BaseRestHandler;
@@ -50,15 +48,9 @@
5048
*/
5149
public class RestGetSourceAction extends BaseRestHandler {
5250

53-
private static final DeprecationLogger deprecationLogger = new DeprecationLogger(LogManager.getLogger(RestGetSourceAction.class));
54-
static final String TYPES_DEPRECATION_MESSAGE = "[types removal] Specifying types in get_source and exist_source"
55-
+ "requests is deprecated.";
56-
5751
public RestGetSourceAction(final RestController controller) {
5852
controller.registerHandler(GET, "/{index}/_source/{id}", this);
5953
controller.registerHandler(HEAD, "/{index}/_source/{id}", this);
60-
controller.registerHandler(GET, "/{index}/{type}/{id}/_source", this);
61-
controller.registerHandler(HEAD, "/{index}/{type}/{id}/_source", this);
6254
}
6355

6456
@Override

0 commit comments

Comments
 (0)