diff --git a/plugin/src/main/java/org/elasticsearch/xpack/watcher/watch/Watch.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/watch/Watch.java index 057aa373567..8a4084ee5b3 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/watcher/watch/Watch.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/watcher/watch/Watch.java @@ -303,7 +303,7 @@ public class Watch implements ToXContentObject { actions = actionRegistry.parseActions(id, parser); } else if (Field.METADATA.match(currentFieldName)) { metatdata = parser.map(); - } else if (Field.STATUS.match(currentFieldName) || Field.STATUS_V5.match(currentFieldName)) { + } else if (Field.STATUS.match(currentFieldName)) { if (includeStatus) { status = WatchStatus.parse(id, parser, clock); } else { @@ -350,7 +350,6 @@ public class Watch implements ToXContentObject { ParseField THROTTLE_PERIOD_HUMAN = new ParseField("throttle_period"); ParseField METADATA = new ParseField("metadata"); ParseField STATUS = new ParseField("status"); - ParseField STATUS_V5 = new ParseField("_status"); } private static final Pattern NO_WS_PATTERN = Pattern.compile("\\S+"); diff --git a/plugin/src/main/resources/watch-history.json b/plugin/src/main/resources/watch-history.json index 8853b9f0be6..57fbee0c463 100644 --- a/plugin/src/main/resources/watch-history.json +++ b/plugin/src/main/resources/watch-history.json @@ -98,11 +98,6 @@ "state": { "type": "keyword" }, - "_status": { - "type": "object", - "enabled" : false, - "dynamic" : true - }, "status": { "type": "object", "enabled" : false, diff --git a/plugin/src/main/resources/watches.json b/plugin/src/main/resources/watches.json index baa9cf1251d..fe26b1a1988 100644 --- a/plugin/src/main/resources/watches.json +++ b/plugin/src/main/resources/watches.json @@ -10,11 +10,6 @@ "doc": { "dynamic" : "strict", "properties": { - "_status": { - "type": "object", - "enabled" : false, - "dynamic" : true - }, "status": { "type": "object", "enabled" : false, diff --git a/plugin/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchTests.java index f976f2c6e5c..a222b4507dd 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchTests.java @@ -249,15 +249,7 @@ public class WatchTests extends ESTestCase { WatchStatus watchStatus = new WatchStatus(new DateTime(clock.millis()), unmodifiableMap(actionsStatuses)); Watch.Parser watchParser = new Watch.Parser(settings, triggerService, actionRegistry, inputRegistry, null, clock); - XContentBuilder builder = jsonBuilder().startObject() - .startObject("trigger").endObject(); - if (randomBoolean()) { - builder.field("_status", watchStatus); - } else { - builder.field("status", watchStatus); - } - - builder.endObject(); + XContentBuilder builder = jsonBuilder().startObject().startObject("trigger").endObject().field("status", watchStatus).endObject(); Watch watch = watchParser.parse("foo", true, builder.bytes(), XContentType.JSON); assertThat(watch.status().state().getTimestamp().getMillis(), is(clock.millis())); for (ActionWrapper action : actions) {