summaryrefslogtreecommitdiff
path: root/core/src/main/java/org/elasticsearch/rest/action/document
diff options
context:
space:
mode:
authorAdrien Grand <jpountz@gmail.com>2016-11-30 13:34:46 +0100
committerGitHub <noreply@github.com>2016-11-30 13:34:46 +0100
commit6231009a8fc53ab5225483ab14a742b4555bacf3 (patch)
treeed965506bc9608514e7ab36ba32187443a8b1d0e /core/src/main/java/org/elasticsearch/rest/action/document
parent235e6acd733e385d14ef45c928368c0159d760c4 (diff)
Remove 2.x backward compatibility of mappings. (#21670)
For the record, I also had to remove the geo-hash cell and geo-distance range queries to make the code compile. These queries already throw an exception in all cases with 5.x indices, so that does not hurt any more. I also had to rename all 2.x bwc indices from `index-${version}` to `unsupported-${version}` to make `OldIndexBackwardCompatibilityIT` happy.
Diffstat (limited to 'core/src/main/java/org/elasticsearch/rest/action/document')
-rw-r--r--core/src/main/java/org/elasticsearch/rest/action/document/RestIndexAction.java4
-rw-r--r--core/src/main/java/org/elasticsearch/rest/action/document/RestUpdateAction.java8
2 files changed, 0 insertions, 12 deletions
diff --git a/core/src/main/java/org/elasticsearch/rest/action/document/RestIndexAction.java b/core/src/main/java/org/elasticsearch/rest/action/document/RestIndexAction.java
index 82b1036115..3880ec6ca9 100644
--- a/core/src/main/java/org/elasticsearch/rest/action/document/RestIndexAction.java
+++ b/core/src/main/java/org/elasticsearch/rest/action/document/RestIndexAction.java
@@ -66,10 +66,6 @@ public class RestIndexAction extends BaseRestHandler {
IndexRequest indexRequest = new IndexRequest(request.param("index"), request.param("type"), request.param("id"));
indexRequest.routing(request.param("routing"));
indexRequest.parent(request.param("parent")); // order is important, set it after routing, so it will set the routing
- indexRequest.timestamp(request.param("timestamp"));
- if (request.hasParam("ttl")) {
- indexRequest.ttl(request.param("ttl"));
- }
indexRequest.setPipeline(request.param("pipeline"));
indexRequest.source(request.content());
indexRequest.timeout(request.paramAsTime("timeout", IndexRequest.DEFAULT_TIMEOUT));
diff --git a/core/src/main/java/org/elasticsearch/rest/action/document/RestUpdateAction.java b/core/src/main/java/org/elasticsearch/rest/action/document/RestUpdateAction.java
index e0211ccec2..feb2d39b8f 100644
--- a/core/src/main/java/org/elasticsearch/rest/action/document/RestUpdateAction.java
+++ b/core/src/main/java/org/elasticsearch/rest/action/document/RestUpdateAction.java
@@ -87,10 +87,6 @@ public class RestUpdateAction extends BaseRestHandler {
if (upsertRequest != null) {
upsertRequest.routing(request.param("routing"));
upsertRequest.parent(request.param("parent")); // order is important, set it after routing, so it will set the routing
- upsertRequest.timestamp(request.param("timestamp"));
- if (request.hasParam("ttl")) {
- upsertRequest.ttl(request.param("ttl"));
- }
upsertRequest.version(RestActions.parseVersion(request));
upsertRequest.versionType(VersionType.fromString(request.param("version_type"), upsertRequest.versionType()));
}
@@ -98,10 +94,6 @@ public class RestUpdateAction extends BaseRestHandler {
if (doc != null) {
doc.routing(request.param("routing"));
doc.parent(request.param("parent")); // order is important, set it after routing, so it will set the routing
- doc.timestamp(request.param("timestamp"));
- if (request.hasParam("ttl")) {
- doc.ttl(request.param("ttl"));
- }
doc.version(RestActions.parseVersion(request));
doc.versionType(VersionType.fromString(request.param("version_type"), doc.versionType()));
}